Mode-S transponder Binary Data Source (BDS) register processing. More...

Collaboration diagram for BDS:

Topics

 BDS 0,5 - Extended Squitter Airborne Position
 Extended squitter airborne position.
 BDS 0,8 - Extended Squitter Identification and Category
 Extended squitter identification and category.
 BDS 0,9 - Extended Squitter Airborne Velocity
 Extended squitter airborne velocity.
 BDS 1,0 - Data Link Capability Report
 Data link capability report.
 BDS 2,0 - Aircraft Identification
 Aircraft identification.
 BDS 3,0 - TCAS/ACAS Active Resolution Advisory
 TCAS/ACAS active resolution advisory.
 BDS 4,0 - Selected Vertical Intention
 Selected vertical intention.
 BDS 5,0 - Track and Turn Report
 Track and turn report.
 BDS 6,0 - Heading and Speed Report
 Heading and speed report.

Data Structures

struct  ast_bds_t
 Binary Data Source (BDS). More...

Macros

#define AST_MAP_BDS_TYPE(msb, lsb)
 Macro used to map BDS type.
#define AST_MAX_BDS   8
 Max number of BDS in one data item.
#define AST_BDS_SIZE   7
 BDS bytes.
#define AST_BDS_DETAIL_HTML_PREFERED_CHARS   20480
 Prefered number of chars of BDS detail description HTML snippet.

Enumerations

enum  ast_bds_type_t {
  BDS00 = 0x00 , BDS05 = 0x05 , BDS06 = 0x06 , BDS07 = 0x07 ,
  BDS08 = 0x08 , BDS09 = 0x09 , BDS0A = 0x0A , BDS10 = 0x10 ,
  BDS17 = 0x17 , BDS20 = 0x20 , BDS30 = 0x30 , BDS40 = 0x40 ,
  BDS50 = 0x50 , BDS60 = 0x60 , BDS61 = 0x61 , BDS62 = 0x62 ,
  BDS65 = 0x65 , BDSE1 = 0xE1
}
 Definition of BDS type. More...

Functions

const char * ast_bds_type_to_str (const ast_bds_type_t type)
 Convert from ast_bds_type_t to C string.
const char * ast_bds_type_to_str_simple (const ast_bds_type_t type)
 Convert from ast_bds_type_t to C string simple version.
ast_bds_t ast_bds_decode (const unsigned char *buffer, const size_t bufsize, const ast_bds_type_t type)
 Decode BDS from binary data.
const char * ast_bds_get_name (const ast_bds_type_t type)
 Function to get name of one BDS.
void ast_bds_get_detail_html (char *detail, const size_t detail_size, const ast_bds_t bds)
 Function to get a html snippet of detailed description of dataitem.
void ast_bds_get_detail_html_dummy (char *detail, const size_t detail_size, const ast_bds_t bds)
 Dummy get detail function.

Detailed Description

Mode-S transponder Binary Data Source (BDS) register processing.

Macro Definition Documentation

◆ AST_BDS_DETAIL_HTML_PREFERED_CHARS

#define AST_BDS_DETAIL_HTML_PREFERED_CHARS   20480

Prefered number of chars of BDS detail description HTML snippet.

◆ AST_BDS_SIZE

#define AST_BDS_SIZE   7

BDS bytes.

◆ AST_MAP_BDS_TYPE

#define AST_MAP_BDS_TYPE ( msb,
lsb )
Value:
BDS ## msb ## lsb = 0x ## msb ## lsb,

Macro used to map BDS type.

A BDS type is an enum value like BDS40, and it's value will be 0x40.

◆ AST_MAX_BDS

#define AST_MAX_BDS   8

Max number of BDS in one data item.

Enumeration Type Documentation

◆ ast_bds_type_t

Definition of BDS type.

Enumerator
BDS00 

Null (Invalid) BDS.

BDS05 
BDS06 
BDS07 
BDS08 
BDS09 
BDS0A 
BDS10 
BDS17 
BDS20 
BDS30 
BDS40 
BDS50 
BDS60 
BDS61 
BDS62 
BDS65 
BDSE1 

Function Documentation

◆ ast_bds_decode()

ast_bds_t ast_bds_decode ( const unsigned char * buffer,
const size_t bufsize,
const ast_bds_type_t type )

Decode BDS from binary data.

◆ ast_bds_get_detail_html()

void ast_bds_get_detail_html ( char * detail,
const size_t detail_size,
const ast_bds_t bds )

Function to get a html snippet of detailed description of dataitem.

Parameters
detailBuffer to save the html snippet
detail_sizeBuffer size
bdsBDS

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.

◆ ast_bds_get_detail_html_dummy()

void ast_bds_get_detail_html_dummy ( char * detail,
const size_t detail_size,
const ast_bds_t bds )

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.

◆ ast_bds_get_name()

const char * ast_bds_get_name ( const ast_bds_type_t type)

Function to get name of one BDS.

Name is the title of each BDS defined in RTCA documentation

◆ ast_bds_type_to_str()

const char * ast_bds_type_to_str ( const ast_bds_type_t type)

Convert from ast_bds_type_t to C string.

Returns
string like "BDS4,0";
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ast_bds_type_to_str_simple()

const char * ast_bds_type_to_str_simple ( const ast_bds_type_t type)

Convert from ast_bds_type_t to C string simple version.

Returns
string like "4,0";
Here is the call graph for this function:
Here is the caller graph for this function: