#include <dballe/msg/datum.h>
#include <stdio.h>
Go to the source code of this file.
Data Structures | |
| struct | _dba_msg_level |
| Store an array of physical data all on the same level. More... | |
Typedefs | |
| typedef struct _dba_msg_level * | dba_msg_level |
| Store an array of physical data all on the same level. | |
Functions | |
| dba_err | dba_msg_level_create (int ltype1, int l1, int ltype2, int l2, dba_msg_level *l) |
| Create a new dba_msg_level. | |
| dba_err | dba_msg_level_copy (dba_msg_level src, dba_msg_level *dst) |
| Copy an existing level. | |
| void | dba_msg_level_delete (dba_msg_level l) |
| Delete a dba_msg_level. | |
| int | dba_msg_level_compare (const dba_msg_level l1, const dba_msg_level l2) |
| Compare two dba_msg_level strutures, for use in sorting. | |
| int | dba_msg_level_compare2 (const dba_msg_level l, int ltype1, int l1, int ltype2, int l2) |
| Compare a dba_msg_level struture with some level information, for use in sorting. | |
| dba_err | dba_msg_level_set_nocopy (dba_msg_level l, dba_var var, int pind, int p1, int p2) |
| Add a dba_var to the level, taking over its memory management. | |
| dba_msg_datum | dba_msg_level_find (dba_msg_level l, dba_varcode code, int pind, int p1, int p2) |
| Find a datum given its description. | |
| dba_msg_datum | dba_msg_level_find_by_id (dba_msg_level l, int id) |
| Find a datum given its shortcut ID. | |
| void | dba_msg_level_print (dba_msg_level l, FILE *out) |
| Dump all the contents of the level to the given stream. | |
| void | dba_msg_level_diff (dba_msg_level l1, dba_msg_level l2, int *diffs, FILE *out) |
| Print the differences between two dba_msg_level to a stream. | |
| int dba_msg_level_compare | ( | const dba_msg_level | l1, | |
| const dba_msg_level | l2 | |||
| ) |
Compare two dba_msg_level strutures, for use in sorting.
| l1 | First dba_msg_level to compare | |
| l2 | Second dba_msg_level to compare |
References _dba_msg_level::l1, _dba_msg_level::l2, _dba_msg_level::ltype1, and _dba_msg_level::ltype2.
| int dba_msg_level_compare2 | ( | const dba_msg_level | l, | |
| int | ltype1, | |||
| int | l1, | |||
| int | ltype2, | |||
| int | l2 | |||
| ) |
Compare a dba_msg_level struture with some level information, for use in sorting.
| l | First dba_msg_level to compare | |
| ltype | Type of the level. See Level type values. | |
| l1 | L1 value of the level. See Level type values. | |
| l2 | L2 value of the level. See Level type values. |
References _dba_msg_level::l1, _dba_msg_level::l2, _dba_msg_level::ltype1, and _dba_msg_level::ltype2.
| dba_err dba_msg_level_copy | ( | dba_msg_level | src, | |
| dba_msg_level * | dst | |||
| ) |
Copy an existing level.
| src | The level to copy. |
| dst | The newly created duplicate. |
References _dba_msg_level::data, _dba_msg_level::data_count, DBA_RUN_OR_GOTO, DBA_RUN_OR_RETURN, _dba_msg_level::l1, _dba_msg_level::l2, _dba_msg_level::ltype1, and _dba_msg_level::ltype2.
| dba_err dba_msg_level_create | ( | int | ltype1, | |
| int | l1, | |||
| int | ltype2, | |||
| int | l2, | |||
| dba_msg_level * | l | |||
| ) |
Create a new dba_msg_level.
| l | The newly created level. |
References _dba_msg_level::data, _dba_msg_level::data_alloc, _dba_msg_level::data_count, _dba_msg_level::l1, _dba_msg_level::l2, _dba_msg_level::ltype1, and _dba_msg_level::ltype2.
| void dba_msg_level_delete | ( | dba_msg_level | l | ) |
Delete a dba_msg_level.
| l | The level to delete. |
References _dba_msg_level::data, _dba_msg_level::data_alloc, and _dba_msg_level::data_count.
| void dba_msg_level_diff | ( | dba_msg_level | l1, | |
| dba_msg_level | l2, | |||
| int * | diffs, | |||
| FILE * | out | |||
| ) |
Print the differences between two dba_msg_level to a stream.
| l1 | First level to compare | |
| l2 | Second level to compare |
| diffs | Integer variable that will be incremented by the number of differences found. |
| out | The stream to dump a description of the differences to. |
References _dba_msg_level::data, _dba_msg_level::data_count, _dba_msg_level::l1, _dba_msg_level::l2, _dba_msg_level::ltype1, _dba_msg_level::ltype2, and _dba_msg_datum::var.
| dba_msg_datum dba_msg_level_find | ( | dba_msg_level | l, | |
| dba_varcode | code, | |||
| int | pind, | |||
| int | p1, | |||
| int | p2 | |||
| ) |
Find a datum given its description.
| l | The level to query | |
| code | The dba_varcode of the variable to query. See vartable.h | |
| pind | Time range type indicator. See Time range values. | |
| p1 | Time range P1 indicator. See Time range values. | |
| p2 | Time range P2 indicator. See Time range values. |
References _dba_msg_level::data, and _dba_msg_level::data_count.
| dba_msg_datum dba_msg_level_find_by_id | ( | dba_msg_level | l, | |
| int | id | |||
| ) |
Find a datum given its shortcut ID.
| l | The level to query | |
| id | Shortcut ID of the value to set (see vars.h) |
References _dba_msg_var::code, _dba_msg_var::p1, _dba_msg_var::p2, and _dba_msg_var::pind.
| void dba_msg_level_print | ( | dba_msg_level | l, | |
| FILE * | out | |||
| ) |
Dump all the contents of the level to the given stream.
| l | The level to dump | |
| out | The stream to dump the contents of the level to. |
References _dba_msg_level::data, _dba_msg_level::data_count, _dba_msg_level::l1, _dba_msg_level::l2, _dba_msg_level::ltype1, _dba_msg_level::ltype2, _dba_msg_datum::p1, _dba_msg_datum::p2, _dba_msg_datum::pind, and _dba_msg_datum::var.
| dba_err dba_msg_level_set_nocopy | ( | dba_msg_level | l, | |
| dba_var | var, | |||
| int | pind, | |||
| int | p1, | |||
| int | p2 | |||
| ) |
Add a dba_var to the level, taking over its memory management.
| l | The level to add the variable to. | |
| var | The variable to add. | |
| pind | Time range type indicator. See Time range values. | |
| p1 | Time range P1 indicator. See Time range values. | |
| p2 | Time range P2 indicator. See Time range values. |
References _dba_msg_level::data, _dba_msg_level::data_alloc, _dba_msg_level::data_count, DBA_RUN_OR_RETURN, and _dba_msg_datum::var.
1.5.5