Functions | |
| int | bufr_parse_out (dd *descs, int start, int end, int(*outputfkt)(varfl val, int ind), int callback_all_descs) |
| Parse data descriptors and call user defined output function for each element or for each descriptor. | |
| int | bufr_sect_1_to_file (sect_1_t *s1, char *file) |
| Writes section 1 data to an ASCII file. | |
| int | bufr_in_descsec (dd **descs, int ndescs, int desch) |
| Read descriptor section of a BUFR message from the bitsream. | |
| int | bufr_open_descsec_r (bufr_t *msg) |
| Open bitstream of section 3 for reading. | |
| void | bufr_close_descsec_r (int desch) |
| close bitstream for section 3 | |
| int | bufr_get_ndescs (bufr_t *msg) |
| Calculate number of data descriptors in a BUFR message. | |
| int bufr_parse_out | ( | dd * | descs, | |
| int | start, | |||
| int | end, | |||
| int(*)(varfl val, int ind) | outputfkt, | |||
| int | callback_all_descs | |||
| ) |
This function, derived from bufr_parse_new, parses a descriptor or a sequence of descriptors and calls the user defined function outputfkt for 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 read from the global data section bitstream (see bufr_open_datasect_r).
Optionally outputfkt is called for all descriptors including sequence descriptors, repetition descriptors, ...
| [in] | descs | Pointer to the data-descriptors. |
| [in] | start | First data-descriptor for output. |
| [in] | end | Last data-descriptor for output. |
| [in] | outputfkt | User defined output function to be called for each data-element or descriptor |
| [in] | callback_all_descs | Flag that indictes when the user-functions are to be called: 0 for normal behaviour (call outputfkt for each element descriptor and each CCITT character) 1 for extended behaviour (call outputfkt for all descriptors) |
| int bufr_sect_1_to_file | ( | sect_1_t * | s1, | |
| char * | file | |||
| ) |
This function writes section 1 data to an ASCII file
| [in] | s1 | Structure where section 1 data is stored. |
| [in] | file | Filename of the output file. |
| int bufr_in_descsec | ( | dd ** | descs, | |
| int | ndescs, | |||
| int | desch | |||
| ) |
This function reads the descriptor section of a BUFR message from the bitsream which was opened using bufr_open_descsec_r
| [in,out] | descs | Array to hold the data descriptors |
| [in] | ndescs | Number of descriptors |
| [in] | desch | Handle to the bitstream |
| int bufr_open_descsec_r | ( | bufr_t * | msg | ) |
This function opens a bitstream for reading of section 3. It must be closed by bufr_close_descsec_r.
| [in] | msg | The encoded BUFR message |
| void bufr_close_descsec_r | ( | int | desch | ) |
This functin closes the input bitstream of section 3 which was opened by bufr_open_descsec_r.
| [in] | desch | Handle to the bitstream |
| int bufr_get_ndescs | ( | bufr_t * | msg | ) |
This function calculates the number of data descriptors in a BUFR message.
| [in] | msg | The complete BUFR message |
1.5.4