ASTERIX subfield processing. More...

Collaboration diagram for Subfield:

Data Structures

struct  ast_subfield_t
 Subfield struct. More...

Macros

#define AST_MAP_SUBFIELD_TYPE_EX(category_name, category_value, dataitem, subfield)
 Macro used to map subfield type.
#define AST_MAX_SUBFIELD_SIZE   32
 Max number of subfield.
#define AST_SUBFIELD_SUMMARY_PREFERED_CHARS   summary_size
 Preferred number of chars of subfield summary.
#define AST_SUBFIELD_BIN_HTML_PREFERED_CHARS   (AST_MAX_SUBFIELD_SIZE * 128 + 64)
 Max number of chars of subfield binary HTML snippet.

Enumerations

enum  ast_subfield_type_t {
  INULLFIELD = 0 , I004_100_S01 = 4100001 , I004_100_S02 = 4100002 , I004_100_S03 = 4100003 ,
  I004_100_S04 = 4100004 , I004_100_S05 = 4100005 , I004_100_S06 = 4100006 , I004_120_S01 = 4120001 ,
  I004_120_S02 = 4120002 , I004_120_S03 = 4120003 , I004_120_S04 = 4120004 , I004_170_S01 = 4170001 ,
  I004_170_S02 = 4170002 , I004_170_S03 = 4170003 , I004_170_S04 = 4170004 , I004_170_S05 = 4170005 ,
  I004_170_S06 = 4170006 , I004_170_S07 = 4170007 , I004_170_S08 = 4170008 , I004_170_S09 = 4170009 ,
  I004_170_S10 = 4170010 , I004_171_S01 = 4171001 , I004_171_S02 = 4171002 , I004_171_S03 = 4171003 ,
  I004_171_S04 = 4171004 , I004_171_S05 = 4171005 , I004_171_S06 = 4171006 , I004_171_S07 = 4171007 ,
  I004_171_S08 = 4171008 , I004_171_S09 = 4171009 , I004_171_S10 = 4171010 , I015_600_S01 = 15600001 ,
  I015_600_S02 = 15600002 , I015_600_S03 = 15600003 , I015_601_S01 = 15601001 , I015_601_S02 = 15601002 ,
  I015_601_S03 = 15601003 , I015_601_S04 = 15601004 , I015_601_S05 = 15601005 , I015_601_S06 = 15601006 ,
  I015_601_S07 = 15601007 , I015_601_S08 = 15601008 , I015_602_S01 = 15602001 , I015_602_S02 = 15602002 ,
  I015_602_S03 = 15602003 , I015_602_S04 = 15602004 , I015_604_S01 = 15604001 , I015_604_S02 = 15604002 ,
  I015_604_S03 = 15604003 , I015_604_S04 = 15604004 , I015_604_S05 = 15604005 , I015_604_S06 = 15604006 ,
  I015_625_S01 = 15625001 , I015_625_S02 = 15625002 , I015_625_S03 = 15625003 , I015_625_S04 = 15625004 ,
  I015_625_S05 = 15625005 , I015_625_S06 = 15625006 , I015_625_S07 = 15625007 , I015_625_S08 = 15625008 ,
  I015_626_S01 = 15626001 , I015_626_S02 = 15626002 , I015_626_S03 = 15626003 , I015_626_S04 = 15626004 ,
  I015_626_S05 = 15626005 , I015_626_S06 = 15626006 , I015_626_S07 = 15626007 , I015_626_S08 = 15626008 ,
  I015_626_S09 = 15626009 , I015_626_S10 = 15626010 , I015_627_S01 = 15627001 , I015_627_S02 = 15627002 ,
  I015_627_S03 = 15627003 , I015_627_S04 = 15627004 , I015_627_S05 = 15627005 , I015_627_S06 = 15627006 ,
  I021_110_S01 = 21110001 , I021_110_S02 = 21110002 , I021_220_S01 = 21220001 , I021_220_S02 = 21220002 ,
  I021_220_S03 = 21220003 , I021_220_S04 = 21220004 , I021_295_S01 = 21295001 , I021_295_S02 = 21295002 ,
  I021_295_S03 = 21295003 , I021_295_S04 = 21295004 , I021_295_S05 = 21295005 , I021_295_S06 = 21295006 ,
  I021_295_S07 = 21295007 , I021_295_S08 = 21295008 , I021_295_S09 = 21295009 , I021_295_S10 = 21295010 ,
  I021_295_S11 = 21295011 , I021_295_S12 = 21295012 , I021_295_S13 = 21295013 , I021_295_S14 = 21295014 ,
  I021_295_S15 = 21295015 , I021_295_S16 = 21295016 , I021_295_S17 = 21295017 , I021_295_S18 = 21295018 ,
  I021_295_S19 = 21295019 , I021_295_S20 = 21295020 , I021_295_S21 = 21295021 , I021_295_S22 = 21295022 ,
  I021_295_S23 = 21295023 , I034_050_S01 = 34050001 , I034_050_S02 = 34050002 , I034_050_S03 = 34050003 ,
  I034_050_S04 = 34050004 , I034_050_S05 = 34050005 , I034_050_S06 = 34050006 , I034_050_S07 = 34050007 ,
  I034_060_S01 = 34060001 , I034_060_S02 = 34060002 , I034_060_S03 = 34060003 , I034_060_S04 = 34060004 ,
  I034_060_S05 = 34060005 , I034_060_S06 = 34060006 , I034_060_S07 = 34060007 , I048_120_S01 = 48120001 ,
  I048_120_S02 = 48120002 , I048_130_S01 = 48130001 , I048_130_S02 = 48130002 , I048_130_S03 = 48130003 ,
  I048_130_S04 = 48130004 , I048_130_S05 = 48130005 , I048_130_S06 = 48130006 , I048_130_S07 = 48130007 ,
  I062_110_S01 = 62110001 , I062_110_S02 = 62110002 , I062_110_S03 = 62110003 , I062_110_S04 = 62110004 ,
  I062_110_S05 = 62110005 , I062_110_S06 = 62110006 , I062_110_S07 = 62110007 , I062_290_S01 = 62290001 ,
  I062_290_S02 = 62290002 , I062_290_S03 = 62290003 , I062_290_S04 = 62290004 , I062_290_S05 = 62290005 ,
  I062_290_S06 = 62290006 , I062_290_S07 = 62290007 , I062_290_S08 = 62290008 , I062_290_S09 = 62290009 ,
  I062_290_S10 = 62290010 , I062_295_S01 = 62295001 , I062_295_S02 = 62295002 , I062_295_S03 = 62295003 ,
  I062_295_S04 = 62295004 , I062_295_S05 = 62295005 , I062_295_S06 = 62295006 , I062_295_S07 = 62295007 ,
  I062_295_S08 = 62295008 , I062_295_S09 = 62295009 , I062_295_S10 = 62295010 , I062_295_S11 = 62295011 ,
  I062_295_S12 = 62295012 , I062_295_S13 = 62295013 , I062_295_S14 = 62295014 , I062_295_S15 = 62295015 ,
  I062_295_S16 = 62295016 , I062_295_S17 = 62295017 , I062_295_S18 = 62295018 , I062_295_S19 = 62295019 ,
  I062_295_S20 = 62295020 , I062_295_S21 = 62295021 , I062_295_S22 = 62295022 , I062_295_S23 = 62295023 ,
  I062_295_S24 = 62295024 , I062_295_S25 = 62295025 , I062_295_S26 = 62295026 , I062_295_S27 = 62295027 ,
  I062_295_S28 = 62295028 , I062_295_S29 = 62295029 , I062_295_S30 = 62295030 , I062_295_S31 = 62295031 ,
  I062_340_S01 = 62340001 , I062_340_S02 = 62340002 , I062_340_S03 = 62340003 , I062_340_S04 = 62340004 ,
  I062_340_S05 = 62340005 , I062_340_S06 = 62340006 , I062_380_S01 = 62380001 , I062_380_S02 = 62380002 ,
  I062_380_S03 = 62380003 , I062_380_S04 = 62380004 , I062_380_S05 = 62380005 , I062_380_S06 = 62380006 ,
  I062_380_S07 = 62380007 , I062_380_S08 = 62380008 , I062_380_S09 = 62380009 , I062_380_S10 = 62380010 ,
  I062_380_S11 = 62380011 , I062_380_S12 = 62380012 , I062_380_S13 = 62380013 , I062_380_S14 = 62380014 ,
  I062_380_S15 = 62380015 , I062_380_S16 = 62380016 , I062_380_S17 = 62380017 , I062_380_S18 = 62380018 ,
  I062_380_S19 = 62380019 , I062_380_S20 = 62380020 , I062_380_S21 = 62380021 , I062_380_S22 = 62380022 ,
  I062_380_S23 = 62380023 , I062_380_S24 = 62380024 , I062_380_S25 = 62380025 , I062_380_S26 = 62380026 ,
  I062_380_S27 = 62380027 , I062_380_S28 = 62380028 , I062_390_S01 = 62390001 , I062_390_S02 = 62390002 ,
  I062_390_S03 = 62390003 , I062_390_S04 = 62390004 , I062_390_S05 = 62390005 , I062_390_S06 = 62390006 ,
  I062_390_S07 = 62390007 , I062_390_S08 = 62390008 , I062_390_S09 = 62390009 , I062_390_S10 = 62390010 ,
  I062_390_S11 = 62390011 , I062_390_S12 = 62390012 , I062_390_S13 = 62390013 , I062_390_S14 = 62390014 ,
  I062_390_S15 = 62390015 , I062_390_S16 = 62390016 , I062_390_S17 = 62390017 , I062_390_S18 = 62390018 ,
  I062_500_S01 = 62500001 , I062_500_S02 = 62500002 , I062_500_S03 = 62500003 , I062_500_S04 = 62500004 ,
  I062_500_S05 = 62500005 , I062_500_S06 = 62500006 , I062_500_S07 = 62500007 , I062_500_S08 = 62500008
}
 Definition of subfield type in each data item. More...

