#include <dballe/core/var.h>
#include <dballe/core/rawmsg.h>
#include <dballe/bufrex/dtable.h>
#include <dballe/bufrex/subset.h>
Go to the source code of this file.
Data Structures | |
| struct | _bufrex_bufr_options |
| BUFR-specific encoding options. More... | |
| struct | _bufrex_crex_options |
| CREX-specific encoding options. More... | |
| struct | _bufrex_msg |
| Storage for the decoded data of a BUFR or CREX message. More... | |
Typedefs | |
| typedef enum _bufrex_type | bufrex_type |
| Encoding type (BUFR or CREX). | |
| typedef _bufrex_msg * | bufrex_msg |
| Storage for the decoded data of a BUFR or CREX message. | |
Enumerations | |
| enum | _bufrex_type { BUFREX_BUFR, BUFREX_CREX } |
| Encoding type (BUFR or CREX). More... | |
Functions | |
| dba_err | bufrex_msg_create (bufrex_type type, bufrex_msg *msg) |
| Create a bufrex_msg. | |
| void | bufrex_msg_delete (bufrex_msg msg) |
| Delete a bufrex_msg. | |
| void | bufrex_msg_reset (bufrex_msg msg) |
| Delete all the contents of a bufrex_msg. | |
| dba_err | bufrex_msg_get_subset (bufrex_msg msg, int subsection, bufrex_subset *vars) |
| Get a dba_subset item from the message. | |
| dba_err | bufrex_msg_get_table_id (bufrex_msg msg, const char **id) |
| Get the ID of the table used by this bufrex_msg. | |
| dba_err | bufrex_msg_load_tables (bufrex_msg msg) |
| Load a new set of tables to use for encoding this message. | |
| dba_err | bufrex_msg_query_btable (bufrex_msg msg, dba_varcode code, dba_varinfo *info) |
| Query the WMO B table used for this BUFR/CREX data. | |
| dba_err | bufrex_msg_query_dtable (bufrex_msg msg, dba_varcode code, struct _bufrex_opcode **res) |
| Query the WMO D table used for this BUFR/CREX data. | |
| void | bufrex_msg_reset_datadesc (bufrex_msg msg) |
| Reset the data descriptor section for the message. | |
| dba_err | bufrex_msg_get_datadesc (bufrex_msg msg, struct _bufrex_opcode **res) |
| Get the data descriptor section of this bufrex_msg. | |
| dba_err | bufrex_msg_append_datadesc (bufrex_msg msg, dba_varcode varcode) |
| Append one dba_varcode to the data descriptor section of the message. | |
| dba_err | bufrex_msg_generate_datadesc (bufrex_msg msg) |
| Try to generate a data description section by scanning the variable codes of the variables in the first data subset. | |
| dba_err | bufrex_msg_decode (bufrex_msg msg, dba_rawmsg raw) |
| Parse an encoded message into a bufrex_msg. | |
| dba_err | bufrex_msg_encode (bufrex_msg msg, dba_rawmsg *raw) |
| Encode the contents of the bufrex_msg. | |
| dba_err | bufr_encoder_encode (bufrex_msg in, dba_rawmsg out) |
| Encode a BUFR message. | |
| dba_err | bufr_decoder_decode (dba_rawmsg in, bufrex_msg out) |
| Decode a BUFR message. | |
| dba_err | crex_encoder_encode (bufrex_msg in, dba_rawmsg out) |
| Encode a CREX message. | |
| dba_err | crex_decoder_decode (dba_rawmsg in, bufrex_msg out) |
| Decode a CREX message. | |
| void | bufrex_msg_print (bufrex_msg msg, FILE *out) |
| Dump the contents of this bufrex_msg. | |
| void | bufrex_msg_diff (bufrex_msg msg1, bufrex_msg msg2, int *diffs, FILE *out) |
| Compute the differences between two bufrex_msg. | |
| enum _bufrex_type |
| dba_err bufr_decoder_decode | ( | dba_rawmsg | in, | |
| bufrex_msg | out | |||
| ) |
Decode a BUFR message.
| in | The dba_msgraw with the data to decode | |
| out | The bufrex_msg that will hold the decoded data |
| opt | A newly created bufr_options with informations about the decoding process. If NULL is passed, nothing will be returned. If a bufr_options is returned, it will need to be deleted with bufr_options_delete(). |
| dba_err bufr_encoder_encode | ( | bufrex_msg | in, | |
| dba_rawmsg | out | |||
| ) |
Encode a BUFR message.
| in | The bufrex_msg with the data to encode | |
| out | The dba_rawmsg that will hold the encoded data |
| dba_err bufrex_msg_append_datadesc | ( | bufrex_msg | msg, | |
| dba_varcode | varcode | |||
| ) |
Append one dba_varcode to the data descriptor section of the message.
| msg | The message to act on | |
| varcode | The dba_varcode to append. See vartable.h |
| dba_err bufrex_msg_create | ( | bufrex_type | type, | |
| bufrex_msg * | msg | |||
| ) |
Create a bufrex_msg.
| type | Message type (BUFR or CREX) |
| msg | Newly created bufrex_msg |
| void bufrex_msg_delete | ( | bufrex_msg | msg | ) |
Delete a bufrex_msg.
| msg | The bufrex_msg to delete |
| dba_err bufrex_msg_generate_datadesc | ( | bufrex_msg | msg | ) |
Try to generate a data description section by scanning the variable codes of the variables in the first data subset.
| msg | The message to act on |
| dba_err bufrex_msg_get_datadesc | ( | bufrex_msg | msg, | |
| struct _bufrex_opcode ** | res | |||
| ) |
Get the data descriptor section of this bufrex_msg.
| msg | The message to act on |
| res | A copy of the internal list of data descriptors for the data descriptor section. It must be deallocated by the caller using bufrex_opcode_delete() |
| dba_err bufrex_msg_get_subset | ( | bufrex_msg | msg, | |
| int | subsection, | |||
| bufrex_subset * | vars | |||
| ) |
Get a dba_subset item from the message.
The subset will be created if it does not exist.
| msg | The bufrex_msg to query | |
| subsection | The subsection index (starting from 0) |
| vars | The subsection requested. It can be newly created if the message did not contain such a subsection before, but memory management is handled by the bufrex_msg structure. |
| dba_err bufrex_msg_get_table_id | ( | bufrex_msg | msg, | |
| const char ** | id | |||
| ) |
Get the ID of the table used by this bufrex_msg.
| id | The table id, as a pointer to an internal string. It must not be deallocated by the caller. It is set to NULL when no table has been set. |
| dba_err bufrex_msg_query_btable | ( | bufrex_msg | msg, | |
| dba_varcode | code, | |||
| dba_varinfo * | info | |||
| ) |
Query the WMO B table used for this BUFR/CREX data.
| msg | bufrex_msg to query | |
| code | code of the variable to query. See vartable.h |
| info | the dba_varinfo structure with the results of the query. The returned dba_varinfo needs to be deallocated using dba_varinfo_delete() |
| dba_err bufrex_msg_query_dtable | ( | bufrex_msg | msg, | |
| dba_varcode | code, | |||
| struct _bufrex_opcode ** | res | |||
| ) |
Query the WMO D table used for this BUFR/CREX data.
| msg | bufrex_msg to query | |
| code | code of the entry to query. See vartable.h | |
| res | the bufrex_opcode chain that contains the expansion elements (must be deallocated by the caller using bufrex_opcode_delete) |
| void bufrex_msg_reset | ( | bufrex_msg | msg | ) |
Delete all the contents of a bufrex_msg.
This can be used to reuse the structure to encode/decode more than one message.
| msg | The bufrex_msg to reset |
| void bufrex_msg_reset_datadesc | ( | bufrex_msg | msg | ) |
Reset the data descriptor section for the message.
| msg | The message to act on |
| dba_err crex_decoder_decode | ( | dba_rawmsg | in, | |
| bufrex_msg | out | |||
| ) |
Decode a CREX message.
| in | The dba_msgraw with the data to decode | |
| out | The bufrex_msg that will hold the decoded data |
| opt | A newly created bufr_options with informations about the decoding process. If NULL is passed, nothing will be returned. If a bufr_options is returned, it will need to be deleted with bufr_options_delete(). |
| dba_err crex_encoder_encode | ( | bufrex_msg | in, | |
| dba_rawmsg | out | |||
| ) |
Encode a CREX message.
| in | The bufrex_msg with the data to encode | |
| out | The dba_rawmsg that will hold the encoded data |
1.5.2