cat004.h
Go to the documentation of this file.
1 /*
2  * libasterix
3  * Copyright [2013-2020] SinoATC <http://www.sinoatc.com>.
4  * All Rights Reserved.
5  *
6  * NOTICE: All information contained herein is, and remains
7  * the property of SinoATC and its suppliers, if any.
8  * The intellectual and technical concepts contained herein
9  * are proprietary to Aerosys Corporation and its suppliers and may be
10  * covered by U.S. and Foreign Patents, patents in process,
11  * and are protected by trade secret or copyright law.
12  * Dissemination of this information or reproduction of this material
13  * is strictly forbidden unless prior written permission is obtained
14  * from SinoATC.
15  */
16 
24 #ifndef LIBASTERIX_CAT004_H
25 #define LIBASTERIX_CAT004_H
26 
27 #include "dataitem.h"
28 #include "datarecord.h"
29 #include "subfield.h"
30 #include "cat_generic.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 // Data Item
37 
40 
46 typedef enum _ast_snet_message_type_t
48 {
89 
90  //Customized types not defined in standard
92 
94 
96 #define AST_MAX_SNET_MESSAGE_TYPES 64
97 
100 
103 
106 
108 #define ast_dataitem_004_000_get_size ast_dataitem_message_type_get_size
109 
111 #define ast_dataitem_004_000_decode ast_dataitem_message_type_decode
112 
114 #define ast_dataitem_004_000_encode ast_dataitem_message_type_encode
115 
117 AST_API void ast_dataitem_004_000_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
118 
120 AST_API void ast_dataitem_004_000_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
121 
131 #define ast_dataitem_004_010_get_size ast_dataitem_data_source_identifier_get_size
132 #define ast_dataitem_004_010_decode ast_dataitem_data_source_identifier_decode
133 #define ast_dataitem_004_010_encode ast_dataitem_data_source_identifier_encode
134 #define ast_dataitem_004_010_get_summary ast_dataitem_data_source_identifier_get_summary
135 #define ast_dataitem_004_010_get_detail_html ast_dataitem_data_source_identifier_get_detail_html
136 
147 
149 #define ast_dataitem_004_020_get_size ast_dataitem_time_of_day_get_size
150 
152 #define ast_dataitem_004_020_decode ast_dataitem_time_of_day_decode
153 
155 #define ast_dataitem_004_020_encode ast_dataitem_time_of_day_encode
156 
158 #define ast_dataitem_004_020_get_summary ast_dataitem_time_of_day_get_summary
159 
161 #define ast_dataitem_004_020_get_detail_html ast_dataitem_time_of_day_get_detail_html
162 
173 
175 #define ast_dataitem_004_030_get_size ast_dataitem_track_number_get_size
176 
178 #define ast_dataitem_004_030_decode ast_dataitem_track_number_decode
179 
181 #define ast_dataitem_004_030_encode ast_dataitem_track_number_encode
182 
184 #define ast_dataitem_004_030_get_summary ast_dataitem_track_number_get_summary
185 
187 #define ast_dataitem_004_030_get_detail_html ast_dataitem_track_number_get_detail_html
188 
199 
201 #define ast_dataitem_004_035_get_size ast_dataitem_track_number_get_size
202 
204 #define ast_dataitem_004_035_decode ast_dataitem_track_number_decode
205 
207 #define ast_dataitem_004_035_encode ast_dataitem_track_number_encode
208 
210 #define ast_dataitem_004_035_get_summary ast_dataitem_track_number_get_summary
211 
213 #define ast_dataitem_004_035_get_detail_html ast_dataitem_track_number_get_detail_html
214 
223 typedef struct _ast_dataitem_004_040_t
225 {
226  bool valid;
227 
228  unsigned int alert_id;
230 
232 #define ast_dataitem_004_040_get_size ast_dataitem_get_size_fixed_2_byte
233 
236 
238 AST_API ast_dataitem_t ast_dataitem_004_040_encode(unsigned char* const buffer, const size_t buf_size, const ast_dataitem_ex_t xdi);
239 
241 AST_API void ast_dataitem_004_040_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
242 
244 #define ast_dataitem_004_040_get_detail_html ast_dataitem_get_detail_html_dummy;
245 
254 typedef struct _ast_dataitem_004_060_t
256 {
257  bool valid;
258 
259  size_t n_functions;
263 
265 #define ast_dataitem_004_060_get_size ast_dataitem_get_size_var_6_byte
266 
269 
271 AST_API void ast_dataitem_004_060_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di);
272 
274 AST_API void ast_dataitem_004_060_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di);
275 
284 typedef struct _ast_dataitem_004_100_t
286 {
287  bool valid;
288 
290  size_t n_subfields;
291 
292  //subfield #1
294  char an_name[9];
295 
297 
299 size_t ast_dataitem_004_100_get_size(const unsigned char *buffer, const size_t bufsize);
300 
303 
305 #define ast_dataitem_004_100_get_summary ast_dataitem_subfields_get_summary
306 
308 #define ast_dataitem_004_100_get_detail_html ast_dataitem_subfields_get_detail_html
309 
311 AST_API size_t ast_subfield_004_100_get_size(const unsigned char* buffer, const size_t bufsize, const ast_subfield_type_t type);
312 
315 
318 
320 AST_API void ast_subfield_004_100_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di, const ast_subfield_type_t type);
321 
323 AST_API void ast_subfield_004_100_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di, const ast_subfield_type_t type);
324 
333 typedef struct _ast_dataitem_004_120_t
335 {
336  bool valid;
337 
339  size_t n_subfields;
340 
341  //subfield #2
343  unsigned int cc_table_id;
344  unsigned int cc_conflict_property;
345  unsigned int cc_conflict_severity;
347 
349 size_t ast_dataitem_004_120_get_size(const unsigned char *buffer, const size_t bufsize);
350 
353 
355 #define ast_dataitem_004_120_get_summary ast_dataitem_subfields_get_summary
356 
358 #define ast_dataitem_004_120_get_detail_html ast_dataitem_subfields_get_detail_html
359 
361 AST_API size_t ast_subfield_004_120_get_size(const unsigned char* buffer, const size_t bufsize, const ast_subfield_type_t type);
362 
365 
368 
370 AST_API void ast_subfield_004_120_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di, const ast_subfield_type_t type);
371 
373 AST_API void ast_subfield_004_120_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di, const ast_subfield_type_t type);
374 
383 typedef struct _ast_dataitem_004_170_t
385 {
386  bool valid;
387 
389  size_t n_subfields;
390 
391  //subfield #2
393  int m3_code;
395 
397 size_t ast_dataitem_004_170_get_size(const unsigned char *buffer, const size_t bufsize);
398 
401 
403 #define ast_dataitem_004_170_get_summary ast_dataitem_subfields_get_summary
404 
406 #define ast_dataitem_004_170_get_detail_html ast_dataitem_subfields_get_detail_html
407 
409 AST_API size_t ast_subfield_004_170_get_size(const unsigned char* buffer, const size_t bufsize, const ast_subfield_type_t type);
410 
413 
416 
418 AST_API void ast_subfield_004_170_get_summary(char* summary, const size_t summary_size, const ast_dataitem_t di, const ast_subfield_type_t type);
419 
421 AST_API void ast_subfield_004_170_get_detail_html(char* detail, const size_t detail_size, const ast_dataitem_t di, const ast_subfield_type_t type);
422 
433 
435 size_t ast_dataitem_004_171_get_size(const unsigned char *buffer, const size_t bufsize);
436 
438 #define ast_dataitem_004_171_decode ast_dataitem_004_170_decode
439 
441 #define ast_dataitem_004_171_get_summary ast_dataitem_subfields_get_summary
442 
444 #define ast_dataitem_004_171_get_detail_html ast_dataitem_subfields_get_detail_html
445 
447 AST_API size_t ast_subfield_004_171_get_size(const unsigned char* buffer, const size_t bufsize, const ast_subfield_type_t type);
448 
451 
454 
456 #define ast_subfield_004_171_get_summary ast_subfield_004_170_get_summary
457 
459 #define ast_subfield_004_171_get_detail_html ast_subfield_004_170_get_detail_html
460 
464 // Data Record
465 
471 typedef struct _ast_datarecord_004_t
473 {
474  bool valid;
475 
487 
489 
492 
494 //AST_API ast_datarecord_t ast_datarecord_004_assemble(unsigned char* const buffer, const size_t bufsize, const ast_datarecord_004_t dr, const ast_uap_t uap);
495 
496 
500 #ifdef __cplusplus
501  }
502 #endif // extern "C"
503 
504 #endif //LIBASTERIX_CAT004_H
505 
506 // vim:set ft=c.doxygen sw=2 sts=2 fenc=utf8:
void ast_subfield_004_170_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di, const ast_subfield_type_t type)
Get detail HTML snippet of subfield.
bool valid
Definition: cat004.h:474
void ast_dataitem_004_000_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
size_t ast_dataitem_004_170_get_size(const unsigned char *buffer, const size_t bufsize)
Get size of dataitem.
ast_dataitem_004_060_t dataitem_004_060
Definition: cat004.h:482
Definition: cat004.h:82
Data Item - Message Type.
Definition: cat_generic.h:51
size_t n_subfields
Definition: cat004.h:389
Definition: cat004.h:53
Definition: cat004.h:78
void ast_dataitem_004_040_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
bool cc_existing
Definition: cat004.h:342
Definition: cat004.h:83
Extracted dataitem.
Definition: dataitem.h:433
Definition: cat004.h:54
Definition: cat004.h:84
ast_dataitem_004_020_t dataitem_004_020
Definition: cat004.h:478
ast_subfield_type_t
Definition of subfield id in each dataitem.
Definition: subfield.h:52
Implementation of Datarecord concept defined by ASTERIX.
size_t n_subfields
Definition: cat004.h:290
ast_dataitem_004_170_t ast_dataitem_004_171_t
Data Item I004/171 - Aircraft Identification & Characteristics 2.
Definition: cat004.h:432
ast_dataitem_004_100_t dataitem_004_100
Definition: cat004.h:483
Data Item Itrack_number - Track Number.
Definition: cat_generic.h:727
ast_dataitem_message_type_t ast_dataitem_004_000_t
Data Item I004/000 - Message Type.
Definition: cat004.h:105
size_t n_subfields
Definition: cat004.h:339
ast_dataitem_004_030_t dataitem_004_030
Definition: cat004.h:479
bool valid
Definition: cat004.h:386
unsigned int cc_conflict_property
Definition: cat004.h:344
const char * ast_subfield_004_171_get_id(const ast_subfield_type_t type)
Get id string of subfield.
Data Item I004/120 - Conflict Characteristics.
Definition: cat004.h:334
bool an_existing
Definition: cat004.h:293
Definition: cat004.h:70
#define AST_API
Definition: platform.h:63
Data Item - Data Source Identifier.
Definition: cat_generic.h:93
unsigned int cc_conflict_severity
0 - Low, 1 - Hight
Definition: cat004.h:345
const char * ast_dataitem_004_get_name(const ast_dataitem_type_t type)
Get name function.
Definition: cat004.h:77
Data Item - Time of Day.
Definition: cat_generic.h:219
Definition: cat004.h:69
Definition: cat004.h:85
void ast_dataitem_004_000_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
Definition: cat004.h:50
void ast_subfield_004_100_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di, const ast_subfield_type_t type)
Get detail HTML snippet of subfield.
const char * ast_subfield_004_170_get_id(const ast_subfield_type_t type)
Get id string of subfield.
Definition: cat004.h:79
Definition: cat004.h:71
void ast_dataitem_004_060_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di)
Get summary function.
Definition: cat004.h:64
Data Item I048/040 - Alert Identifier.
Definition: cat004.h:224
This file includes the common used data items shares by different categories.
Definition: cat004.h:68
ast_dataitem_004_060_t ast_dataitem_004_060_decode(const ast_dataitem_t di)
Decode function.
size_t ast_subfield_004_170_get_size(const unsigned char *buffer, const size_t bufsize, const ast_subfield_type_t type)
Get size of subfield.
ast_dataitem_004_010_t dataitem_004_010
Definition: cat004.h:477
Definition: cat004.h:75
Definition: cat004.h:63
bool valid
Definition: cat004.h:226
size_t ast_dataitem_004_120_get_size(const unsigned char *buffer, const size_t bufsize)
Get size of dataitem.
Subfield struct.
Definition: subfield.h:292
bool valid
Definition: cat004.h:336
int m3_code
Definition: cat004.h:393
ast_dataitem_004_120_t ast_dataitem_004_120_decode(const ast_dataitem_t di)
Decode function of dataitem.
Definition: cat004.h:51
size_t ast_dataitem_004_100_get_size(const unsigned char *buffer, const size_t bufsize)
Get size of dataitem.
Definition: cat004.h:87
Definition: cat004.h:56
ast_snet_message_type_t
SNET message type.
Definition: cat004.h:47
Definition: cat004.h:60
Definition: cat004.h:74
unsigned int alert_id
Definition: cat004.h:228
Definition: cat004.h:91
Definition: cat004.h:62
void ast_dataitem_004_060_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di)
Get detail function.
size_t ast_subfield_004_171_get_size(const unsigned char *buffer, const size_t bufsize, const ast_subfield_type_t type)
Get size of subfield.
size_t ast_subfield_004_120_get_size(const unsigned char *buffer, const size_t bufsize, const ast_subfield_type_t type)
Get size of subfield.
const char * ast_subfield_004_170_get_name(const ast_subfield_type_t type)
Get name of subfield.
Data Record I004 - Safety Net Messages.
Definition: cat004.h:472
const char * ast_subfield_004_171_get_name(const ast_subfield_type_t type)
Get name of subfield.
void ast_subfield_004_120_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di, const ast_subfield_type_t type)
Get summary of subfield.
bool valid
Definition: cat004.h:257
Implementation of Dataitem concept defined by ASTERIX.
const char * ast_subfield_004_100_get_id(const ast_subfield_type_t type)
Get id string of subfield.
ast_dataitem_time_of_day_t ast_dataitem_004_020_t
Data Item I048/020 - Time of Message.
Definition: cat004.h:146
Definition: cat004.h:88
Data Item I004/100 - Area Definition.
Definition: cat004.h:285
Definition: cat004.h:80
ast_dataitem_004_035_t dataitem_004_035
Definition: cat004.h:480
ast_dataitem_004_040_t ast_dataitem_004_040_decode(const ast_dataitem_t di)
Decode function.
Definition: cat004.h:76
ast_dataitem_004_170_t ast_dataitem_004_170_decode(const ast_dataitem_t di)
Decode function of dataitem.
Definition: cat004.h:61
Definition: cat004.h:81
const char * ast_snet_message_type_get_name(const ast_snet_message_type_t type)
Get name of SNET message type.
ast_dataitem_004_170_t dataitem_004_170
Definition: cat004.h:485
Dataitem.
Definition: dataitem.h:422
ast_dataitem_004_040_t dataitem_004_040
Definition: cat004.h:481
ast_dataitem_004_100_t ast_dataitem_004_100_decode(const ast_dataitem_t di)
Decode function of dataitem.
Definition: cat004.h:49
Definition: cat004.h:72
#define AST_MAX_SNET_MESSAGE_TYPES
Max SNET message types.
Definition: cat004.h:96
const char * ast_subfield_004_120_get_name(const ast_subfield_type_t type)
Get name of subfield.
size_t n_functions
Definition: cat004.h:259
ast_dataitem_type_t
Definition of data item id in each category.
Definition: dataitem.h:67
Definition: cat004.h:59
ast_dataitem_track_number_t ast_dataitem_004_035_t
Data Item I048/035 - Track Number 2.
Definition: cat004.h:198
ast_dataitem_track_number_t ast_dataitem_004_030_t
Data Item I048/030 - Track Number 1.
Definition: cat004.h:172
Definition: cat004.h:66
#define AST_MAX_SUBFIELDS
Definition: subfield.h:362
Definition: cat004.h:52
Definition: cat004.h:57
ast_dataitem_004_120_t dataitem_004_120
Definition: cat004.h:484
bool m3_existing
Definition: cat004.h:392
void ast_subfield_004_100_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di, const ast_subfield_type_t type)
Get summary of subfield.
const char * ast_subfield_004_100_get_name(const ast_subfield_type_t type)
Get name of subfield.
void ast_subfield_004_170_get_summary(char *summary, const size_t summary_size, const ast_dataitem_t di, const ast_subfield_type_t type)
Get summary of subfield.
Datarecord.
Definition: datarecord.h:40
Definition: cat004.h:58
ast_dataitem_004_171_t dataitem_004_171
Definition: cat004.h:486
Data Item I048/060 - Safety Net Function & System Status.
Definition: cat004.h:255
Definition: cat004.h:73
ast_dataitem_t ast_dataitem_004_040_encode(unsigned char *const buffer, const size_t buf_size, const ast_dataitem_ex_t xdi)
Encode function.
const char * ast_subfield_004_120_get_id(const ast_subfield_type_t type)
Get id string of subfield.
Definition: cat004.h:65
Definition: cat004.h:86
bool valid
Definition: cat004.h:287
Definition: cat004.h:55
ast_dataitem_data_source_identifier_t ast_dataitem_004_010_t
Definition: cat004.h:130
Data Item I004/170 - Aircraft Identification & Characteristics 1.
Definition: cat004.h:384
unsigned int cc_table_id
Definition: cat004.h:343
const char * ast_snet_message_type_get_id(const ast_snet_message_type_t type)
Get id of SNET message type.
size_t ast_subfield_004_100_get_size(const unsigned char *buffer, const size_t bufsize, const ast_subfield_type_t type)
Get size of subfield.
ast_datarecord_004_t ast_datarecord_004_disassemble(const ast_datarecord_t dr)
Disassemble function.
void ast_subfield_004_120_get_detail_html(char *detail, const size_t detail_size, const ast_dataitem_t di, const ast_subfield_type_t type)
Get detail HTML snippet of subfield.
ast_dataitem_004_000_t dataitem_004_000
Definition: cat004.h:476
Implementation of Subfield concept defined by ASTERIX.
size_t ast_dataitem_004_171_get_size(const unsigned char *buffer, const size_t bufsize)
Get size function.
Definition: cat004.h:67