Functions

size_t ast_subfield_get_size (const unsigned char *buffer, const size_t bufsize, const ast_subfield_type_t type)
 Get size of subfield.
const char * ast_subfield_get_id (const ast_subfield_type_t type)
 Get ID string of subfield.
const char * ast_subfield_get_name (const ast_subfield_type_t type)
 Get name of subfield.
void ast_subfield_get_summary (char *summary, const size_t summary_size, const ast_dataitem_t di, const ast_subfield_type_t type)
 Get summary of subfield.
void ast_subfield_get_detail_html (char *detail, const size_t detail_size, const ast_dataitem_t di, const ast_subfield_type_t type)
 Get detail of subfield, in html format.
void ast_subfield_get_bin_html (char *html, const size_t html_size, const ast_subfield_t sf)
 Get binary HTML snippet of subfield.

Detailed Description

ASTERIX subfield processing.

Description:
A subfield is a field within a compound data item, indicated by the Field Specification (FSPEC) of the data item.

Macro Definition Documentation

◆ AST_MAP_SUBFIELD_TYPE_EX

#define AST_MAP_SUBFIELD_TYPE_EX ( category_name,
category_value,
dataitem,
subfield )
Value:
I ## category_name ## _ ## dataitem ## _ ## S ## subfield = category_value ## dataitem ## 0 ## subfield,

