40 used += snprintf ( target + used, lmax - used,
"<table class='bufr_sec0'>\n<caption>SEC 0 INFO</caption>\n" );
41 used += snprintf ( target + used, lmax - used,
"<tr><td>Bufr length</td><td>%5u</td></tr>\n", b->
sec0.
bufr_length );
42 used += snprintf ( target + used, lmax - used,
"<tr><td>Bufr edition</td><td>%5u</td></tr>\n", b->
sec0.
edition );
43 used += snprintf ( target + used, lmax - used,
"</table>\n" );
61 used += snprintf ( target + used , lmax - used,
"<div class='bufr_sec1'>\n" );
62 used += snprintf ( target + used , lmax - used,
"<table>\n<caption>SEC 1 INFO</caption>\n" );
63 used += snprintf ( target + used , lmax - used,
"<tr><td>Sec1 length</td><td>%5u</td></tr>\n", b->
sec1.
length );
64 used += snprintf ( target + used , lmax - used,
"<tr><td>Bufr master table</td><td>%5u</td></tr>\n", b->
sec1.
master );
65 used += snprintf ( target + used , lmax - used,
"<tr><td>Centre</td><td>%5u</td></tr>\n", b->
sec1.
centre );
66 used += snprintf ( target + used , lmax - used,
"<tr><td>Sub-Centre</td><td>%5u</td></tr>\n", b->
sec1.
subcentre );
67 used += snprintf ( target + used , lmax - used,
"<tr><td>Update sequence</td><td>%5u</td></tr>\n", b->
sec1.
update );
68 used += snprintf ( target + used , lmax - used,
"<tr><td>Options</td><td>%5x</td></tr>\n", b->
sec1.
options );
69 used += snprintf ( target + used , lmax - used,
"<tr><td>Category</td><td>%5u</td></tr>\n", b->
sec1.
category );
70 used += snprintf ( target + used , lmax - used,
"<tr><td>Subcategory</td><td>%5u</td></tr>\n", b->
sec1.
subcategory );
71 used += snprintf ( target + used , lmax - used,
"<tr><td>Sub-category local</td><td>%5u</td></tr>\n", b->
sec1.
subcategory_local );
72 used += snprintf ( target + used , lmax - used,
"<tr><td>Master table version</td><td>%5u</td></tr>\n", b->
sec1.
master_version );
73 used += snprintf ( target + used , lmax - used,
"<tr><td>Master table local</td><td>%5u</td></tr>\n", b->
sec1.
master_local );
74 used += snprintf ( target + used , lmax - used,
"<tr><td>Year</td><td>%5u</td></tr>\n", b->
sec1.
year );
75 used += snprintf ( target + used , lmax - used,
"<tr><td>Month</td><td>%5u</td></tr>\n", b->
sec1.
month );
76 used += snprintf ( target + used , lmax - used,
"<tr><td>Day</td><td>%5u</td></tr>\n", b->
sec1.
day );
77 used += snprintf ( target + used , lmax - used,
"<tr><td>Hour</td><td>%5u</td></tr>\n", b->
sec1.
hour );
78 used += snprintf ( target + used , lmax - used,
"<tr><td>Minute</td><td>%5u</td></tr>\n", b->
sec1.
minute );
79 used += snprintf ( target + used , lmax - used,
"<tr><td>Second</td><td>%5u</td></tr>\n", b->
sec1.
second );
81 used += snprintf ( target + used , lmax - used,
"<tr><td>Aditional space</td><td>%5u</td></tr>\n", b->
sec1.
length - 17 );
83 used += snprintf ( target + used , lmax - used,
"<tr><td>Aditional space</td><td>%5u</td></tr>\n", b->
sec1.
length - 22 );
87 used += snprintf ( target + used , lmax - used,
"<tr><td>Tables used</td><td>'%s'<br>\n", b->
tables->
b.
path );
88 used += snprintf ( target + used , lmax - used,
"'%s'<br>\n", b->
tables->
c.
path );
89 used += snprintf ( target + used , lmax - used,
"'%s'</td></tr>\n", b->
tables->
d.
path );
91 used += snprintf ( target + used , lmax - used,
"</table>\n" );
92 used += snprintf ( target + used , lmax - used,
"</div>\n" );
111 used += snprintf ( target + used , lmax - used,
"<div class='bufr_sec3'>\n" );
112 used += snprintf ( target + used , lmax - used,
"<table>\n<caption>SEC 3 INFO</caption>\n" );
113 used += snprintf ( target + used , lmax - used,
"<tr><td>Sec3 length</td><td>%5u\n", b->
sec3.
length );
114 used += snprintf ( target + used , lmax - used,
"<tr><td>Subsets</td><td>%5u\n", b->
sec3.
subsets );
115 used += snprintf ( target + used , lmax - used,
"<tr><td>Observed</td><td>%5u\n", b->
sec3.
observed );
116 used += snprintf ( target + used , lmax - used,
"<tr><td>Compressed</td><td>%5u\n", b->
sec3.
compressed );
117 used += snprintf ( target + used , lmax - used,
"<tr><td>Unexpanded descriptors</td><td>%5u</td></tr>\n", b->
sec3.
ndesc );
120 used += snprintf ( target + used , lmax - used,
"<tr><td>%3lu:</td><td>%u %02u %03u</td></tr>\n", i, b->
sec3.
unexpanded[i].
f,
123 used += snprintf ( target + used , lmax - used,
"</table>\n" );
124 used += snprintf ( target + used , lmax - used,
"</div>\n" );
142 used += snprintf ( target + used , lmax - used,
"<div class='bufr_sec4'>\n" );
143 used += snprintf ( target + used , lmax - used,
"<table>\n<caption>SEC 4 INFO</caption>\n" );
144 used += snprintf ( target + used , lmax - used,
"<tr><td>Sec4 length</td><td>%5u</td></tr>\n", b->
sec4.
length );
145 used += snprintf ( target + used , lmax - used,
"</table>\n" );
146 used += snprintf ( target + used , lmax - used,
"</div>\n" );
167 used += snprintf ( target + used , lmax - used,
"<td class='desc'>%u %02u %03u</td>", a->
desc.
f, a->
desc.
x, a->
desc.
y );
168 used += snprintf ( target + used , lmax - used,
"<td class='name'>%s</td>", a->
name );
169 used += snprintf ( target + used , lmax - used,
"<td class='unit'>%s</td>", a->
unit );
173 used += snprintf ( target + used , lmax - used,
"<td class='missing'>MISSING</td><td>NOTE: Bitmaped by <a href='#d%u_%u'>#%u</a></td>", ss, a->
is_bitmaped_by, a->
is_bitmaped_by );
175 used += snprintf ( target + used , lmax - used,
"<td class='missing'>MISSING</td><td>NOTE: Bitmap to <a href='#d%u_%u'>#%u</a></td>", ss, a->
bitmap_to, a->
bitmap_to );
177 used += snprintf ( target + used , lmax - used,
"<td class='missing'>MISSING</td><td>NOTE: Related to <a href='#d%u_%u'>#%u</a></td>", ss, a->
related_to, a->
related_to );
179 used += snprintf ( target + used , lmax - used,
"<td class='missing'>MISSING</td><td></td>" );
186 used += snprintf ( target + used , lmax - used,
"<td></td><td class='cval'>%s<br>NOTE: Bitmaped by <a href='#d%u_%u'>#%u</a></td>\n", a->
cval, ss, a->
is_bitmaped_by, a->
is_bitmaped_by );
188 used += snprintf ( target + used , lmax - used,
"<td></td><td class='cval'>%s<br>NOTE: Bitmap to <a href='#d%u_%u'>#%u</a></td>\n", a->
cval, ss, a->
bitmap_to, a->
bitmap_to );
190 used += snprintf ( target + used , lmax - used,
"<td></td><td class='cval'>%s<br>NOTE: Related to <a href='#d%u_%u'>#%u</a></td>\n", a->
cval, ss, a->
related_to, a->
related_to );
192 used += snprintf ( target + used , lmax - used,
"<td></td><td class='cval'>%s</td>\n", a->
cval );
195 || strstr ( a->
unit,
"CODE TABLE" ) == a->
unit
196 || strstr ( a->
unit,
"Code table" ) == a->
unit )
198 used += snprintf ( target + used , lmax - used,
"<td class='ival'>%17u</td>", ( uint32_t ) a->
val );
200 used += snprintf ( target + used , lmax - used,
"<td class='ctable'>%s<br>NOTE: Bitmaped by <a href='#d%u_%u'>#%u</a></td>\n", a->
ctable, ss, a->
is_bitmaped_by, a->
is_bitmaped_by );
202 used += snprintf ( target + used , lmax - used,
"<td class='ctable'>%s<br>NOTE: Bitmap to <a href='#d%u_%u'>#%u</a></td>\n", a->
ctable, ss, a->
bitmap_to, a->
bitmap_to );
204 used += snprintf ( target + used , lmax - used,
"<td class='ctable'>%s<br>NOTE: Related to <a href='#d%u_%u'>#%u</a></td>\n", a->
ctable, ss, a->
related_to, a->
related_to );
206 used += snprintf ( target + used , lmax - used,
"<td class='ctable'>%s</td>\n", a->
ctable );
210 used += snprintf ( target + used , lmax - used,
"<td class='hval'>0x%08X</td>", ( uint32_t ) a->
val );
212 used += snprintf ( target + used , lmax - used,
"<td class='ctable'>%s<br>NOTE: Bitmaped by <a href='#%du_%u'>#%u</a></td>\n", a->
ctable, ss, a->
is_bitmaped_by, a->
is_bitmaped_by );
214 used += snprintf ( target + used , lmax - used,
"<td class='ctable'>%s<br>NOTE: Bitmap to <a href='#d%u_%u'>#%u</a></td>\n", a->
ctable, ss, a->
bitmap_to, a->
bitmap_to );
216 used += snprintf ( target + used , lmax - used,
"<td class='ctable'>%s<br>NOTE: Related to <a href='#d%u_%u'>#%u</a></td>\n", a->
ctable, ss, a->
related_to, a->
related_to );
218 used += snprintf ( target + used , lmax - used,
"<td class='ctable'>%s</td>\n", a->
ctable );
248 fprintf ( f,
"<div class='bufr_subset'>\n" );
249 fprintf ( f,
"<table>\n" );
250 for ( i = 0; i < s->
nd ; i++ )
254 fprintf ( f,
"</table>\n" );
255 fprintf ( f,
"</div>\n" );
286 fprintf ( f,
"\n<div class='bufr_subset' id='%s'>\n",
id );
287 fprintf ( f,
"<table>\n" );
288 fprintf ( f,
"<caption>%s</caption>\n",
id );
289 fprintf ( f,
"<tr><th></th><th>Descriptor</th><th>Name</th><th>Unit</th><th>Value</th><th>Description</th></tr>\n" );
290 for ( i = 0; i < s->
nd ; i++ )
294 fprintf ( f,
"</table>\n" );
295 fprintf ( f,
"</div>\n" );
Include header file for bufrdeco library.
#define bufrdeco_assert(__my_expr__)
Check a expression and exit if it fails.
#define DESCRIPTOR_HAVE_FLAG_TABLE_STRING
Bit mask for a flag table string in a struct bufr_atom_data.
#define DESCRIPTOR_HAVE_STRING_VALUE
Bit mask for a string in a struct bufr_atom_data.
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
#define DESCRIPTOR_VALUE_MISSING
Bit mask for a missing value in a struct bufr_atom_data.
#define DESCRIPTOR_HAVE_CODE_TABLE_STRING
Bit mask for a code table string in a struct bufr_atom_data.
int sprint_sec0_info_html(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec0 in html format.
int sprint_sec1_info_html(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec1.
int bufrdeco_fprint_subset_sequence_data_html(FILE *f, struct bufrdeco_subset_sequence_data *s)
int sprint_sec4_info_html(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec4.
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 sprint_sec3_info_html(char *target, size_t lmax, struct bufrdeco *b)
Prints info from sec3 formatted as html.
int bufrdeco_print_subset_sequence_data_tagged_html(struct bufrdeco_subset_sequence_data *s, char *id)
int bufrdeco_print_subset_sequence_data_html(struct bufrdeco_subset_sequence_data *s)
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]
uint8_t subcategory_local
struct bufr_descriptor unexpanded[BUFR_LEN_UNEXPANDED_DESCRIPTOR]
char path[BUFRDECO_PATH_LENGTH]
char path[BUFRDECO_PATH_LENGTH]
char path[BUFRDECO_PATH_LENGTH]
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 bufr_tables * tables