29#ifndef LIBASTERIX_DATARECORD_H
30#define LIBASTERIX_DATARECORD_H
57#define AST_MAX_DATAITEMS 32
60typedef struct _ast_datarecord_t
76typedef struct _ast_datarecord_ex_t
86typedef struct _ast_datarecord_modifier_t
150#define AST_DATARECORD_HEX_HTML_PREFERED_CHARS (AST_MAX_DATAITEMS * AST_MAX_DATAITEM_SIZE * 12 + 128)
160#define AST_DATARECORD_DETAIL_HTML_PREFERED_CHARS 20480
198#define AST_KEYWORD_VALUE_PREFERRED_CHARS 32
This file includes the common used data items shares by different categories.
ast_category_t
Definition of category ID.
Definition category.h:38
ASTERIX Field Specification (FSPEC).
ast_datarecord_t ast_datarecord_encode(unsigned char *const buffer, const size_t bufsize, const ast_datarecord_ex_t xdr)
Datarecord encode function.
ast_polar_coordinate_t ast_datarecord_get_polarcoord(const ast_datarecord_t dr)
Get polar coordinate from specified datarecord.
bool ast_datarecord_contain_keyword(const ast_datarecord_t dr, const ast_keyword_t keyword)
Check if datarecord contains specified keyword type.
ast_datarecord_t ast_datarecord_decode(const unsigned char *buffer, const size_t bufsize, const ast_category_t category, const ast_uap_t uap)
Datarecord decode function.
bool ast_datarecord_match_keyword(const ast_datarecord_t dr, const ast_keyword_t keyword, const char *challenge, bool case_sensitive)
Match a specified keyword in the datarecord.
void ast_datarecord_get_hex_html(char *html, const size_t html_size, const ast_datarecord_t dr)
Function to get a html snippet of the raw datarecord data in hexadecimal format.
ast_squawk_t ast_datarecord_get_squawk(const ast_datarecord_t dr)
Get Mode-3/A code from specified datarecord.
#define AST_MAX_DATAITEMS
Maximum number of data items in a data record.
Definition datarecord.h:57
ast_timeofday_t ast_datarecord_get_timeofday(const ast_datarecord_t dr)
Get time of day from specified datarecord.
ast_altitude_t ast_datarecord_get_selaltitude(const ast_datarecord_t dr)
Get FMS/MCP/FCU selected altitude from specified datarecord.
ast_sacsic_t ast_datarecord_get_sacsic(const ast_datarecord_t dr)
Get SAC/SIC from specified datarecord.
void ast_datarecord_get_detail_html(char *detail, const size_t detail_size, const ast_datarecord_t dr)
Function to get a html snippet of detailed description of data record.
ast_speed_t ast_datarecord_get_speed(const ast_datarecord_t dr)
Get speed from specified datarecord.
ast_heading_t ast_datarecord_get_heading(const ast_datarecord_t dr)
Get heading from specified datarecord.
ast_azimuth_t ast_datarecord_get_azimuth(const ast_datarecord_t dr)
Get azimuth from specified datarecord.
ast_callsign_t ast_datarecord_get_callsign(const ast_datarecord_t dr)
Get callsign from specified datarecord.
ast_datarecord_t ast_datarecord_copy(unsigned char *buffer, const size_t bufsize, const ast_datarecord_t src)
Datarecord copy function.
ast_wgs84coord_t ast_datarecord_get_wgs84coord(const ast_datarecord_t dr)
Get WGS-84 coordinate from specified datarecord.
ast_tracknum_t ast_datarecord_get_tracknum(const ast_datarecord_t dr)
Get track number from specified datarecord.
ast_icaoaddr_t ast_datarecord_get_icaoaddr(const ast_datarecord_t dr)
Get ICAO 24-bit address from specified datarecord.
ast_range_t ast_datarecord_get_range(const ast_datarecord_t dr)
Get range from specified datarecord.
ast_vertical_rate_t ast_datarecord_get_vrate(const ast_datarecord_t dr)
Get vertical rate from specified datarecord.
ast_cartesian_velocity_t ast_datarecord_get_cartesianvel(const ast_datarecord_t dr)
Get cartesian velocity from specified datarecord.
ast_doppler_velocity_t ast_datarecord_get_dopplervel(const ast_datarecord_t dr)
Get doppler velocity from specified datarecord.
ast_altitude_t ast_datarecord_get_flightlevel(const ast_datarecord_t dr)
Get flight level from specified datarecord.
ast_datarecord_t ast_datarecord_modify(unsigned char *buffer, const size_t bufsize, const ast_datarecord_t src, const ast_datarecord_modifier_t mod)
Datarecord modify function.
bool ast_datarecord_get_keyword(char *keystr, const size_t keystr_size, const ast_datarecord_t dr, const ast_keyword_t keyword, const ast_keyword_format_t format)
Get keyword summary string from specified datarecord.
ast_msgtype_t ast_datarecord_get_msgtype(const ast_datarecord_t dr)
Get message type from specified datarecord.
Utility functions to match dataitem, datarecord, datablock by keywords.
ast_keyword_format_t
Definition match.h:63
ast_keyword_t
Definition match.h:35
Altitude.
Definition type.h:117
Azimuth.
Definition type.h:150
Callsign.
Definition type.h:95
Cartesian Velocity.
Definition type.h:177
Extracted dataitem.
Definition dataitem.h:526
Dataitem.
Definition dataitem.h:515
Extracted datarecord.
Definition datarecord.h:77
ast_uap_t uap
UAP of data record.
Definition datarecord.h:79
ast_dataitem_ex_t dataitems[32]
Data items.
Definition datarecord.h:81
size_t n_dataitems
Number of data items.
Definition datarecord.h:82
ast_category_t category
Category of data record.
Definition datarecord.h:78
Datarecord modifier.
Definition datarecord.h:87
ast_dataitem_ex_t dataitems[32]
Data items to be modified.
Definition datarecord.h:88
size_t n_dataitems
Number of data items.
Definition datarecord.h:89
Datarecord.
Definition datarecord.h:61
ast_fspec_t fspec
Field specification.
Definition datarecord.h:68
bool valid
True, if data record is correctly decoded.
Definition datarecord.h:72
size_t size
Size of data record.
Definition datarecord.h:63
ast_dataitem_t dataitems[32]
Data items.
Definition datarecord.h:69
ast_category_t category
Category of data record.
Definition datarecord.h:65
const unsigned char * data
Address of data record.
Definition datarecord.h:62
size_t n_dataitems
Number of data items.
Definition datarecord.h:70
ast_uap_t uap
UAP of data record.
Definition datarecord.h:66
Doppler Velocity.
Definition type.h:186
Field Specification (FSPEC).
Definition fspec.h:56
Heading.
Definition type.h:157
ICAO 24-bit Address.
Definition type.h:102
Polar Coordinate.
Definition type.h:135
Range.
Definition type.h:143
Data Source Identifier (aka SAC/SIC).
Definition type.h:36
Speed.
Definition type.h:169
Squawk (aka Mode-3/A Code).
Definition type.h:86
Time of day.
Definition type.h:44
Track Number.
Definition type.h:79
Vertical Rate.
Definition type.h:194
WGS-84 2D Coordinate.
Definition type.h:109
Type defination for general data types.
ASTERIX User Application Profile (UAP).