Macro used to map subfield type.

A subfield type is an enum value like I062_380_S05, and its value will be 62 * 1000 * 1000 + 380 * 1000 + 005 = 62380005.

Warning
As in C, a value starting with 0 will be treated as octal, the category number shall not contain the preceding 0.

◆ AST_MAX_SUBFIELD_SIZE

#define AST_MAX_SUBFIELD_SIZE   32

Max number of subfield.

◆ AST_SUBFIELD_BIN_HTML_PREFERED_CHARS

#define AST_SUBFIELD_BIN_HTML_PREFERED_CHARS   (AST_MAX_SUBFIELD_SIZE * 128 + 64)

Max number of chars of subfield binary HTML snippet.

◆ AST_SUBFIELD_SUMMARY_PREFERED_CHARS

#define AST_SUBFIELD_SUMMARY_PREFERED_CHARS   summary_size

Preferred number of chars of subfield summary.

Enumeration Type Documentation

◆ ast_subfield_type_t

Definition of subfield type in each data item.

Enumerator
INULLFIELD 

Null subfield.

I004_100_S01 
I004_100_S02 
I004_100_S03 
I004_100_S04 
I004_100_S05 
I004_100_S06 
I004_120_S01 
I004_120_S02 
I004_120_S03 
I004_120_S04 
I004_170_S01 
I004_170_S02 
I004_170_S03 
I004_170_S04 
I004_170_S05 
I004_170_S06 
I004_170_S07 
I004_170_S08 
I004_170_S09 
I004_170_S10 
I004_171_S01 
I004_171_S02 
I004_171_S03 
I004_171_S04 
I004_171_S05 
I004_171_S06 
I004_171_S07 
I004_171_S08 
I004_171_S09 
I004_171_S10 
I015_600_S01 
I015_600_S02 
I015_600_S03 
I015_601_S01 
I015_601_S02 
I015_601_S03 
I015_601_S04 
I015_601_S05 
I015_601_S06 
I015_601_S07 
I015_601_S08 
I015_602_S01 
I015_602_S02 
I015_602_S03 
I015_602_S04 
I015_604_S01 
I015_604_S02 
I015_604_S03 
I015_604_S04 
I015_604_S05 
I015_604_S06 
I015_625_S01 
I015_625_S02 
I015_625_S03 
I015_625_S04 
I015_625_S05 
I015_625_S06 
I015_625_S07 
I015_625_S08 
I015_626_S01 
I015_626_S02 
I015_626_S03 
I015_626_S04 
I015_626_S05 
I015_626_S06 
I015_626_S07 
I015_626_S08 
I015_626_S09 
I015_626_S10 
I015_627_S01 
I015_627_S02 
I015_627_S03 
I015_627_S04 
I015_627_S05 
I015_627_S06 
I021_110_S01 
I021_110_S02 
I021_220_S01 
I021_220_S02 
I021_220_S03 
I021_220_S04 
I021_295_S01 
I021_295_S02 
I021_295_S03 
I021_295_S04 
I021_295_S05 
I021_295_S06 
I021_295_S07 
I021_295_S08 
I021_295_S09 
I021_295_S10 
I021_295_S11 
I021_295_S12 
I021_295_S13 
I021_295_S14 
I021_295_S15 
I021_295_S16 
I021_295_S17 
I021_295_S18 
I021_295_S19 
I021_295_S20 
I021_295_S21 
I021_295_S22 
I021_295_S23 
I034_050_S01 
I034_050_S02 
I034_050_S03 
I034_050_S04 
I034_050_S05 
I034_050_S06 
I034_050_S07 
I034_060_S01 
I034_060_S02 
I034_060_S03 
I034_060_S04 
I034_060_S05 
I034_060_S06 
I034_060_S07 
I048_120_S01 
I048_120_S02 
I048_130_S01 
I048_130_S02 
I048_130_S03 
I048_130_S04 
I048_130_S05 
I048_130_S06 
I048_130_S07 
I062_110_S01 
I062_110_S02 
I062_110_S03 
I062_110_S04 
I062_110_S05 
I062_110_S06 
I062_110_S07 
I062_290_S01 
I062_290_S02 
I062_290_S03 
I062_290_S04 
I062_290_S05 
I062_290_S06 
I062_290_S07 
I062_290_S08 
I062_290_S09 
I062_290_S10 
I062_295_S01 
I062_295_S02 
I062_295_S03 
I062_295_S04 
I062_295_S05 
I062_295_S06 
I062_295_S07 
I062_295_S08 
I062_295_S09 
I062_295_S10 
I062_295_S11 
I062_295_S12 
I062_295_S13 
I062_295_S14 
I062_295_S15 
I062_295_S16 
I062_295_S17 
I062_295_S18 
I062_295_S19 
I062_295_S20 
I062_295_S21 
I062_295_S22 
I062_295_S23 
I062_295_S24 
I062_295_S25 
I062_295_S26 
I062_295_S27 
I062_295_S28 
I062_295_S29 
I062_295_S30 
I062_295_S31 
I062_340_S01 
I062_340_S02 
I062_340_S03 
I062_340_S04 
I062_340_S05 
I062_340_S06 
I062_380_S01 
I062_380_S02 
I062_380_S03 
I062_380_S04 
I062_380_S05 
I062_380_S06 
I062_380_S07 
I062_380_S08 
I062_380_S09 
I062_380_S10 
I062_380_S11 
I062_380_S12 
I062_380_S13 
I062_380_S14 
I062_380_S15 
I062_380_S16 
I062_380_S17 
I062_380_S18 
I062_380_S19 
I062_380_S20 
I062_380_S21 
I062_380_S22 
I062_380_S23 
I062_380_S24 
I062_380_S25 
I062_380_S26 
I062_380_S27 
I062_380_S28 
I062_390_S01 
I062_390_S02 
I062_390_S03 
I062_390_S04 
I062_390_S05 
I062_390_S06 
I062_390_S07 
I062_390_S08 
I062_390_S09 
I062_390_S10 
I062_390_S11 
I062_390_S12 
I062_390_S13 
I062_390_S14 
I062_390_S15 
I062_390_S16 
I062_390_S17 
I062_390_S18 
I062_500_S01 
I062_500_S02 
I062_500_S03 
I062_500_S04 
I062_500_S05 
I062_500_S06 
I062_500_S07 
I062_500_S08 

Function Documentation

◆ ast_subfield_get_bin_html()

void ast_subfield_get_bin_html ( char * html,
const size_t html_size,
const ast_subfield_t sf )

Get binary HTML snippet of subfield.

Function to get a html snippet of the raw subfield data in binary format. The return text will be an html table with data in the cells.

◆ ast_subfield_get_detail_html()

void ast_subfield_get_detail_html ( char * detail,
const size_t detail_size,
const ast_dataitem_t di,
const ast_subfield_type_t type )

Get detail of subfield, in html format.

◆ ast_subfield_get_id()

const char * ast_subfield_get_id ( const ast_subfield_type_t type)

Get ID string of subfield.

◆ ast_subfield_get_name()

const char * ast_subfield_get_name ( const ast_subfield_type_t type)

Get name of subfield.

◆ ast_subfield_get_size()

size_t ast_subfield_get_size ( const unsigned char * buffer,
const size_t bufsize,
const ast_subfield_type_t type )

Get size of subfield.

◆ ast_subfield_get_summary()

void ast_subfield_get_summary ( char * summary,
const size_t summary_size,
const ast_dataitem_t di,
const ast_subfield_type_t type )

Get summary of subfield.