Data Structures | |
struct | ast_dataitem_t |
Dataitem. More... | |
struct | ast_dataitem_ex_t |
Extracted dataitem. More... | |
Macros | |
#define | AST_MAP_DATAITEM_TYPE_EX(category_name, category_value, dataitem_name, dataitem_value) I ## category_name ## _ ## dataitem_name = category_value ## dataitem_value, |
Macro used to map dataitem type. More... | |
#define | SPF 999 |
#define | REF 998 |
#define | A02 902 |
#define | A03 903 |
#define | A04 904 |
#define | A05 905 |
#define | A06 906 |
#define | A07 907 |
#define | A08 908 |
#define | AST_MAX_DATAITEM_SIZE 1024 |
Max data item bytes. More... | |
#define | AST_DATAITEM_SUMMARY_PREFERED_CHARS 256 |
Prefered number of chars of dataitem summary. More... | |
#define | AST_DATAITEM_HEX_STR_PREFERED_CHARS (AST_MAX_DATAITEM_SIZE * 3) |
Prefered number of chars of dataitem hexadecimal string. More... | |
#define | AST_DATAITEM_HEX_HTML_PREFERED_CHARS (AST_MAX_DATAITEM_SIZE * 12 + 128) |
Prefered number of chars of dataitem hexadecimal HTML snippet. More... | |
#define | AST_DATAITEM_BIN_STR_PREFERED_CHARS (AST_MAX_DATAITEM_SIZE * 9) |
Prefered number of chars of dataitem binary string. More... | |
#define | AST_DATAITEM_BIN_HTML_PREFERED_CHARS (AST_MAX_DATAITEM_SIZE * 128 + 64) |
Prefered number of chars of dataitem binary HTML snippet. More... | |
#define | AST_DATAITEM_DETAIL_HTML_PREFERED_CHARS (AST_DATAITEM_HEX_HTML_PREFERED_CHARS + AST_DATAITEM_BIN_HTML_PREFERED_CHARS + 20480) |
Prefered number of chars of data item detail description HTML snippet. More... | |
Enumerations | |
enum | ast_dataitem_type_t { INULLITEM = 0, I001_010 = 1010, I001_020 = 1020, I001_030 = 1030, I001_040 = 1040, I001_042 = 1042, I001_050 = 1050, I001_060 = 1060, I001_070 = 1070, I001_080 = 1080, I001_090 = 1090, I001_100 = 1100, I001_120 = 1120, I001_130 = 1130, I001_131 = 1131, I001_141 = 1141, I001_150 = 1150, I001_161 = 1161, I001_170 = 1170, I001_200 = 1200, I001_210 = 1210, I001_REF = 1998, I002_000 = 2000, I002_010 = 2010, I002_020 = 2020, I002_030 = 2030, I002_041 = 2041, I002_050 = 2050, I002_060 = 2060, I002_070 = 2070, I002_080 = 2080, I002_090 = 2090, I002_100 = 2100, I002_SPF = 2999, I004_000 = 4000, I004_010 = 4010, I004_015 = 4015, I004_020 = 4020, I004_030 = 4030, I004_035 = 4035, I004_040 = 4040, I004_045 = 4045, I004_060 = 4060, I004_070 = 4070, I004_074 = 4074, I004_075 = 4075, I004_076 = 4076, I004_100 = 4100, I004_110 = 4110, I004_120 = 4120, I004_170 = 4170, I004_171 = 4171, I008_000 = 8000, I008_010 = 8010, I008_020 = 8020, I008_034 = 8034, I008_036 = 8036, I008_038 = 8038, I008_040 = 8040, I008_050 = 8050, I008_090 = 8090, I008_100 = 8100, I008_110 = 8110, I008_120 = 8120, I010_000 = 10000, I010_010 = 10010, I010_020 = 10020, I010_040 = 10040, I010_041 = 10041, I010_042 = 10042, I010_060 = 10060, I010_090 = 10090, I010_091 = 10091, I010_131 = 10131, I010_140 = 10140, I010_161 = 10161, I010_170 = 10170, I010_200 = 10200, I010_202 = 10202, I010_210 = 10210, I010_220 = 10220, I010_245 = 10245, I010_250 = 10250, I010_270 = 10270, I010_280 = 10280, I010_300 = 10300, I010_310 = 10310, I010_500 = 10500, I010_550 = 10550, I010_REF = 10998, I010_SPF = 10999, I019_000 = 19000, I019_010 = 19010, I019_140 = 19140, I019_550 = 19550, I019_551 = 19551, I019_552 = 19552, I019_553 = 19553, I019_600 = 19600, I019_610 = 19610, I019_620 = 19620, I020_010 = 20010, I020_020 = 20020, I020_030 = 20030, I020_041 = 20041, I020_042 = 20042, I020_050 = 20050, I020_055 = 20055, I020_070 = 20070, I020_090 = 20090, I020_100 = 20100, I020_105 = 20105, I020_110 = 20110, I020_140 = 20140, I020_161 = 20161, I020_170 = 20170, I020_202 = 20202, I020_210 = 20210, I020_220 = 20220, I020_230 = 20230, I020_245 = 20245, I020_250 = 20250, I020_260 = 20260, I020_300 = 20300, I020_310 = 20310, I020_400 = 20400, I020_500 = 20500, I020_REF = 20998, I020_SPF = 20999, I021_008 = 21008, I021_010 = 21010, I021_015 = 21015, I021_016 = 21016, I021_020 = 21020, I021_030 = 21030, I021_032 = 21032, I021_040 = 21040, I021_070 = 21070, I021_071 = 21071, I021_072 = 21072, I021_073 = 21073, I021_074 = 21074, I021_075 = 21075, I021_076 = 21076, I021_077 = 21077, I021_080 = 21080, I021_090 = 21090, I021_095 = 21095, I021_110 = 21110, I021_130 = 21130, I021_131 = 21131, I021_132 = 21132, I021_140 = 21140, I021_145 = 21145, I021_146 = 21146, I021_148 = 21148, I021_150 = 21150, I021_151 = 21151, I021_152 = 21152, I021_155 = 21155, I021_157 = 21157, I021_160 = 21160, I021_161 = 21161, I021_165 = 21165, I021_170 = 21170, I021_200 = 21200, I021_210 = 21210, I021_220 = 21220, I021_230 = 21230, I021_250 = 21250, I021_260 = 21260, I021_271 = 21271, I021_295 = 21295, I021_400 = 21400, I021_REF = 21998, I021_SPF = 21999, I021_A02 = 21902, I021_A03 = 21903, I021_A04 = 21904, I021_A05 = 21905, I021_A06 = 21906, I021_A07 = 21907, I021_A08 = 21908, I023_000 = 23000, I023_010 = 23010, I023_015 = 23015, I023_070 = 23070, I023_100 = 23100, I023_101 = 23101, I023_110 = 23110, I023_120 = 23120, I023_200 = 23200, I033_001 = 33001, I033_002 = 33002, I033_003 = 33003, I033_004 = 33004, I033_005 = 33005, I033_006 = 33006, I033_007 = 33007, I033_008 = 33008, I033_009 = 33009, I033_010 = 33010, I033_011 = 33011, I033_012 = 33012, I033_013 = 33013, I033_014 = 33014, I033_015 = 33015, I033_017 = 33017, I033_018 = 33018, I034_000 = 34000, I034_010 = 34010, I034_020 = 34020, I034_030 = 34030, I034_041 = 34041, I034_050 = 34050, I034_060 = 34060, I034_070 = 34070, I034_090 = 34090, I034_100 = 34100, I034_110 = 34110, I034_120 = 34120, I034_REF = 34998, I034_SPF = 34999, I048_010 = 48010, I048_020 = 48020, I048_030 = 48030, I048_040 = 48040, I048_050 = 48050, I048_055 = 48055, I048_060 = 48060, I048_065 = 48065, I048_042 = 48042, I048_070 = 48070, I048_080 = 48080, I048_090 = 48090, I048_100 = 48100, I048_110 = 48110, I048_120 = 48120, I048_130 = 48130, I048_140 = 48140, I048_161 = 48161, I048_170 = 48170, I048_200 = 48200, I048_210 = 48210, I048_220 = 48220, I048_230 = 48230, I048_240 = 48240, I048_250 = 48250, I048_260 = 48260, I048_REF = 48998, I048_SPF = 48999, I062_010 = 62010, I062_015 = 62015, I062_040 = 62040, I062_060 = 62060, I062_070 = 62070, I062_080 = 62080, I062_100 = 62100, I062_105 = 62105, I062_110 = 62110, I062_120 = 62120, I062_130 = 62130, I062_135 = 62135, I062_136 = 62136, I062_185 = 62185, I062_200 = 62200, I062_210 = 62210, I062_220 = 62220, I062_245 = 62245, I062_270 = 62270, I062_290 = 62290, I062_295 = 62295, I062_300 = 62300, I062_340 = 62340, I062_380 = 62380, I062_390 = 62390, I062_500 = 62500, I062_510 = 62510, I062_REF = 62998, I062_SPF = 62999, I065_000 = 65000, I065_010 = 65010, I065_015 = 65015, I065_020 = 65020, I065_030 = 65030, I065_040 = 65040, I065_050 = 65050, I240_000 = 240000, I240_010 = 240010, I240_020 = 240020, I240_030 = 240030, I240_040 = 240040, I240_041 = 240041, I240_048 = 240048, I240_049 = 240049, I240_050 = 240050, I240_051 = 240051, I240_052 = 240052, I240_140 = 240140, I240_REF = 240998, I240_SPF = 240999 } |
Definition of data item id in each category. More... | |
Functions | |
const char * | ast_dataitem_type_to_str (const ast_dataitem_type_t type) |
Convert from ast_dataitem_type_t to C string. More... | |
ast_dataitem_t | ast_dataitem_decode (const unsigned char *buffer, const size_t bufsize, const ast_dataitem_type_t type) |
Decode data item from binary data. More... | |
ast_dataitem_t | ast_dataitem_encode (unsigned char *const buffer, const size_t bufsize, const ast_dataitem_ex_t xdi) |
Encode. More... | |
ast_dataitem_t | ast_dataitem_copy (unsigned char *const buffer, const size_t bufsize, const ast_dataitem_t src) |
Copy data item to binary buffer. More... | |
size_t | ast_dataitem_get_size (const unsigned char *buffer, const size_t bufsize, const ast_dataitem_type_t type) |
Function to get size of one dataitem. More... | |
size_t | ast_dataitem_get_size_fixed (const unsigned char *buffer, const size_t bufsize, const size_t fix_size) |
Utility funciton to get fixed dataitem size. More... | |
size_t | ast_dataitem_get_size_fixed_1_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_fixed_2_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_fixed_3_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_fixed_4_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_fixed_5_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_fixed_6_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_fixed_7_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_fixed_8_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_fixed_9_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_fixed_12_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_variable (const unsigned char *buffer, const size_t bufsize, const size_t max_size) |
Utility funciton to get FX extendable dataitem size. More... | |
size_t | ast_dataitem_get_size_var_1_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_var_2_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_var_3_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_var_4_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_var_5_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_var_6_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_var_23_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_var_unlimited (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_repeat (const unsigned char *buffer, const size_t bufsize, const size_t unit_size) |
Utility function to get repeated dataitem size. More... | |
size_t | ast_dataitem_get_size_rep_1_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_rep_2_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_rep_3_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_rep_4_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_rep_8_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_rep_15_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_rep_64_byte (const unsigned char *buffer, const size_t bufsize) |
size_t | ast_dataitem_get_size_rep_256_byte (const unsigned char *buffer, const size_t bufsize) |
const char * | ast_dataitem_get_name (const ast_dataitem_type_t type) |
Function to get name of one dataitem. More... | |
void | ast_dataitem_get_summary (char *summary, const size_t summary_size, const ast_dataitem_t di) |
Function to get summary of one dataitem. More... | |
void | ast_dataitem_get_hex_str (char *string, const size_t string_size, ast_dataitem_t di) |
Function to get raw dataitem data in hexadecimal format. More... | |
void | ast_dataitem_get_hex_html (char *html, const size_t html_size, const ast_dataitem_t di) |
Function to get a html snippet of the raw dataitem data in hexadecimal format. More... | |
void | ast_dataitem_get_bin_str (char *string, const size_t string_size, const ast_dataitem_t di) |
Function to get raw dataitem data in binary format. More... | |
void | ast_dataitem_get_bin_html (char *html, const size_t html_size, const ast_dataitem_t di) |
Function to get a html snippet of the raw dataitem data in binary format. More... | |
void | ast_dataitem_get_detail_html (char *detail, const size_t detail_size, const ast_dataitem_t di) |
Function to get a html snippet of detailed description of dataitem. More... | |
void | ast_dataitem_get_detail_html_dummy (char *detail, const size_t detail_size, const ast_dataitem_t di) |
Dummy get detail function. More... | |
#define A02 902 |
#define A03 903 |
#define A04 904 |
#define A05 905 |
#define A06 906 |
#define A07 907 |
#define A08 908 |
#define AST_DATAITEM_BIN_HTML_PREFERED_CHARS (AST_MAX_DATAITEM_SIZE * 128 + 64) |
Prefered number of chars of dataitem binary HTML snippet.
#define AST_DATAITEM_BIN_STR_PREFERED_CHARS (AST_MAX_DATAITEM_SIZE * 9) |
Prefered number of chars of dataitem binary string.
#define AST_DATAITEM_DETAIL_HTML_PREFERED_CHARS (AST_DATAITEM_HEX_HTML_PREFERED_CHARS + AST_DATAITEM_BIN_HTML_PREFERED_CHARS + 20480) |
Prefered number of chars of data item detail description HTML snippet.
#define AST_DATAITEM_HEX_HTML_PREFERED_CHARS (AST_MAX_DATAITEM_SIZE * 12 + 128) |
Prefered number of chars of dataitem hexadecimal HTML snippet.
#define AST_DATAITEM_HEX_STR_PREFERED_CHARS (AST_MAX_DATAITEM_SIZE * 3) |
Prefered number of chars of dataitem hexadecimal string.
#define AST_DATAITEM_SUMMARY_PREFERED_CHARS 256 |
Prefered number of chars of dataitem summary.
#define AST_MAP_DATAITEM_TYPE_EX | ( | category_name, | |
category_value, | |||
dataitem_name, | |||
dataitem_value | |||
) | I ## category_name ## _ ## dataitem_name = category_value ## dataitem_value, |
Macro used to map dataitem type.
A dataitem type is an enum value like I062_380, and its value will be 62 * 1000 + 380 = 62380.
#define AST_MAX_DATAITEM_SIZE 1024 |
Max data item bytes.
#define REF 998 |
#define SPF 999 |
Special dataitems SPF and REF are widly used in different categories by different manufecturers AXX are old version of dataitems that are not competible with its new version
enum ast_dataitem_type_t |
Definition of data item id in each category.
ast_dataitem_t ast_dataitem_copy | ( | unsigned char *const | buffer, |
const size_t | bufsize, | ||
const ast_dataitem_t | src | ||
) |
Copy data item to binary buffer.
ast_dataitem_t ast_dataitem_decode | ( | const unsigned char * | buffer, |
const size_t | bufsize, | ||
const ast_dataitem_type_t | type | ||
) |
Decode data item from binary data.
ast_dataitem_t ast_dataitem_encode | ( | unsigned char *const | buffer, |
const size_t | bufsize, | ||
const ast_dataitem_ex_t | xdi | ||
) |
Encode.
void ast_dataitem_get_bin_html | ( | char * | html, |
const size_t | html_size, | ||
const ast_dataitem_t | di | ||
) |
Function to get a html snippet of the raw dataitem data in binary format.
The return text will be an html table with data in the cells.
void ast_dataitem_get_bin_str | ( | char * | string, |
const size_t | string_size, | ||
const ast_dataitem_t | di | ||
) |
Function to get raw dataitem data in binary format.
There will be an space between each byte. E.g. "10011111 10100110 10001111"
void ast_dataitem_get_detail_html | ( | char * | detail, |
const size_t | detail_size, | ||
const ast_dataitem_t | di | ||
) |
Function to get a html snippet of detailed description of dataitem.
detail | Buffer to save the html snippet |
detail_size | Buffer size |
di | Dataitem |
The returned html fragment contains only basic elements used in html body, such as <br/> <h> <table>....
This function will return only semantics markups, some elements will cantaion class name, and it's recomanded the libary user to use CSS to format the html style.
void ast_dataitem_get_detail_html_dummy | ( | char * | detail, |
const size_t | detail_size, | ||
const ast_dataitem_t | di | ||
) |
Dummy get detail function.
For some data items, it's not necesary to implement a get_detail_html function. In this case, the dataitem's get_detail_html_func can be register to this dummy function. It' will only set detail as a NULL string and do nothing else.
void ast_dataitem_get_hex_html | ( | char * | html, |
const size_t | html_size, | ||
const ast_dataitem_t | di | ||
) |
Function to get a html snippet of the raw dataitem data in hexadecimal format.
The return text will be an html table with data in the cells.
void ast_dataitem_get_hex_str | ( | char * | string, |
const size_t | string_size, | ||
ast_dataitem_t | di | ||
) |
Function to get raw dataitem data in hexadecimal format.
There will be an space between each byte. E.g. "0f 37 4a 5e"
const char* ast_dataitem_get_name | ( | const ast_dataitem_type_t | type | ) |
Function to get name of one dataitem.
Name is the title of each dataitem defined in Eurocontrol ASTERIX documentation
size_t ast_dataitem_get_size | ( | const unsigned char * | buffer, |
const size_t | bufsize, | ||
const ast_dataitem_type_t | type | ||
) |
Function to get size of one dataitem.
size_t ast_dataitem_get_size_fixed | ( | const unsigned char * | buffer, |
const size_t | bufsize, | ||
const size_t | fix_size | ||
) |
Utility funciton to get fixed dataitem size.
size_t ast_dataitem_get_size_fixed_12_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_fixed_1_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_fixed_2_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_fixed_3_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_fixed_4_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_fixed_5_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_fixed_6_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_fixed_7_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_fixed_8_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_fixed_9_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_rep_15_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_rep_1_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_rep_256_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_rep_2_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_rep_3_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_rep_4_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_rep_64_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_rep_8_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_repeat | ( | const unsigned char * | buffer, |
const size_t | bufsize, | ||
const size_t | unit_size | ||
) |
Utility function to get repeated dataitem size.
size_t ast_dataitem_get_size_var_1_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_var_23_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_var_2_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_var_3_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_var_4_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_var_5_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_var_6_byte | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_var_unlimited | ( | const unsigned char * | buffer, |
const size_t | bufsize | ||
) |
size_t ast_dataitem_get_size_variable | ( | const unsigned char * | buffer, |
const size_t | bufsize, | ||
const size_t | max_size | ||
) |
Utility funciton to get FX extendable dataitem size.
void ast_dataitem_get_summary | ( | char * | summary, |
const size_t | summary_size, | ||
const ast_dataitem_t | di | ||
) |
Function to get summary of one dataitem.
summary | Buffer to save the summary string |
summary_size | Buffer size |
di | Dataitem |
Summary is a human readable string including the main data of dataitem
const char* ast_dataitem_type_to_str | ( | const ast_dataitem_type_t | type | ) |