sacsic.h
Go to the documentation of this file.
1/*
2 * $COPYRIGHT-BEGIN$
3 * libasterix
4 * Copyright [2013-2026] SinoATC <http://www.sinoatc.com>.
5 * All Rights Reserved.
6 *
7 * NOTICE: All information contained herein is, and remains
8 * the property of SinoATC and its suppliers, if any.
9 * The intellectual and technical concepts contained herein
10 * are proprietary to SinoATC and its suppliers and may be
11 * covered by U.S. and Foreign Patents, patents in process,
12 * and are protected by trade secret or copyright law.
13 * Dissemination of this information or reproduction of this material
14 * is strictly forbidden unless prior written permission is obtained
15 * from SinoATC.
16 * $COPYRIGHT-END$
17 */
18
24
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
33extern "C" {
34#endif
35
38typedef 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
54typedef struct _ast_sac_list_t
55{
56 size_t n_sacs;
59
62typedef ast_sac_list_t (*ast_sac_get_info_func_t)(const unsigned int sac);
63
66
69typedef 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;
82
83#define AST_MAX_SENSORS 10
84
87typedef struct _ast_sensor_list_t
88{
89 size_t n_sensors;
92
95typedef 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
108// vim:set ft=c.doxygen sw=2 sts=2 fenc=utf8:
This file includes platform specific definitions.
#define AST_API
Definition platform.h:63
void ast_reg_callback_sac_get_info(ast_sac_get_info_func_t callback)
Registry callback function of ast_sac_get_info_func_t.
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
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
void ast_reg_callback_sacsic_get_sensor(ast_sacsic_get_sensor_func_t callback)
Registry callback function of ast_sacsic_get_info_func_t.
#define AST_MAX_SENSORS
Definition sacsic.h:83
#define AST_MAX_REGIONS
Definition sacsic.h:50
SAC info listdefinition.
Definition sacsic.h:55
ast_sac_t sacs[6]
Definition sacsic.h:57
size_t n_sacs
Definition sacsic.h:56
SAC info definition.
Definition sacsic.h:39
const char * country_code3
ISO 3166-1 3-letter country code.
Definition sacsic.h:45
const char * country_code2
ISO 3166-1 2-letter country code.
Definition sacsic.h:44
bool valid
If SAC info is valid.
Definition sacsic.h:40
const char * region_name
Definition sacsic.h:43
const char * country_fullname
Full English name.
Definition sacsic.h:47
const char * country_name
Common English name.
Definition sacsic.h:46
unsigned int sac
Definition sacsic.h:41
const char * region_code
Definition sacsic.h:42
Sensor info listdefinition.
Definition sacsic.h:88
size_t n_sensors
Definition sacsic.h:89
ast_sensor_t sensors[10]
Definition sacsic.h:90
Sensor info definition.
Definition sacsic.h:70
const char * model
Definition sacsic.h:79
const char * type
System type.
Definition sacsic.h:77
unsigned int sic
Definition sacsic.h:73
const char * description
Definition sacsic.h:80
unsigned int sac
Definition sacsic.h:72
const char * country_code3
ISO 3166-1 3-letter country code.
Definition sacsic.h:75
bool valid
If Sensor info is valid.
Definition sacsic.h:71
const char * manufacturer
Manufacturer name.
Definition sacsic.h:78
const char * name
Definition sacsic.h:74
const char * country_name
Common English name.
Definition sacsic.h:76