bufr2synop 0.24.0
Functions
bufrdeco_print_html.c File Reference

file with the code to print data or any output from library decobufr in html format More...

#include "bufrdeco.h"
Include dependency graph for bufrdeco_print_html.c:

Go to the source code of this file.

Functions

int sprint_sec0_info_html (char *target, size_t lmax, struct bufrdeco *b)
 Prints info from sec0 in html format. More...
 
int sprint_sec1_info_html (char *target, size_t lmax, struct bufrdeco *b)
 Prints info from sec1. More...
 
int sprint_sec3_info_html (char *target, size_t lmax, struct bufrdeco *b)
 Prints info from sec3 formatted as html. More...
 
int sprint_sec4_info_html (char *target, size_t lmax, struct bufrdeco *b)
 Prints info from sec4. More...
 
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 More...
 
int bufrdeco_fprint_subset_sequence_data_html (FILE *f, struct bufrdeco_subset_sequence_data *s)
 
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)
 
int bufrdeco_print_subset_sequence_data_tagged_html (struct bufrdeco_subset_sequence_data *s, char *id)
 

Detailed Description

file with the code to print data or any output from library decobufr in html format

Definition in file bufrdeco_print_html.c.

Function Documentation

◆ bufrdeco_fprint_subset_sequence_data_html()

int bufrdeco_fprint_subset_sequence_data_html ( FILE *  f,
struct bufrdeco_subset_sequence_data s 
)

Definition at line 241 of file bufrdeco_print_html.c.

242{
243 size_t i;
244 char aux[1024];
245
246 bufrdeco_assert ( f != NULL && s != NULL );
247
248 fprintf ( f, "<div class='bufr_subset'>\n" );
249 fprintf ( f, "<table>\n" );
250 for ( i = 0; i < s->nd ; i++ )
251 {
252 fprintf ( f, "<tr><td>%5lu:</td>%s</tr>\n", i, bufrdeco_print_atom_data_html ( aux, sizeof (aux), &s->sequence[i], s->ss ) );
253 }
254 fprintf ( f, "</table>\n" );
255 fprintf ( f, "</div>\n" );
256 return 0;
257}
#define bufrdeco_assert(__my_expr__)
Check a expression and exit if it fails.
Definition: bufrdeco.h:374
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
struct bufr_atom_data * sequence
Definition: bufrdeco.h:462

References bufrdeco_assert, bufrdeco_print_atom_data_html(), bufrdeco_subset_sequence_data::nd, bufrdeco_subset_sequence_data::sequence, and bufrdeco_subset_sequence_data::ss.

Referenced by bufrdeco_print_subset_sequence_data_html().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bufrdeco_fprint_subset_sequence_data_tagged_html()

int bufrdeco_fprint_subset_sequence_data_tagged_html ( FILE *  f,
struct bufrdeco_subset_sequence_data s,
char *  id 
)

Definition at line 279 of file bufrdeco_print_html.c.

280{
281 size_t i;
282 char aux[1024];
283
284 bufrdeco_assert ( f != NULL && s != NULL && id != NULL );
285
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++ )
291 {
292 fprintf ( f, "<tr><td class='ndesc' id='d_%u_%lu' >#%lu</td>%s</tr>\n", s->ss, i, i, bufrdeco_print_atom_data_html ( aux, sizeof (aux), &s->sequence[i], s->ss ) );
293 }
294 fprintf ( f, "</table>\n" );
295 fprintf ( f, "</div>\n" );
296 return 0;
297}

References bufrdeco_assert, bufrdeco_print_atom_data_html(), bufrdeco_subset_sequence_data::nd, bufrdeco_subset_sequence_data::sequence, and bufrdeco_subset_sequence_data::ss.

Referenced by bufrdeco_print_subset_sequence_data_tagged_html().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bufrdeco_print_atom_data_html()

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

Parameters
targetstring where to print the result
lmaxdimension of target
apointer to struct ref bufr_atom_data with data to print
ssindex of subset in bufr
Returns
a pointer to result string

Definition at line 160 of file bufrdeco_print_html.c.

