Functions | |
| int | bufr_encode_sections34 (dd *descs, int ndescs, varfl *vals, bufr_t *msg) |
| Creates section 3 and 4 of BUFR message from arrays of data and data descriptors. | |
| int | bufr_encode_sections0125 (sect_1_t *s1, bufr_t *msg) |
| This function creates sections 0, 1, 2 and 5. | |
| int | bufr_write_file (bufr_t *msg, char *file) |
| This functions saves the encoded BUFR-message to a binary file. | |
This function codes data from an array data descriptors descs and an array of varfl-values vals to a data section and a data descripor section of a BUFR message. Memory for both sections is allocated in this function and must be freed by the calling functions.
| [in] | descs | Data-descriptors corresponding to vals. For each descriptor there must be a data-vaule stored in vals. descs may also include replication factors and sequence descriptors. In that case there must be a larger number of vals then of descs. |
| [in] | ndescs | Number of data descriptos contained in descs. |
| [in] | vals | Data-values to be coded in the data section. For each entry in descs there must be an entry in vals. If there are relication factors in descs, of course there must be as much vals as definded by the replication factor. |
| [out] | msg | The BUFR message where to store the coded descriptor and data sections. The memory-area for both sections is allocated by this function and must be freed by the calling function using bufr_free_data. |
This function creates sections 0, 1, 2 and 5 of a BUFR message. Memory for this section is allocated by this function and must be freed by the calling function using bufr_free_data.
The total length of the message is calculeted out of the single section length, thus sections 3 and 4 must already be present in the bufr message when calling this function. The BUFR edition is wrote into section 0 and is taken from the global _bufr_edition parameter.
If section 1 data and time parameters are set to 999 (no value), the current system time is taken for coding date and time information.
| [in] | s1 | sect_1_t structure containing section 1 data |
| [in,out] | msg | BUFR message where the sections are to be stored. Must already contain section 3 and 4. |
| int bufr_write_file | ( | bufr_t * | msg, | |
| char * | file | |||
| ) |
This function takes the encoded BUFR message and writes it to a binary file.
| [in] | msg | The complete BUFR message |
| [in] | file | The filename of the destination file |
1.5.4