1553.h 4.75 KB
Newer Older
yoogx's avatar
yoogx committed
1
2
3
4
5
/*
 * This is a part of PolyORB-HI-C distribution, a minimal
 * middleware written for generated code from AADL models.
 * You should use it with the Ocarina toolsuite.
 *
yoogx's avatar
yoogx committed
6
 * For more informations, please visit http://taste.tuxfamily.org/wiki
yoogx's avatar
yoogx committed
7
8
9
10
 *
 * Copyright (C) 2014 ESA & ISAE.
 */

11
12
13
14
#ifndef _INC_1553_H
#define _INC_1553_H
/*
Code automatically generated by asn1scc tool
15
16
Date was: 2/7/2012
Time was: 15:35:34
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
*/

#include "asn1crt.h"

#ifdef  __cplusplus
extern "C" {
#endif



typedef asn1SccSint __po_hi_c_Node_Addr_T;

#define __po_hi_c_Node_Addr_T_REQUIRED_BYTES_FOR_ENCODING        1
#define __po_hi_c_Node_Addr_T_REQUIRED_BITS_FOR_ENCODING        5
#define __po_hi_c_Node_Addr_T_REQUIRED_BYTES_FOR_ACN_ENCODING       1
#define __po_hi_c_Node_Addr_T_REQUIRED_BITS_FOR_ACN_ENCODING        5
jdelange's avatar
jdelange committed
33
#define __po_hi_c_Node_Addr_T_REQUIRED_BYTES_FOR_XER_ENCODING       47
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

#ifndef ERR___po_hi_c_Node_Addr_T 
#define ERR___po_hi_c_Node_Addr_T		1000 /* (0..31) */
#endif

void __po_hi_c_Node_Addr_T_Initialize(__po_hi_c_Node_Addr_T* pVal);
flag __po_hi_c_Node_Addr_T_IsConstraintValid(const __po_hi_c_Node_Addr_T* val, int* pErrCode);


typedef enum {
    __po_hi_c_mil1553a = 0,
    __po_hi_c_mil1553b = 1
} __po_hi_c_Standard_T;

#define __po_hi_c_Standard_T_REQUIRED_BYTES_FOR_ENCODING        1
#define __po_hi_c_Standard_T_REQUIRED_BITS_FOR_ENCODING        1
#define __po_hi_c_Standard_T_REQUIRED_BYTES_FOR_ACN_ENCODING       1
#define __po_hi_c_Standard_T_REQUIRED_BITS_FOR_ACN_ENCODING        1
jdelange's avatar
jdelange committed
52
#define __po_hi_c_Standard_T_REQUIRED_BYTES_FOR_XER_ENCODING       44
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

#ifndef ERR___po_hi_c_Standard_T_unknown_enumeration_value 
#define ERR___po_hi_c_Standard_T_unknown_enumeration_value		1001 /* invalid enumeration value */
#endif

void __po_hi_c_Standard_T_Initialize(__po_hi_c_Standard_T* pVal);
flag __po_hi_c_Standard_T_IsConstraintValid(const __po_hi_c_Standard_T* val, int* pErrCode);


typedef enum {
    __po_hi_c_controller = 0,
    __po_hi_c_terminal = 1,
    __po_hi_c_monitor = 2
} __po_hi_c_Mode_T;

#define __po_hi_c_Mode_T_REQUIRED_BYTES_FOR_ENCODING        1
#define __po_hi_c_Mode_T_REQUIRED_BITS_FOR_ENCODING        2
#define __po_hi_c_Mode_T_REQUIRED_BYTES_FOR_ACN_ENCODING       1
#define __po_hi_c_Mode_T_REQUIRED_BITS_FOR_ACN_ENCODING        2
jdelange's avatar
jdelange committed
72
#define __po_hi_c_Mode_T_REQUIRED_BYTES_FOR_XER_ENCODING       40
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

#ifndef ERR___po_hi_c_Mode_T_unknown_enumeration_value 
#define ERR___po_hi_c_Mode_T_unknown_enumeration_value		1002 /* invalid enumeration value */
#endif

void __po_hi_c_Mode_T_Initialize(__po_hi_c_Mode_T* pVal);
flag __po_hi_c_Mode_T_IsConstraintValid(const __po_hi_c_Mode_T* val, int* pErrCode);


typedef enum {
    __po_hi_c_none = 0,
    __po_hi_c_bus_a = 1,
    __po_hi_c_bus_b = 2,
    __po_hi_c_both = 3
} __po_hi_c_Bus_T;

#define __po_hi_c_Bus_T_REQUIRED_BYTES_FOR_ENCODING        1
#define __po_hi_c_Bus_T_REQUIRED_BITS_FOR_ENCODING        2
#define __po_hi_c_Bus_T_REQUIRED_BYTES_FOR_ACN_ENCODING       1
#define __po_hi_c_Bus_T_REQUIRED_BITS_FOR_ACN_ENCODING        2
jdelange's avatar
jdelange committed
93
#define __po_hi_c_Bus_T_REQUIRED_BYTES_FOR_XER_ENCODING       28
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

#ifndef ERR___po_hi_c_Bus_T_unknown_enumeration_value 
#define ERR___po_hi_c_Bus_T_unknown_enumeration_value		1003 /* invalid enumeration value */
#endif

void __po_hi_c_Bus_T_Initialize(__po_hi_c_Bus_T* pVal);
flag __po_hi_c_Bus_T_IsConstraintValid(const __po_hi_c_Bus_T* val, int* pErrCode);


typedef struct {
    char devname[21];
    __po_hi_c_Standard_T standard;
    __po_hi_c_Mode_T mode;
    __po_hi_c_Bus_T bus;
    __po_hi_c_Node_Addr_T termaddr;
    flag broadcast;
    flag rxblock;
    flag txblock;
    struct {
        unsigned int rxblock:1;
        unsigned int txblock:1;
    } exist;
} __po_hi_c_mil_1553_conf_t;

#define __po_hi_c_mil_1553_conf_t_REQUIRED_BYTES_FOR_ENCODING        20
#define __po_hi_c_mil_1553_conf_t_REQUIRED_BITS_FOR_ENCODING        160
#define __po_hi_c_mil_1553_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING       23
#define __po_hi_c_mil_1553_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING        180
jdelange's avatar
jdelange committed
122
#define __po_hi_c_mil_1553_conf_t_REQUIRED_BYTES_FOR_XER_ENCODING       315
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

#ifndef ERR___po_hi_c_mil_1553_conf_t_devname 
#define ERR___po_hi_c_mil_1553_conf_t_devname		1004 /* (SIZE (1..20)) */
#endif

void __po_hi_c_mil_1553_conf_t_Initialize(__po_hi_c_mil_1553_conf_t* pVal);
flag __po_hi_c_mil_1553_conf_t_IsConstraintValid(const __po_hi_c_mil_1553_conf_t* val, int* pErrCode);



#ifdef  __cplusplus
}
#define ENUM___po_hi_c_mil1553a	__po_hi_c_mil1553a
#define ENUM___po_hi_c_mil1553b	__po_hi_c_mil1553b
#define ENUM___po_hi_c_controller	__po_hi_c_controller
#define ENUM___po_hi_c_terminal	__po_hi_c_terminal
#define ENUM___po_hi_c_monitor	__po_hi_c_monitor
#define ENUM___po_hi_c_none	__po_hi_c_none
#define ENUM___po_hi_c_bus_a	__po_hi_c_bus_a
#define ENUM___po_hi_c_bus_b	__po_hi_c_bus_b
#define ENUM___po_hi_c_both	__po_hi_c_both
#endif

#endif