161{
162 char aux[256];
163 size_t used = 0;
164
165 bufrdeco_assert ( a != NULL && lmax != 0 && target != NULL );
166
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 );
171 {
172 if ( a->is_bitmaped_by != 0 )
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 );
174 else if ( a->bitmap_to != 0 )
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 );
176 else if ( a->related_to != 0 )
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 );
178 else
179 used += snprintf ( target + used , lmax - used,"<td class='missing'>MISSING</td><td></td>" );
180 }
181 else
182 {
184 {
185 if ( a->is_bitmaped_by != 0 )
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 );
187 else if ( a->bitmap_to != 0 )
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 );
189 else if ( a->related_to != 0 )
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 );
191 else
192 used += snprintf ( target + used , lmax - used,"<td></td><td class='cval'>%s</td>\n", a->cval );
193 }
195 || strstr ( a->unit, "CODE TABLE" ) == a->unit
196 || strstr ( a->unit, "Code table" ) == a->unit )
197 {
198 used += snprintf ( target + used , lmax - used,"<td class='ival'>%17u</td>", ( uint32_t ) a->val );
199 if ( a->is_bitmaped_by != 0 )
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 );
201 else if ( a->bitmap_to != 0 )
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 );
203 else if ( a->related_to != 0 )
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 );
205 else
206 used += snprintf ( target + used , lmax - used,"<td class='ctable'>%s</td>\n", a->ctable );
207 }
209 {
210 used += snprintf ( target + used , lmax - used,"<td class='hval'>0x%08X</td>", ( uint32_t ) a->val );
211 if ( a->is_bitmaped_by != 0 )
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 );
213 else if ( a->bitmap_to != 0 )
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 );
215 else if ( a->related_to != 0 )
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 );
217 else
218 used += snprintf ( target + used , lmax - used,"<td class='ctable'>%s</td>\n", a->ctable );
219 }
220 else
221 {
222 if ( a->is_bitmaped_by != 0 )
223 used += snprintf ( target + used , lmax - used,"<td class='rval'>%s</td><td>NOTE: Bitmaped by <a href='#d%u_%u'>#%u</a></td>" , get_formatted_value_from_escale ( aux, sizeof (aux), a->escale, a->val ), ss, a->is_bitmaped_by, a->is_bitmaped_by );
224 else if ( a->bitmap_to != 0 )
225 used += snprintf ( target + used , lmax - used,"<td class='rval'>%s</td><td>NOTE: Bitmap to <a href='#d%u_%u'>#%u</a></td>" , get_formatted_value_from_escale ( aux, sizeof (aux), a->escale, a->val ) , ss, a->bitmap_to, a->bitmap_to );
226 else if ( a->related_to != 0 )
227 used += snprintf ( target + used , lmax - used,"<td class='rval'>%s</td><td>NOTE: Related to <a href='#d%u_%u'>#%u</a></td>" , get_formatted_value_from_escale ( aux, sizeof (aux), a->escale, a->val ), ss, a->related_to, a->related_to );
228 else
229 used += snprintf ( target + used , lmax - used,"<td class='rval'>%s</td><td></td>" , get_formatted_value_from_escale ( aux, sizeof (aux), a->escale, a->val ) );
230 }
231 }
232 return target;
233}
#define DESCRIPTOR_HAVE_FLAG_TABLE_STRING
Bit mask for a flag table string in a struct bufr_atom_data.
Definition: bufrdeco.h:170
#define DESCRIPTOR_HAVE_STRING_VALUE
Bit mask for a string in a struct bufr_atom_data.
Definition: bufrdeco.h:152
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.
Definition: bufrdeco.h:140
#define DESCRIPTOR_HAVE_CODE_TABLE_STRING
Bit mask for a code table string in a struct bufr_atom_data.
Definition: bufrdeco.h:164
int32_t escale
Definition: bufrdeco.h:441
uint32_t mask
Definition: bufrdeco.h:437
char name[BUFR_TABLEB_NAME_LENGTH]
Definition: bufrdeco.h:438
char ctable[BUFR_EXPLAINED_LENGTH]
Definition: bufrdeco.h:444
struct bufr_descriptor desc
Definition: bufrdeco.h:436
buf_t related_to
Definition: bufrdeco.h:449
double val
Definition: bufrdeco.h:440
buf_t is_bitmaped_by
Definition: bufrdeco.h:447
char unit[BUFR_TABLEB_UNIT_LENGTH]
Definition: bufrdeco.h:439
char cval[BUFR_CVAL_LENGTH]
Definition: bufrdeco.h:443
buf_t bitmap_to
Definition: bufrdeco.h:448

