Functions | |
| int | bufr_out_descsec (dd *descp, int ndescs, int desch) |
| Write descriptor section of a BUFR message to the bitsream. | |
| int | bufr_open_descsec_w () |
| Open bitstream for section 3 for writing and set default values. | |
| void | bufr_close_descsec_w (bufr_t *bufr, int desch) |
| Write length of section 3 and close bitstream. | |
| int | bufr_parse_in (dd *descs, int start, int end, int(*inputfkt)(varfl *val, int ind), int callback_descs) |
| Parse data descriptors and call user defined input function for each element or for each descriptor. | |
| void | bufr_sect_1_from_file (sect_1_t *s1, char *file) |
| Reads section 1 from a file and stores data read in s1. | |
| int bufr_out_descsec | ( | dd * | descp, | |
| int | ndescs, | |||
| int | desch | |||
| ) |
This function writes the descriptor section of a BUFR message to the section 3 bitstream which has already been opened using bufr_open_descsec_w
| [in] | descp | Array holding the data descriptors |
| [in] | ndescs | Number of descriptors |
| [in] | desch | Handle to the bitstream |
| int bufr_open_descsec_w | ( | ) |
This function opens the bitstream for section 3 and sets default values. The bistream must be closed using bufr_close_descsec_w.
| void bufr_close_descsec_w | ( | bufr_t * | bufr, | |
| int | desch | |||
| ) |
This function calculates and writes the length of section 3, then closes the bitstream.
| [in,out] | bufr | BUFR message to hold the section. |
| [in] | desch | Handle to the bitstream |
| int bufr_parse_in | ( | dd * | descs, | |
| int | start, | |||
| int | end, | |||
| int(*)(varfl *val, int ind) | inputfkt, | |||
| int | callback_descs | |||
| ) |
This function, derived from bufr_parse_new, parses a descriptor or a sequence of descriptors and calls the user defined function inputfkt for reading each data-value corresponding to an element descriptor. In case of CCITT (ASCII) data it calls the user-function for each character of the string.
Data values are wrote out to the global data section bitstream (see bufr_open_datasect_w).
Optionally inputfkt is called also for sequence descriptors and ccitt descriptors
| [in] | descs | Pointer to the data-descriptors. |
| [in] | start | First data-descriptor for output. |
| [in] | end | Last data-descriptor for output. |
| [in] | inputfkt | User defined input function to be called for each data-element or descriptor |
| [in] | callback_descs | Flag that indictes when the user-functions are to be called: 0 for normal behaviour (call inputfkt for each element descriptor and each CCITT character) 1 for extended behaviour (call inputfkt also for sequence descriptors and CCITT descriptors) |
| void bufr_sect_1_from_file | ( | sect_1_t * | s1, | |
| char * | file | |||
| ) |
This function reads section 1 from an ASCII file and stores the data read in a structure s1 . If the file can not be read, s1 is filled with internally defined default values.
| [in,out] | s1 | Structure where section 1 data is stored. |
| [in] | file | Filename of the input file. |
1.5.4