54#define BUFRDECO "bufrdeco"
60#define BUFR_LEN (512000)
66#define BUFR_OBS_DATA_MASK 128
72#define BUFR_COMPRESSED_DATA_MASK 64
78#define MISSING_REAL (1.7e38)
84#define MISSING_INTEGER (2147483647)
90#define BUFR_MAXLINES_TABLEB (2048)
96#define BUFR_MAXLINES_TABLEC (8192)
103#define BUFR_MAXLINES_TABLED (8192)
110#define MAXLINES_TABLEC BUFR_MAXLINES_TABLEC
116#define BUFR_NMAXSEQ (2 * 16384)
122#define BUFR_EXPLAINED_LENGTH (512)
128#define CSV_MAXL (2048)
134#define NMAXSEQ_DESCRIPTORS (256)
140#define DESCRIPTOR_VALUE_MISSING (1)
146#define DESCRIPTOR_HAVE_REAL_VALUE (2)
152#define DESCRIPTOR_HAVE_STRING_VALUE (4)
158#define DESCRIPTOR_IS_CODE_TABLE (8)
164#define DESCRIPTOR_HAVE_CODE_TABLE_STRING (16)
170#define DESCRIPTOR_HAVE_FLAG_TABLE_STRING (32)
176#define DESCRIPTOR_IS_FLAG_TABLE (64)
182#define DESCRIPTOR_IS_A_REPLICATOR (128)
188#define DESCRIPTOR_IS_AN_OPERATOR (256)
194#define DESCRIPTOR_IS_LOCAL (512)
200#define BUFR_LEN_SEC1 (8192)
206#define BUFR_LEN_SEC2 (8192)
213#define BUFR_LEN_UNEXPANDED_DESCRIPTOR (512)
220#define BUFR_MAX_EXPANDED_SEQUENCES (128)
226#define BUFR_MAX_QUALITY_DATA (8)
232#define BUFR_MAX_BITMAP_PRESENT_DATA (4096)
238#define BUFR_MAX_BITMAPS (8)
244#define BUFR_MAX_SUBSETS (2048)
250#define BUFR_LEN_SEC3 (8 + 2 * BUFR_LEN_UNEXPANDED_DESCRIPTOR)
256#define BUFRDECO_OUTPUT_HTML (1)
262#define BUFRDECO_OUTPUT_XML (2)
268#define BUFRDECO_USE_TABLES_CACHE (4)
275#define BUFRDECO_OUTPUT_JSON_SEC0 (8)
281#define BUFRDECO_OUTPUT_JSON_SEC1 (16)
287#define BUFRDECO_OUTPUT_JSON_SEC2 (32)
293#define BUFRDECO_OUTPUT_JSON_SEC3 (64)
299#define BUFRDECO_OUTPUT_JSON_SUBSET_DATA (128)
305#define BUFRDECO_OUTPUT_JSON_EXPANDED_TREE (256)
311#define BUFRDECO_OUTPUT_JSON (BUFRDECO_OUTPUT_JSON_SEC0 | BUFRDECO_OUTPUT_JSON_SEC1 | BUFRDECO_OUTPUT_JSON_SEC2 | BUFRDECO_OUTPUT_JSON_SEC3 )
317#define BUFR_TABLEB_NAME_LENGTH (128)
323#define BUFR_TABLEB_UNIT_LENGTH (64)
329#define BUFR_CVAL_LENGTH (128)
335#define BUFRDECO_PATH_LENGTH (256)
341#define BUFRDECO_TABLES_CACHE_SIZE (16)
358#define strcpy_safe(_target_,_src_) {\
359 strncpy(_target_,_src_,(sizeof(_target_) - 1)); \
360 _target_[sizeof(_target_) - 1] = '\0';}
366#define strncpy_safe(_target_,_src_,_dim_) {\
367 strncpy(_target_, _src_, _dim_ - 1); \
368 _target_[_dim_ - 1] = '\0';}
374#define bufrdeco_assert(__my_expr__) \
375 if ( !(__my_expr__)) {\
376 fprintf(stderr, "%s: %s():%d -> ***The expression (%s) is false***\n", \
377 basename(__FILE__), __func__, __LINE__, #__my_expr__) ; \
378 exit (EXIT_FAILURE);\
385#define bufrdeco_assert_with_return_val(__my_expr__, __returnval__) \
386 if ( !(__my_expr__)) {\
387 fprintf(stderr, "%s: %s():%d -> ***The expression (%s) is false***\n", \
388 basename(__FILE__), __func__, __LINE__, #__my_expr__) ; \
389 return (__returnval__);\
397# define print_timing(__clk_start, __clk_end,__explanation) \
398 printf ("# %.6lf s <- Elapsed time for %s\n", (double)(__clk_end - __clk_start)/(double)(CLOCKS_PER_SEC), #__explanation)
400extern clock_t bufrdeco_clock_start, bufrdeco_clock_end;
605#define BUFRDECO_COMPRESSED_REF_SEQUENCE_INIT_BITMASK (1)
611#define BUFRDECO_COMPRESSED_REF_DATA_DESCRIPTOR_BITMASK (2)
617#define BUFRDECO_COMPRESSED_REF_OPERATOR_DESCRIPTOR (4)
623#define BUFRDECO_COMPRESSED_REF_REPLICATOR_DESCRIPTOR (8)
629#define BUFRDECO_COMPRESSED_REF_SEQUENCE_FINAL_BITMASK (16)
997char *
bufrdeco_get_version (
char *version,
size_t dversion,
char *build,
size_t dbuild,
char *builder,
size_t dbuilder,
998 int *version_major,
int *version_minor,
int *version_patch );
1130 uint64_t ival, uint8_t nbits );
1134 uint64_t ival, uint8_t nbits );
buf_t bufrdeco_print_json_subset_data_prologue(FILE *out, struct bufrdeco *b)
buf_t bufrdeco_print_json_sec2(FILE *out, struct bufrdeco *b)
Print info form optional sec 2 in json format.
int bufrdeco_init_tables(struct bufr_tables **t)
Init a struct bufr_tables allocating space.
int bufrdeco_fprint_subset_sequence_data(FILE *f, struct bufrdeco_subset_sequence_data *s)
uint32_t buf_t
Type to set offsets and dimension of arrays or counters used in bufrdeco.
uint32_t two_bytes_to_uint32(const uint8_t *source)
returns the uint32_t value from an array of two bytes, most significant first
struct bufrdeco_subset_sequence_data * bufrdeco_get_subset_sequence_data(struct bufrdeco *b)
Parse and get a struct bufrdeco_subset_sequence_data.
int bufrdeco_clean_bitmaps(struct bufrdeco *b)
Clean all allocated bitmaps, but still is in memory.
int bufrdeco_init_subset_sequence_data(struct bufrdeco_subset_sequence_data *ba)
Init a struct bufrdeco_subset_sequence_data.
int bufrdeco_decode_replicated_subsequence_compressed(struct bufrdeco_compressed_data_references *r, struct bufr_replicator *rep, struct bufrdeco *b)
decodes a repicated subsequence
int bufrdeco_free_subset_sequence_data(struct bufrdeco_subset_sequence_data *ba)
Free the memory for sequence array in a struct bufrdeco_subset_sequence_data.
buf_t bufrdeco_print_json_separator(FILE *out)
Print the comma ',' separator in an output.
uint32_t three_bytes_to_uint32(const uint8_t *source)
returns the uint32_t value from an array of three bytes, most significant first
#define BUFR_EXPLAINED_LENGTH
Maximum length for a explained descriptor string.
int get_table_b_reference_from_uint32_t(int32_t *target, uint8_t bits, uint32_t source)
Get an int32_t from bits according with bufr criteria to change the reference of a descritor....
int bufrdeco_init_expanded_tree(struct bufrdeco_expanded_tree **t)
Init a struct bufrdeco_expanded_tree allocating space.
int fprint_bufrdeco_compressed_ref(FILE *f, struct bufrdeco_compressed_ref *r)
prints a struct bufrdeco_compressed_ref
int uint32_t_to_descriptor(struct bufr_descriptor *d, uint32_t id)
parse an integer with a descriptor fom bufr ECWMF libary
int bufr_read_tableC(struct bufrdeco *b)
Reads a file with table C content (Code table and bit flags) according with csv WMO format.
int is_a_local_descriptor(struct bufr_descriptor *d)
check if a descriptor is a local descriptor
const char DEFAULT_BUFRTABLES_WMO_CSV_DIR2[]
int bufrdeco_print_subset_sequence_data(struct bufrdeco_subset_sequence_data *s)
Prints a struct bufrdeco_subset_sequence_data.
char * bufrdeco_explained_table_val(char *expl, size_t dim, struct bufr_tableC *tc, uint32_t *index, struct bufr_descriptor *d, uint32_t ival)
int bufr_find_tableB_index(buf_t *index, struct bufr_tableB *tb, const char *key)
found a descriptor index in a struct bufr_tableB
#define BUFR_CVAL_LENGTH
Max length (in chars) of a cval in a bufr_atom_data.
int bufrdeco_free_tables(struct bufr_tables **t)
Frees the allocated space for a struct bufr_tables.
int bufrdeco_add_to_bitmap(struct bufrdeco_bitmap *bm, buf_t index_to, buf_t index_by)
Push a bitmap element in a bufrdeco_bitmap.
int bufrdeco_parse_f2_descriptor(struct bufrdeco_subset_sequence_data *s, struct bufr_descriptor *d, struct bufrdeco *b)
parse a descritor with f = 2
int bufrdeco_reset(struct bufrdeco *b)
Reset an struct bufrdeco. This is needed when changing to another bufr.
int32_t ibuf_t
Type to set offsets and dimension of arrays or counters used in bufrdeco.
int sprint_sec0_info_html(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec0 in html format.
#define BUFRDECO_TABLES_CACHE_SIZE
Max number of structs bufr_tables in a bufr_tables_cache.
buf_t bufrdeco_print_json_object_operator_descriptor(FILE *out, struct bufr_descriptor *d, char *aux)
print an operator desciptor as a json object
int bufr_write_subset_offset_bits(FILE *f, struct bufrdeco_subset_bit_offsets *off)
Write offset bit array for subsets in a non-compressed bufr.
int bufrdeco_allocate_bitmap(struct bufrdeco *b)
allocate bitmap
int sprint_sec4_info(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec4.
const char DEFAULT_BUFRTABLES_ECMWF_DIR2[]
#define BUFR_MAXLINES_TABLEB
The maximum expected lines in a Table B file.
int sprint_sec3_info(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec3.
#define BUFR_MAX_QUALITY_DATA
Max amount of quality data which is maped by a struct bufrdeco_bitmap element.
uint32_t get_bits_as_char_array(char *target, uint8_t *has_data, uint8_t *source, buf_t *bit0_offset, buf_t bit_length)
int bufrdeco_get_bufr(struct bufrdeco *b, char *filename)
Read file and try to find a bufr report inserted in. Once found do the same that bufrdeco_read_bufr()
int bufrdeco_read_buffer(struct bufrdeco *b, uint8_t *bufrx, buf_t size)
int fprint_bufrdeco_compressed_data_references(FILE *f, struct bufrdeco_compressed_data_references *r)
int print_bufrdeco_compressed_ref(struct bufrdeco_compressed_ref *r)
prints a struct bufrdeco_compressed_ref
char * bufr_charray_to_string(char *s, char *buf, size_t size)
get a null termitated c-string from an array of unsigned chars
char * get_formatted_value_from_escale2(char *fmt, size_t dim, int32_t escale, double val)
gets a string with formatted value depending of scale
int bufr_read_tableD(struct bufrdeco *b)
Reads a file with table D content according with WMO csv format.
int sprint_sec1_info_html(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec1.
buf_t bufrdeco_print_json_sequence_descriptor_final(FILE *out)
char * bufrdeco_explained_flag_val(char *expl, size_t dim, struct bufr_tableC *tc, struct bufr_descriptor *d, uint64_t ival, uint8_t nbits)
#define BUFR_MAXLINES_TABLEC
The maximum expected lines in a Table C file.
buf_t bufrdeco_print_json_object_replicator_descriptor(FILE *out, struct bufr_descriptor *d, char *aux)
print an operator desciptor as a json object
int bufrdeco_set_out_stream(FILE *out, struct bufrdeco *b)
Set the library normal output stream.
#define BUFR_MAX_EXPANDED_SEQUENCES
Max amount of unexpanded sequences in a struct bufrdeco_expanded_tree.
int bufrdeco_free_cache_tables(struct bufr_tables_cache *c)
deallocate and clean a bufr_tables_cache
int bufrdeco_get_atom_data_from_compressed_data_ref(struct bufr_atom_data *a, struct bufrdeco_compressed_ref *r, buf_t subset, struct bufrdeco *b)
Get atom data from a descriptor for a given subset.
buf_t bufrdeco_print_json_tree(struct bufrdeco *b)
#define BUFR_LEN_SEC3
Max length in bytes for a sec3.
int bufrdeco_free_bitmap_array(struct bufrdeco_bitmap_array *a)
Free an allocated bitmap array.
char * bufrdeco_explained_table_csv_val(char *expl, size_t dim, struct bufr_tableC *tc, uint32_t *index, struct bufr_descriptor *d, uint32_t ival)
int sprint_sec1_info(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec1.
buf_t bufrdeco_print_json_sec0(FILE *out, struct bufrdeco *b)
int bufr_read_subset_offset_bits(FILE *f, struct bufrdeco_subset_bit_offsets *off)
Write offset bit array for subsets in a non-compressed bufr.
int bufrdeco_init_compressed_data_references(struct bufrdeco_compressed_data_references *rf)
Init a struct bufrdeco_compressed_data_references.
int bufr_read_tables(struct bufrdeco *b)
Read the tables according with bufr file data from a bufr table directory.
int print_sec0_info(struct bufrdeco *b)
Prints info from sec0.
int bufrdeco_print_atom_data_stdout(struct bufr_atom_data *a)
print the data in a struct bufr_atom_data to stdout
int bufrdeco_set_tables_dir(struct bufrdeco *b, char *tables_dir)
Sets the directory path for BUFR tables. Needed if it is not any default directories.
int print_bufrdeco_compressed_data_references(struct bufrdeco_compressed_data_references *r)
prints a struct bufrdeco_compressed_references
int bufrdeco_parse_tree_recursive(struct bufrdeco *b, struct bufr_sequence *father, buf_t father_idesc, const char *key)
Parse the descriptor tree in a recursive way.
buf_t bufrdeco_print_json_sequence_descriptor_header(FILE *out, struct bufr_sequence *seq)
Print the header of a sequence descriptor (f == 3)
int get_wmo_tablenames(struct bufrdeco *b)
Get the complete pathnames for WMO csv table files needed by a bufr message.
int sprint_sec0_info(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec0.
char * get_formatted_value_from_escale(char *fmt, size_t dim, int32_t escale, double val)
gets a string with formatted value depending of scale
int bufrdeco_fprint_subset_sequence_data_html(FILE *f, struct bufrdeco_subset_sequence_data *s)
#define BUFRDECO_PATH_LENGTH
Length for files/directory path strings.
int bufrdeco_close(struct bufrdeco *b)
Free all allocated memory. Needed when no more task to do with bufrdeco library.
int sprint_sec4_info_html(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec4.
int bufrdeco_substitute_tables(struct bufr_tables **replaced, struct bufr_tables *source, struct bufrdeco *b)
substitute an struct bufr_tables into a struct bufrdeco
#define BUFR_MAX_BITMAPS
Max number of structs bufrdeco_bitmap that can be allocated in a struct bufrdeco_bitmap_array.
char * bufrdeco_explained_flag_csv_val(char *expl, size_t dim, struct bufr_tableC *tc, struct bufr_descriptor *d, uint64_t ival, uint8_t nbits)
int bufrdeco_set_err_stream(FILE *err, struct bufrdeco *b)
Set the error stream.
int parse_csv_line(int *nt, char *tk[], char *lin)
Parse a csv line.
int bufrdeco_parse_f2_compressed(struct bufrdeco_compressed_data_references *r, struct bufr_descriptor *d, struct bufrdeco *b)
parse a descritor with f = 2 in case of compressed bufr
char * bufrdeco_print_atom_data_html(char *target, size_t lmax, struct bufr_atom_data *a, uint32_t ss)
print the data in a struct bufr_atom_data to a string as cells of table rows
int bufrdeco_store_tables(struct bufr_tables **t, struct bufr_tables_cache *c, uint8_t ver)
Init an element of array c->tab[] if still not allocated. If allocated clean it and set *t pointing t...
char * csv_quoted_string(char *out, char *in)
Transform a string to a quoted string to be inserted in a csv file.
int bufrdeco_tableB_compressed(struct bufrdeco_compressed_ref *r, struct bufrdeco *b, struct bufr_descriptor *d, int mode)
get data from table B when parsing compressed data references
char * bufrdeco_get_version(char *version, size_t dversion, char *build, size_t dbuild, char *builder, size_t dbuilder, int *version_major, int *version_minor, int *version_patch)
#define BUFR_LEN_SEC1
Max length in bytes for a sec1.
#define BUFR_LEN_UNEXPANDED_DESCRIPTOR
Max amount of unexpanded descriptors in a SEC3.
#define BUFR_MAX_BITMAP_PRESENT_DATA
Max number of data present in a bitmap definition.
buf_t bufrdeco_print_json_sec3(FILE *out, struct bufrdeco *b)
Print info form sec 3 in json format.
const char DEFAULT_BUFRTABLES_WMO_CSV_DIR1[]
#define BUFR_MAX_SUBSETS
Max number of subsets in the array off bitoffset subset marks the bufrdeco library can manage.
uint32_t get_bits_as_uint32_t(uint32_t *target, uint8_t *has_data, uint8_t *source, buf_t *bit0_offset, buf_t bit_length)
int bufrdeco_increase_data_array(struct bufrdeco_subset_sequence_data *s)
doubles the allocated space for a struct bufrdeco_subset_sequence_data whenever is posible
buf_t bufrdeco_print_json_subset_data_epilogue(FILE *out)
int bufrdeco_free_expanded_tree(struct bufrdeco_expanded_tree **t)
Frees the allocated space for a struct bufrdeco_expanded_tree.
#define BUFR_TABLEB_UNIT_LENGTH
int bufrdeco_fprint_tree(FILE *f, struct bufrdeco *b)
Print a tree of descriptors.
int print_sec3_info(struct bufrdeco *b)
Prints info from sec3.
#define BUFR_MAXLINES_TABLED
The maximum expected lines in a Table D file.
int bufr_find_tableC_csv_index(buf_t *index, struct bufr_tableC *tc, const char *key, uint32_t code)
int bufrdeco_parse_compressed(struct bufrdeco_compressed_data_references *r, struct bufrdeco *b)
Preliminary parse of a compressed data bufr.
const char DEFAULT_BUFRTABLES_ECMWF_DIR1[]
int is_a_delayed_descriptor(struct bufr_descriptor *d)
check if a descriptor is a delayed descriptor
int bufrdeco_parse_compressed_recursive(struct bufrdeco_compressed_data_references *r, struct bufr_sequence *l, struct bufrdeco *b)
Parse recursively the compressed data in a bufr report to get references where to get data for every ...
char * bufrdeco_print_atom_data(char *target, size_t lmax, struct bufr_atom_data *a)
print the data in a struct bufr_atom_data to a string
int bufrdeco_clean_subset_sequence_data(struct bufrdeco_subset_sequence_data *ba)
Cleans a struct bufrdeco_subset_sequence_data.
int bufrdeco_increase_compressed_data_references_count(struct bufrdeco_compressed_data_references *r, struct bufrdeco *b)
Increment the count of a struct bufrdeco_compressed_data_references.
int sprint_sec3_info_html(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec3 formatted as html.
int bufrdeco_cache_tables_search(struct bufr_tables_cache *c, uint8_t ver)
Search a struct bufr_tables in bufr_tables_cache.
int bufrdeco_print_subset_sequence_data_tagged_html(struct bufrdeco_subset_sequence_data *s, char *id)
int bufrdeco_tableB_val(struct bufr_atom_data *a, struct bufrdeco *b, struct bufr_descriptor *d)
Get data from a table B descriptor.
#define BUFR_LEN
Max length of a BUFR file.
const int32_t pow10pos_int[10]
int bufr_decode_subset_data_compressed(struct bufrdeco_subset_sequence_data *s, struct bufrdeco_compressed_data_references *r, struct bufrdeco *b)
Get data for a given subset in a compressed data bufr.
int bufrdeco_extract_bufr(struct bufrdeco *b, char *filename)
Read file and try to find a bufr report inserted in. Once found do the same that bufrdeco_read_file()
#define BUFR_TABLEB_NAME_LENGTH
Max length (in chars) reserved for a name of variable in table B.
buf_t bufrdeco_print_json_object_atom_data(FILE *out, struct bufr_atom_data *a, char *aux)
Print an json object with a descriptor data.
#define NMAXSEQ_DESCRIPTORS
Maximum nuber of unexpanded descriptors in a struct bufr_sequence.
int bufrdeco_decode_subset_data_recursive(struct bufrdeco_subset_sequence_data *d, struct bufr_sequence *l, struct bufrdeco *b)
decode the data from a subset in a recursive way
int bufrdeco_print_tree(struct bufrdeco *b)
Print a tree of descriptors.
buf_t bufrdeco_print_json_scape_string_cvals(FILE *out, char *source)
prints a descriptor string value scaping the '"' for a json format
int bufrdeco_free_compressed_data_references(struct bufrdeco_compressed_data_references *rf)
Free the memory allocated for array of references in a struct bufrdeco_compressed_data_references.
int bufrdeco_decode_replicated_subsequence(struct bufrdeco_subset_sequence_data *d, struct bufr_replicator *r, struct bufrdeco *b)
Decodes a replicated sequence.
int bufrdeco_write_subset_offset_bits(struct bufrdeco *b, char *filename)
Write offset bit array for subsets in a non-compressed bufr.
buf_t bufrdeco_print_json_sec1(FILE *out, struct bufrdeco *b)
Print info form sec 1 in json format.
int bufrdeco_parse_tree(struct bufrdeco *b)
Parse the tree of descriptors without expand the replicators.
int bufrdeco_read_subset_offset_bits(struct bufrdeco *b, char *filename)
Write offset bit array for subsets in a non-compressed bufr.
int bufr_read_tableB(struct bufrdeco *b)
char * bufr_adjust_string(char *s)
Supress trailing blanks of a string.
int print_sec4_info(struct bufrdeco *b)
Prints info from sec3.
int bufrdeco_decode_data_subset(struct bufrdeco *b)
User interface to decode a BUFR subset.
int bufrdeco_read_bufr(struct bufrdeco *b, char *filename)
Read bufr file and does preliminary and first decode pass.
int two_bytes_to_descriptor(struct bufr_descriptor *d, const uint8_t *source)
set a struct bufr_descriptor from two consecutive bytes in bufr file
int bufrdeco_print_atom_data_file(FILE *f, struct bufr_atom_data *a)
print the data in a struct bufr_atom_data to a file already open by caller
struct bufrdeco_subset_sequence_data * bufrdeco_get_target_subset_sequence_data(buf_t nset, struct bufrdeco *b)
Prepare the struct bufrdeco to get data from the solicited subset.
int is_a_short_delayed_descriptor(struct bufr_descriptor *d)
check if a descriptor is a short delayed descriptor
int bufrdeco_print_subset_sequence_data_html(struct bufrdeco_subset_sequence_data *s)
char * bufrdeco_get_f2_descriptor_explanation(char *e, size_t dim, struct bufr_descriptor *d)
int bufrdeco_tableD_get_descriptors_array(struct bufr_sequence *s, struct bufrdeco *b, const char *key)
get the descriptors array for a descriptor sequence defined in table D with F = 3
#define BUFR_LEN_SEC2
Max length in bytes for a sec2.
int bufrdeco_init(struct bufrdeco *b)
Inits and allocate memory for a struct bufrdeco.
int print_sec1_info(struct bufrdeco *b)
Prints info from sec1.
buf_t bufrdeco_print_json_tree_recursive(FILE *out, struct bufrdeco *b, struct bufr_sequence *seq)
Print a tree of descriptors to a file in a recursive way in json format.
int bufrdeco_fprint_subset_sequence_data_tagged_html(FILE *f, struct bufrdeco_subset_sequence_data *s, char *id)
Contains all the information for a single data related with a descriptor in a expanded squence.
char name[BUFR_TABLEB_NAME_LENGTH]
char ctable[BUFR_EXPLAINED_LENGTH]
struct bufr_descriptor desc
char unit[BUFR_TABLEB_UNIT_LENGTH]
char cval[BUFR_CVAL_LENGTH]
struct bufr_sequence * seq
store the information when parsing related to replicators
Store de parsed section 0.
Store de parsed section 1 of a bufr file.
uint8_t subcategory_local
uint8_t raw[BUFR_LEN_SEC1]
Store a parsed sec2 from a bufr file including rawdata.
uint8_t raw[BUFR_LEN_SEC2]
Store a parsed sec3 from a bufr file including rawdata.
struct bufr_descriptor unexpanded[BUFR_LEN_UNEXPANDED_DESCRIPTOR]
uint8_t raw[BUFR_LEN_SEC3]
Store a parsed sec4 from a bufr file including rawdata.
range of indexes in a struct bufr_sequence where a condition must me chequed or marked,...
Stores an unexpanded sequence of descriptors.
struct bufr_sequence_index_range cond_event
struct bufr_descriptor lseq[NMAXSEQ_DESCRIPTORS]
struct bufr_sequence_index_range no_data_present
struct bufr_sequence * father
struct bufr_sequence_index_range event
uint8_t replicated[NMAXSEQ_DESCRIPTORS]
struct bufr_sequence * sons[NMAXSEQ_DESCRIPTORS]
struct bufr_sequence_index_range cat_forecast
char name[BUFR_EXPLAINED_LENGTH]
Store parameters for a descriptor in table b, i. e. with f = 0.
char unit[BUFR_TABLEB_UNIT_LENGTH]
char name[BUFR_TABLEB_NAME_LENGTH]
Store a table B readed from a file formated and named as ECMWF bufrdc package.
struct bufr_tableB_decoded_item item[BUFR_MAXLINES_TABLEB]
char old_path[BUFRDECO_PATH_LENGTH]
char path[BUFRDECO_PATH_LENGTH]
Store parameters for a descriptor in table C, i. e. for Table code and flags Remember this is NOT the...
char description[BUFR_EXPLAINED_LENGTH]
Store a table C readed from a file formated and named as ECMWF bufrdc package.
struct bufr_tableC_decoded_item item[BUFR_MAXLINES_TABLEC]
char path[BUFRDECO_PATH_LENGTH]
char old_path[BUFRDECO_PATH_LENGTH]
Store parameters for a line in table D (sequence of descritors)
char description2[BUFR_EXPLAINED_LENGTH]
char description[BUFR_EXPLAINED_LENGTH]
Store a table D readed from a file formated and named as ECMWF bufrdc package.
char l[BUFR_MAXLINES_TABLED][24]
char path[BUFRDECO_PATH_LENGTH]
char old_path[BUFRDECO_PATH_LENGTH]
struct bufr_tableD_decoded_item item[BUFR_MAXLINES_TABLED]
Struct to store the cache of structs bufr_tables.
int8_t ver[BUFRDECO_TABLES_CACHE_SIZE]
struct bufr_tables * tab[BUFRDECO_TABLES_CACHE_SIZE]
Contains all tables needed to parse a bufr file.
Stores all structs bufrdeco_bitmap for a bufr bitmap.
struct bufrdeco_bitmap * bmap[BUFR_MAX_BITMAPS]
Stores all needed data for a bufr bitmap.
buf_t bitmaped_by[BUFR_MAX_BITMAP_PRESENT_DATA]
buf_t dstat_desc[BUFR_MAX_QUALITY_DATA]
buf_t stat1_desc[BUFR_MAX_QUALITY_DATA]
buf_t dstat[BUFR_MAX_QUALITY_DATA]
buf_t stat1[BUFR_MAX_QUALITY_DATA]
buf_t quality[BUFR_MAX_QUALITY_DATA]
buf_t bitmap_to[BUFR_MAX_BITMAP_PRESENT_DATA]
Manage an array of structs bufrdeco_compressed_ref.
struct bufrdeco_compressed_ref * refs
Struct to hold the needed reference bit offsets, descriptor tree and replications in a compressed BUF...
char unit[BUFR_TABLEB_UNIT_LENGTH]
char name[BUFR_TABLEB_NAME_LENGTH]
struct bufr_descriptor * desc
struct bufr_sequence * seq
stores the state when expanding a sequence.
uint8_t changing_reference
uint8_t local_bit_reserved
buf_t data_repetition_factor
struct bufrdeco_bitmap * bitmap
Array of structs bufr_sequence from which bufr expanded tree is made.
struct bufr_sequence seq[BUFR_MAX_EXPANDED_SEQUENCES]
Array of offset in bits for every subset in a non-compressed bufr. Offset is counted in bits from the...
buf_t ofs[BUFR_MAX_SUBSETS]
Contains all the information for a subset in a expanded squence This is a version to use with bufrdec...
struct bufr_atom_data * sequence
This struct contains all needed data to parse and decode a BUFR file.
struct bufrdeco_bitmap_array bitmap
struct bufrdeco_subset_sequence_data seq
struct bufr_tables_cache cache
struct bufrdeco_compressed_data_references refs
struct bufrdeco_subset_bit_offsets offsets
struct bufrdeco_decoding_data_state state
struct bufr_tables * tables
char bufrtables_dir[BUFRDECO_PATH_LENGTH]
struct bufrdeco_expanded_tree * tree
struct bufrdeco_bitmap_related_vars brv