References bufr_atom_data::bitmap_to, bufrdeco_assert, bufr_atom_data::ctable, bufr_atom_data::cval, bufr_atom_data::desc, DESCRIPTOR_HAVE_CODE_TABLE_STRING, DESCRIPTOR_HAVE_FLAG_TABLE_STRING, DESCRIPTOR_HAVE_STRING_VALUE, DESCRIPTOR_VALUE_MISSING, bufr_atom_data::escale, bufr_descriptor::f, get_formatted_value_from_escale(), bufr_atom_data::is_bitmaped_by, bufr_atom_data::mask, bufr_atom_data::name, bufr_atom_data::related_to, bufr_atom_data::unit, bufr_atom_data::val, bufr_descriptor::x, and bufr_descriptor::y.

Referenced by bufrdeco_fprint_subset_sequence_data_html(), and bufrdeco_fprint_subset_sequence_data_tagged_html().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bufrdeco_print_subset_sequence_data_html()

int bufrdeco_print_subset_sequence_data_html ( struct bufrdeco_subset_sequence_data s)

Definition at line 265 of file bufrdeco_print_html.c.

266{
267 bufrdeco_assert ( s != NULL );
268
270}
int bufrdeco_fprint_subset_sequence_data_html(FILE *f, struct bufrdeco_subset_sequence_data *s)

References bufrdeco_assert, and bufrdeco_fprint_subset_sequence_data_html().

Here is the call graph for this function:

◆ bufrdeco_print_subset_sequence_data_tagged_html()

int bufrdeco_print_subset_sequence_data_tagged_html ( struct bufrdeco_subset_sequence_data s,
char *  id 
)

Definition at line 306 of file bufrdeco_print_html.c.

307{
308 bufrdeco_assert ( s != NULL );
309
311}
int bufrdeco_fprint_subset_sequence_data_tagged_html(FILE *f, struct bufrdeco_subset_sequence_data *s, char *id)

References bufrdeco_assert, and bufrdeco_fprint_subset_sequence_data_tagged_html().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sprint_sec0_info_html()

int sprint_sec0_info_html ( char *  target,
size_t  lmax,
struct bufrdeco b 
)

Prints info from sec0 in html format.

Parameters
targetstring target
lmaxavailable size in target
bpointer to the source struct bufrdeco
Returns
If succeeded return 0

Definition at line 34 of file bufrdeco_print_html.c.

35{
36 size_t used = 0;
37
38 bufrdeco_assert ( b != NULL && lmax != 0 && target != NULL );
39
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" );
44 return 0;
45}
uint8_t edition
Definition: bufrdeco.h:698
uint32_t bufr_length
Definition: bufrdeco.h:697
struct bufr_sec0 sec0
Definition: bufrdeco.h:968

References bufr_sec0::bufr_length, bufrdeco_assert, bufr_sec0::edition, and bufrdeco::sec0.

Referenced by sprint_sec0_info().

Here is the caller graph for this function:

◆ sprint_sec1_info_html()

int sprint_sec1_info_html ( char *  target,
size_t  lmax,
struct bufrdeco b 
)

Prints info from sec1.

Parameters
targetstring target
lmaxavailable size in target
bpointer to the source struct bufrdeco
Returns
If succeeded return 0

Definition at line 55 of file bufrdeco_print_html.c.

56{
57 size_t used = 0;
58
59 bufrdeco_assert ( b != NULL && lmax != 0 && target != NULL );
60
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 );
80 if ( b->sec0.edition == 3 )
81 used += snprintf ( target + used , lmax - used,"<tr><td>Aditional space</td><td>%5u</td></tr>\n", b->sec1.length - 17 );
82 else
83 used += snprintf ( target + used , lmax - used,"<tr><td>Aditional space</td><td>%5u</td></tr>\n", b->sec1.length - 22 );
84
85 if ( b->tables->b.path[0] )
86 {
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 );
90 }
91 used += snprintf ( target + used , lmax - used,"</table>\n" );
92 used += snprintf ( target + used , lmax - used,"</div>\n" );
93 return 0;
94}
uint8_t month
Definition: bufrdeco.h:785
uint32_t year
Definition: bufrdeco.h:784
uint8_t master_local
Definition: bufrdeco.h:783
uint32_t subcentre
Definition: bufrdeco.h:776
uint32_t centre
Definition: bufrdeco.h:775
uint8_t category
Definition: bufrdeco.h:779
uint8_t options
Definition: bufrdeco.h:778
uint8_t minute
Definition: bufrdeco.h:788
uint8_t subcategory
Definition: bufrdeco.h:780
uint8_t master_version
Definition: bufrdeco.h:782
uint8_t second
Definition: bufrdeco.h:789
uint8_t day
Definition: bufrdeco.h:786
uint32_t length
Definition: bufrdeco.h:773
uint8_t subcategory_local
Definition: bufrdeco.h:781
uint8_t hour
Definition: bufrdeco.h:787
uint8_t update
Definition: bufrdeco.h:777
uint8_t master
Definition: bufrdeco.h:774
char path[BUFRDECO_PATH_LENGTH]
Definition: bufrdeco.h:861
char path[BUFRDECO_PATH_LENGTH]
Definition: bufrdeco.h:893
char path[BUFRDECO_PATH_LENGTH]
Definition: bufrdeco.h:922
struct bufr_tableD d
Definition: bufrdeco.h:941
struct bufr_tableB b
Definition: bufrdeco.h:939
struct bufr_tableC c
Definition: bufrdeco.h:940
struct bufr_tables * tables
Definition: bufrdeco.h:973
struct bufr_sec1 sec1
Definition: bufrdeco.h:969

