bufr2synop 0.24.0
|
This file has the code which extract data from a bufr. More...
#include "bufrdeco.h"
Go to the source code of this file.
Functions | |
struct bufrdeco_subset_sequence_data * | bufrdeco_get_subset_sequence_data (struct bufrdeco *b) |
Parse and get a struct bufrdeco_subset_sequence_data. More... | |
int | bufrdeco_decode_data_subset (struct bufrdeco *b) |
User interface to decode a BUFR subset. More... | |
int | bufrdeco_increase_data_array (struct bufrdeco_subset_sequence_data *d) |
doubles the allocated space for a struct bufrdeco_subset_sequence_data whenever is posible More... | |
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 More... | |
int | bufrdeco_decode_replicated_subsequence (struct bufrdeco_subset_sequence_data *d, struct bufr_replicator *r, struct bufrdeco *b) |
Decodes a replicated sequence. More... | |
This file has the code which extract data from a bufr.
Definition in file bufrdeco_data.c.
int bufrdeco_decode_data_subset | ( | struct bufrdeco * | b | ) |
User interface to decode a BUFR subset.
b | pointer to the base struct bufrdeco |
Note that if succeeded the counter to current subset index is increased. Remember that in case of non compressed data we must to decode all previous subsets to get the desired one. In case of compressed we can access directly to a the desired subset
Definition at line 62 of file bufrdeco_data.c.
References bufr_decode_subset_data_compressed(), bufrdeco_assert, bufrdeco_clean_bitmaps(), bufrdeco_clean_subset_sequence_data(), bufrdeco_decode_subset_data_recursive(), bufrdeco_parse_compressed(), bufr_sec3::compressed, bufrdeco::error, bufrdeco_compressed_data_references::nd, bufrdeco_expanded_tree::nseq, bufrdeco::refs, bufrdeco::sec3, bufrdeco::seq, bufrdeco::state, bufrdeco_decoding_data_state::subset, and bufrdeco::tree.
Referenced by bufrdeco_get_subset_sequence_data(), and bufrdeco_get_target_subset_sequence_data().
int bufrdeco_decode_replicated_subsequence | ( | struct bufrdeco_subset_sequence_data * | d, |
struct bufr_replicator * | r, | ||
struct bufrdeco * | b | ||
) |
Decodes a replicated sequence.
d | target struct bufrdeco_subset_sequence_data |
r | pointer to a struct bufr_replicator which manage the replication task |
b | pointer to the base struct bufrdeco |
Definition at line 509 of file bufrdeco_data.c.
References bufr_sequence_index_range::active, bufrdeco::bitmap, bufr_atom_data::bitmap_to, bufrdeco_bitmap::bitmap_to, bufrdeco_decoding_data_state::bitmaping, bufrdeco_bitmap_array::bmap, BUFR_MAX_QUALITY_DATA, bufrdeco_add_to_bitmap(), bufrdeco_assert, bufrdeco_decode_replicated_subsequence(), bufrdeco_decode_subset_data_recursive(), bufrdeco_increase_data_array(), BUFRDECO_OUTPUT_JSON_SUBSET_DATA, bufrdeco_parse_f2_descriptor(), bufrdeco_print_json_object_atom_data(), bufrdeco_print_json_object_operator_descriptor(), bufrdeco_print_json_object_replicator_descriptor(), bufrdeco_print_json_separator(), bufrdeco_tableB_val(), bufrdeco_decoding_data_state::data_repetition_factor, bufrdeco_subset_sequence_data::dim, bufrdeco_decoding_data_state::dstat_active, bufrdeco_bitmap::dstat_desc, bufrdeco::error, bufr_descriptor::f, bufr_sequence_index_range::first, bufr_atom_data::is_bitmaped_by, bufr_replicator::ixdel, bufr_replicator::ixrep, bufr_sequence::lseq, bufrdeco::mask, bufrdeco_bitmap_array::nba, bufrdeco_subset_sequence_data::nd, bufr_replicator::ndesc, bufrdeco_bitmap::nds, bufr_replicator::nloops, bufr_sequence::no_data_present, bufrdeco_bitmap::nq, bufrdeco_bitmap::ns1, bufrdeco::out, bufrdeco_bitmap::quality, bufrdeco_decoding_data_state::quality_active, bufr_atom_data::related_to, bufrdeco_bitmap::retain, bufrdeco_decoding_data_state::retained_active, bufr_replicator::s, bufrdeco_subset_sequence_data::sequence, bufr_sequence::sons, bufrdeco_bitmap::stat1, bufrdeco_decoding_data_state::stat1_active, bufrdeco_bitmap::stat1_desc, bufrdeco::state, bufrdeco_bitmap::subs, bufrdeco_decoding_data_state::subs_active, bufr_atom_data::val, bufr_descriptor::x, and bufr_descriptor::y.
Referenced by bufrdeco_decode_replicated_subsequence(), and bufrdeco_decode_subset_data_recursive().
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
d | pointer to the target struct bufrdeco_subset_sequence_data |
l | pointer to the source struct bufr_sequence |
b | pointer to the base struct bufrdeco |
Definition at line 171 of file bufrdeco_data.c.
References bufr_sequence_index_range::active, bufrdeco_decoding_data_state::added_bit_length, bufrdeco_decoding_data_state::added_reference, bufrdeco_decoding_data_state::added_scale, bufrdeco_decoding_data_state::assoc_bits, bufrdeco_decoding_data_state::bit_offset, bufrdeco_decoding_data_state::bitmap, bufrdeco::bitmap, bufrdeco_decoding_data_state::bitmaping, bufrdeco_bitmap_array::bmap, BUFR_MAX_QUALITY_DATA, BUFR_MAX_SUBSETS, bufrdeco_assert, bufrdeco_decode_replicated_subsequence(), bufrdeco_decode_subset_data_recursive(), bufrdeco_increase_data_array(), BUFRDECO_OUTPUT_JSON_SUBSET_DATA, bufrdeco_parse_f2_descriptor(), bufrdeco_print_json_object_atom_data(), bufrdeco_print_json_object_operator_descriptor(), bufrdeco_print_json_object_replicator_descriptor(), bufrdeco_print_json_separator(), bufrdeco_print_json_sequence_descriptor_final(), bufrdeco_print_json_sequence_descriptor_header(), bufrdeco_print_json_subset_data_epilogue(), bufrdeco_print_json_subset_data_prologue(), bufrdeco_tableB_val(), bufr_descriptor::c, bufrdeco_decoding_data_state::changing_reference, bufrdeco_decoding_data_state::data_repetition_factor, bufrdeco_subset_sequence_data::dim, bufrdeco_decoding_data_state::dstat_active, bufrdeco_bitmap::dstat_desc, bufrdeco::error, bufr_descriptor::f, bufrdeco_decoding_data_state::factor_reference, bufr_sequence_index_range::first, bufrdeco_decoding_data_state::fixed_ccitt, bufr_replicator::ixdel, bufr_replicator::ixrep, bufrdeco_decoding_data_state::local_bit_reserved, bufr_sequence::lseq, bufrdeco::mask, bufrdeco_bitmap_array::nba, bufrdeco_subset_sequence_data::nd, bufr_replicator::ndesc, bufr_sequence::ndesc, bufrdeco_bitmap::nds, bufr_replicator::nloops, bufr_sequence::no_data_present, bufrdeco_subset_bit_offsets::nr, bufr_atom_data::ns, bufrdeco_bitmap::ns1, bufrdeco::offsets, bufrdeco_subset_bit_offsets::ofs, bufrdeco::out, bufrdeco_decoding_data_state::quality_active, bufrdeco_decoding_data_state::retained_active, bufr_replicator::s, bufr_atom_data::seq, bufrdeco_expanded_tree::seq, bufrdeco_subset_sequence_data::sequence, bufr_sequence::sons, bufrdeco_subset_sequence_data::ss, bufrdeco_decoding_data_state::stat1_active, bufrdeco_bitmap::stat1_desc, bufrdeco::state, bufrdeco_decoding_data_state::subs_active, bufrdeco_decoding_data_state::subset, bufrdeco::tree, bufr_atom_data::val, bufr_descriptor::x, and bufr_descriptor::y.
Referenced by bufrdeco_decode_data_subset(), bufrdeco_decode_replicated_subsequence(), and bufrdeco_decode_subset_data_recursive().
struct bufrdeco_subset_sequence_data * bufrdeco_get_subset_sequence_data | ( | struct bufrdeco * | b | ) |
Parse and get a struct bufrdeco_subset_sequence_data.
b | basic container struct bufrdeco |
Note that if succeeded the counter to current subset index is increased. Remember that in case of non compressed data we must to decode all previous subsets to get the desired one. In case of compressed we can access directly to a the desired subset
Definition at line 39 of file bufrdeco_data.c.
References bufrdeco_assert, bufrdeco_decode_data_subset(), and bufrdeco::seq.
Referenced by bufrdeco_get_target_subset_sequence_data().
int bufrdeco_increase_data_array | ( | struct bufrdeco_subset_sequence_data * | d | ) |
doubles the allocated space for a struct bufrdeco_subset_sequence_data whenever is posible
d | pointer to source struct bufrdeco_subset_sequence_data |
The amount of data in a bufr must be huge. In a first moment, the dimension of a sequence of structs bufr_atom_data is BUFR_NMAXSEQ but may be increased. This function task is try to double the allocated dimension and reallocate it.
Definition at line 139 of file bufrdeco_data.c.
References BUFR_NMAXSEQ, bufrdeco_assert, bufrdeco_subset_sequence_data::dim, and bufrdeco_subset_sequence_data::sequence.
Referenced by bufr_decode_subset_data_compressed(), bufrdeco_decode_replicated_subsequence(), bufrdeco_decode_subset_data_recursive(), and bufrdeco_parse_f2_descriptor().