sacsic.h
Go to the documentation of this file.
1 // vim:set ft=c sw=2 sts=2 fenc=utf8:
2 
3 /*
4  * libasterix
5  * Copyright [2013-2020] SinoATC <http://www.sinoatc.com>.
6  * All Rights Reserved.
7  *
8  * NOTICE: All information contained herein is, and remains
9  * the property of SinoATC and its suppliers, if any.
10  * The intellectual and technical concepts contained herein
11  * are proprietary to Aerosys Corporation and its suppliers and may be
12  * covered by U.S. and Foreign Patents, patents in process,
13  * and are protected by trade secret or copyright law.
14  * Dissemination of this information or reproduction of this material
15  * is strictly forbidden unless prior written permission is obtained
16  * from SinoATC.
17  */
18 
25 #ifndef LIBASTERIX_SACSIC_H
26 #define LIBASTERIX_SACSIC_H
27 
28 #include <stddef.h>
29 #include <stdbool.h>
30 #include "platform.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
38 typedef struct _ast_sac_t
39 {
40  bool valid;
41  unsigned int sac;
42  const char* region_code;
43  const char* region_name;
44  const char* country_code2;
45  const char* country_code3;
46  const char* country_name;
47  const char* country_fullname;
48 } ast_sac_t;
49 
50 #define AST_MAX_REGIONS 6
51 
54 typedef struct _ast_sac_list_t
55 {
56  size_t n_sacs;
59 
62 typedef ast_sac_list_t (*ast_sac_get_info_func_t)(const unsigned int sac);
63 
66 
69 typedef struct _ast_sensor_t
70 {
71  bool valid;
72  unsigned int sac;
73  unsigned int sic;
74  const char* name;
75  const char* country_code3;
76  const char* country_name;
77  const char* type;
78  const char* manufacturer;
79  const char* model;
80  const char* description;
81 } ast_sensor_t;
82 
83 #define AST_MAX_SENSORS 10
84 
87 typedef struct _ast_sensor_list_t
88 {
89  size_t n_sensors;
92 
95 typedef ast_sensor_list_t (*ast_sacsic_get_sensor_func_t)(const unsigned int sac, const unsigned int sic);
96 
99 
100 
101 
102 #ifdef __cplusplus
103  }
104 #endif // extern "C"
105 
106 #endif //LIBASTERIX_SACSIC_H
107 
const char * country_fullname
Full English name.
Definition: sacsic.h:47
unsigned int sac
Definition: sacsic.h:41
const char * region_code
Definition: sacsic.h:42
const char * country_name
Common English name.
Definition: sacsic.h:46
unsigned int sac
Definition: sacsic.h:72
#define AST_API
Definition: platform.h:63
const char * country_name
Common English name.
Definition: sacsic.h:76
const char * model
Definition: sacsic.h:79
#define AST_MAX_REGIONS
Definition: sacsic.h:50
This file includes platform specific definitions.
Sensor info definition.
Definition: sacsic.h:69
void ast_reg_callback_sac_get_info(ast_sac_get_info_func_t callback)
Registry callback function of ast_sac_get_info_func_t.
SAC info listdefinition.
Definition: sacsic.h:54
bool valid
If SAC info is valid.
Definition: sacsic.h:40
#define AST_MAX_SENSORS
Definition: sacsic.h:83
const char * manufacturer
Manufacturer name.
Definition: sacsic.h:78
ast_sac_list_t(* ast_sac_get_info_func_t)(const unsigned int sac)
Function prototype of getting country info list from SAC.
Definition: sacsic.h:62
Sensor info listdefinition.
Definition: sacsic.h:87
const char * description
Definition: sacsic.h:80
const char * country_code3
ISO 3166-1 3-letter country code.
Definition: sacsic.h:75
const char * type
System type.
Definition: sacsic.h:77
SAC info definition.
Definition: sacsic.h:38
const char * name
Definition: sacsic.h:74
const char * country_code3
ISO 3166-1 3-letter country code.
Definition: sacsic.h:45
size_t n_sacs
Definition: sacsic.h:56
ast_sensor_list_t(* ast_sacsic_get_sensor_func_t)(const unsigned int sac, const unsigned int sic)
Function prototype of getting sensor info list from SAC/SIC.
Definition: sacsic.h:95
const char * country_code2
ISO 3166-1 2-letter country code.
Definition: sacsic.h:44
const char * region_name
Definition: sacsic.h:43
bool valid
If Sensor info is valid.
Definition: sacsic.h:71
unsigned int sic
Definition: sacsic.h:73
void ast_reg_callback_sacsic_get_sensor(ast_sacsic_get_sensor_func_t callback)
Registry callback function of ast_sacsic_get_info_func_t.
size_t n_sensors
Definition: sacsic.h:89