References bufr_tables::b, bufrdeco_assert, bufr_tables::c, bufr_sec1::category, bufr_sec1::centre, bufr_tables::d, bufr_sec1::day, bufr_sec0::edition, bufr_sec1::hour, bufr_sec1::length, bufr_sec1::master, bufr_sec1::master_local, bufr_sec1::master_version, bufr_sec1::minute, bufr_sec1::month, bufr_sec1::options, bufr_tableB::path, bufr_tableC::path, bufr_tableD::path, bufrdeco::sec0, bufrdeco::sec1, bufr_sec1::second, bufr_sec1::subcategory, bufr_sec1::subcategory_local, bufr_sec1::subcentre, bufrdeco::tables, bufr_sec1::update, and bufr_sec1::year.

Referenced by sprint_sec1_info().

Here is the caller graph for this function:

◆ sprint_sec3_info_html()

int sprint_sec3_info_html ( char *  target,
size_t  lmax,
struct bufrdeco b 
)

Prints info from sec3 formatted as html.

Parameters
targetstring target
lmaxavailable size in target
bpointer to the source struct bufrdeco
Returns
If succeeded return 0

Definition at line 104 of file bufrdeco_print_html.c.

105{
106 size_t i;
107 size_t used = 0;
108
109 bufrdeco_assert ( b != NULL && lmax != 0 && target != NULL );
110
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 );
118 for ( i = 0; i < b->sec3.ndesc; i++ )
119 {
120 used += snprintf ( target + used , lmax - used,"<tr><td>%3lu:</td><td>%u %02u %03u</td></tr>\n", i, b->sec3.unexpanded[i].f,
121 b->sec3.unexpanded[i].x, b->sec3.unexpanded[i].y );
122 }
123 used += snprintf ( target + used , lmax - used,"</table>\n" );
124 used += snprintf ( target + used , lmax - used,"</div>\n" );
125 return 0;
126}
uint8_t observed
Definition: bufrdeco.h:811
uint8_t compressed
Definition: bufrdeco.h:812
struct bufr_descriptor unexpanded[BUFR_LEN_UNEXPANDED_DESCRIPTOR]
Definition: bufrdeco.h:814
uint32_t ndesc
Definition: bufrdeco.h:813
uint32_t length
Definition: bufrdeco.h:809
uint32_t subsets
Definition: bufrdeco.h:810
struct bufr_sec3 sec3
Definition: bufrdeco.h:971

References bufrdeco_assert, bufr_sec3::compressed, bufr_descriptor::f, bufr_sec3::length, bufr_sec3::ndesc, bufr_sec3::observed, bufrdeco::sec3, bufr_sec3::subsets, bufr_sec3::unexpanded, bufr_descriptor::x, and bufr_descriptor::y.

Referenced by sprint_sec3_info().

Here is the caller graph for this function:

◆ sprint_sec4_info_html()

int sprint_sec4_info_html ( char *  target,
size_t  lmax,
struct bufrdeco b 
)

Prints info from sec4.

Parameters
targetstring target
lmaxavailable size in target
bpointer to the source struct bufrdeco
Returns
If succeeded return 0, 1 otherwise

Definition at line 136 of file bufrdeco_print_html.c.

137{
138 size_t used = 0;
139
140 bufrdeco_assert ( b != NULL && lmax != 0 && target != NULL );
141
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" );
147 return 0;
148}
uint32_t length
Definition: bufrdeco.h:826
struct bufr_sec4 sec4
Definition: bufrdeco.h:972

References bufrdeco_assert, bufr_sec4::length, and bufrdeco::sec4.

Referenced by sprint_sec4_info().

Here is the caller graph for this function: