serial.h 6.07 KB
Newer Older
yoogx's avatar
yoogx committed
1
2
#ifndef GENERATED_ASN1SCC_SERIAL_H
#define GENERATED_ASN1SCC_SERIAL_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
Code automatically generated by asn1scc tool
*/
#include "asn1crt.h"

#ifdef  __cplusplus
extern "C" {
#endif



typedef enum {
    __po_hi_c_b9600 = 0,
    __po_hi_c_b19200 = 1,
    __po_hi_c_b38400 = 2,
    __po_hi_c_b57600 = 3,
    __po_hi_c_b115200 = 4,
    __po_hi_c_b230400 = 5
} __po_hi_c_Baudrate_T;

yoogx's avatar
yoogx committed
23
#define __po_hi_c_Baudrate_T_REQUIRED_BYTES_FOR_ENCODING       1 
24
#define __po_hi_c_Baudrate_T_REQUIRED_BITS_FOR_ENCODING        3
yoogx's avatar
yoogx committed
25
26
27
#define __po_hi_c_Baudrate_T_REQUIRED_BYTES_FOR_ACN_ENCODING   1 
#define __po_hi_c_Baudrate_T_REQUIRED_BITS_FOR_ACN_ENCODING    3
#define __po_hi_c_Baudrate_T_REQUIRED_BYTES_FOR_XER_ENCODING   38
28
29
30

void __po_hi_c_Baudrate_T_Initialize(__po_hi_c_Baudrate_T* pVal);
flag __po_hi_c_Baudrate_T_IsConstraintValid(const __po_hi_c_Baudrate_T* val, int* pErrCode);
yoogx's avatar
yoogx committed
31
32
33
34
35
36
#ifndef ERR___po_hi_c_Baudrate_T_unknown_enumeration_value 
#define ERR___po_hi_c_Baudrate_T_unknown_enumeration_value		1002  /**/
#endif
#ifndef ERR___po_hi_c_Baudrate_T 
#define ERR___po_hi_c_Baudrate_T		1001  /**/
#endif
37
38
39
40
41
42

typedef enum {
    __po_hi_c_even = 0,
    __po_hi_c_odd = 1
} __po_hi_c_Parity_T;

yoogx's avatar
yoogx committed
43
#define __po_hi_c_Parity_T_REQUIRED_BYTES_FOR_ENCODING       1 
44
#define __po_hi_c_Parity_T_REQUIRED_BITS_FOR_ENCODING        1
yoogx's avatar
yoogx committed
45
46
47
#define __po_hi_c_Parity_T_REQUIRED_BYTES_FOR_ACN_ENCODING   1 
#define __po_hi_c_Parity_T_REQUIRED_BITS_FOR_ACN_ENCODING    1
#define __po_hi_c_Parity_T_REQUIRED_BYTES_FOR_XER_ENCODING   30
48

yoogx's avatar
yoogx committed
49
50
void __po_hi_c_Parity_T_Initialize(__po_hi_c_Parity_T* pVal);
flag __po_hi_c_Parity_T_IsConstraintValid(const __po_hi_c_Parity_T* val, int* pErrCode);
51
#ifndef ERR___po_hi_c_Parity_T_unknown_enumeration_value 
yoogx's avatar
yoogx committed
52
53
54
55
#define ERR___po_hi_c_Parity_T_unknown_enumeration_value		1004  /**/
#endif
#ifndef ERR___po_hi_c_Parity_T 
#define ERR___po_hi_c_Parity_T		1003  /**/
56
57
#endif

yoogx's avatar
yoogx committed
58
typedef asn1SccSint __po_hi_c_serial_conf_t_sending_wait;
59

yoogx's avatar
yoogx committed
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#define __po_hi_c_serial_conf_t_sending_wait_REQUIRED_BYTES_FOR_ENCODING       3 
#define __po_hi_c_serial_conf_t_sending_wait_REQUIRED_BITS_FOR_ENCODING        24
#define __po_hi_c_serial_conf_t_sending_wait_REQUIRED_BYTES_FOR_ACN_ENCODING   3 
#define __po_hi_c_serial_conf_t_sending_wait_REQUIRED_BITS_FOR_ACN_ENCODING    24
#define __po_hi_c_serial_conf_t_sending_wait_REQUIRED_BYTES_FOR_XER_ENCODING   77

void __po_hi_c_serial_conf_t_sending_wait_Initialize(__po_hi_c_serial_conf_t_sending_wait* pVal);
flag __po_hi_c_serial_conf_t_sending_wait_IsConstraintValid(const __po_hi_c_serial_conf_t_sending_wait* val, int* pErrCode);
#ifndef ERR___po_hi_c_serial_conf_t_sending_wait 
#define ERR___po_hi_c_serial_conf_t_sending_wait		1005  /*(0 .. 9000000)*/
#endif

typedef asn1SccSint __po_hi_c_serial_conf_t_bits;

#define __po_hi_c_serial_conf_t_bits_REQUIRED_BYTES_FOR_ENCODING       1 
#define __po_hi_c_serial_conf_t_bits_REQUIRED_BITS_FOR_ENCODING        1
#define __po_hi_c_serial_conf_t_bits_REQUIRED_BYTES_FOR_ACN_ENCODING   1 
#define __po_hi_c_serial_conf_t_bits_REQUIRED_BITS_FOR_ACN_ENCODING    1
#define __po_hi_c_serial_conf_t_bits_REQUIRED_BYTES_FOR_XER_ENCODING   61

void __po_hi_c_serial_conf_t_bits_Initialize(__po_hi_c_serial_conf_t_bits* pVal);
flag __po_hi_c_serial_conf_t_bits_IsConstraintValid(const __po_hi_c_serial_conf_t_bits* val, int* pErrCode);
#ifndef ERR___po_hi_c_serial_conf_t_bits 
#define ERR___po_hi_c_serial_conf_t_bits		1006  /*(7 .. 8)*/
#endif

typedef char __po_hi_c_serial_conf_t_devname[21];

#define __po_hi_c_serial_conf_t_devname_REQUIRED_BYTES_FOR_ENCODING       19 
#define __po_hi_c_serial_conf_t_devname_REQUIRED_BITS_FOR_ENCODING        145
#define __po_hi_c_serial_conf_t_devname_REQUIRED_BYTES_FOR_ACN_ENCODING   19 
#define __po_hi_c_serial_conf_t_devname_REQUIRED_BITS_FOR_ACN_ENCODING    145
#define __po_hi_c_serial_conf_t_devname_REQUIRED_BYTES_FOR_XER_ENCODING   67

void __po_hi_c_serial_conf_t_devname_Initialize(__po_hi_c_serial_conf_t_devname pVal);
flag __po_hi_c_serial_conf_t_devname_IsConstraintValid(const __po_hi_c_serial_conf_t_devname val, int* pErrCode);
#ifndef ERR___po_hi_c_serial_conf_t_devname 
#define ERR___po_hi_c_serial_conf_t_devname		1007  /*(SIZE(1 .. 20))*/
#endif
99
100

typedef struct {
yoogx's avatar
yoogx committed
101
    __po_hi_c_serial_conf_t_devname devname;
102
103
    __po_hi_c_Baudrate_T speed;
    __po_hi_c_Parity_T parity;
yoogx's avatar
yoogx committed
104
105
    __po_hi_c_serial_conf_t_bits bits;
    __po_hi_c_serial_conf_t_sending_wait sending_wait;
106
107
108
109
110
    flag use_paritybit;
    struct {
        unsigned int speed:1;
        unsigned int parity:1;
        unsigned int bits:1;
111
        unsigned int sending_wait:1;
112
113
114
115
        unsigned int use_paritybit:1;
    } exist;
} __po_hi_c_serial_conf_t;

yoogx's avatar
yoogx committed
116
#define __po_hi_c_serial_conf_t_REQUIRED_BYTES_FOR_ENCODING       23 
117
#define __po_hi_c_serial_conf_t_REQUIRED_BITS_FOR_ENCODING        180
yoogx's avatar
yoogx committed
118
119
120
#define __po_hi_c_serial_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING   23 
#define __po_hi_c_serial_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING    180
#define __po_hi_c_serial_conf_t_REQUIRED_BYTES_FOR_XER_ENCODING   250
121
122
123
124
125

void __po_hi_c_serial_conf_t_Initialize(__po_hi_c_serial_conf_t* pVal);
flag __po_hi_c_serial_conf_t_IsConstraintValid(const __po_hi_c_serial_conf_t* val, int* pErrCode);


yoogx's avatar
yoogx committed
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
extern const __po_hi_c_serial_conf_t linux_ttyS0;
extern const __po_hi_c_serial_conf_t linux_ttyUSB0;
extern const __po_hi_c_serial_conf_t linux_ttyUSB1;
extern const __po_hi_c_serial_conf_t linux_ttyUSB2;
extern const __po_hi_c_serial_conf_t leon_rasta_apburasta0;
extern const __po_hi_c_serial_conf_t leon_rasta_apburasta1; 

/* ================= Encoding/Decoding function prototypes =================
 * These functions are placed at the end of the file to make sure all types
 * have been declared first, in case of parameterized ACN encodings
 * ========================================================================= */






 

145
146
147
148
149
150
151
152
153
154
155

#ifdef  __cplusplus
}
#define ENUM___po_hi_c_b9600	__po_hi_c_b9600
#define ENUM___po_hi_c_b19200	__po_hi_c_b19200
#define ENUM___po_hi_c_b38400	__po_hi_c_b38400
#define ENUM___po_hi_c_b57600	__po_hi_c_b57600
#define ENUM___po_hi_c_b115200	__po_hi_c_b115200
#define ENUM___po_hi_c_b230400	__po_hi_c_b230400
#define ENUM___po_hi_c_even	__po_hi_c_even
#define ENUM___po_hi_c_odd	__po_hi_c_odd
yoogx's avatar
yoogx committed
156

157
158
159
#endif

#endif