serial.h 3.56 KB
Newer Older
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
/*
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;

22
flag __po_hi_c_Baudrate_T_Equal(const __po_hi_c_Baudrate_T* pVal1, const __po_hi_c_Baudrate_T* pVal2);
23
24
25

void __po_hi_c_Baudrate_T_Initialize(__po_hi_c_Baudrate_T* pVal);

26
27
#define ERR_BAUDRATE_T		1  /**/
flag __po_hi_c_Baudrate_T_IsConstraintValid(const __po_hi_c_Baudrate_T* pVal, int* pErrCode);
28
29
30
31
32
typedef enum {
    __po_hi_c_even = 0,
    __po_hi_c_odd = 1
} __po_hi_c_Parity_T;

33
flag __po_hi_c_Parity_T_Equal(const __po_hi_c_Parity_T* pVal1, const __po_hi_c_Parity_T* pVal2);
34

yoogx's avatar
yoogx committed
35
36
void __po_hi_c_Parity_T_Initialize(__po_hi_c_Parity_T* pVal);

37
38
39
#define ERR_PARITY_T		8  /**/
flag __po_hi_c_Parity_T_IsConstraintValid(const __po_hi_c_Parity_T* pVal, int* pErrCode);
/*-- __po_hi_c_serial_conf_t --------------------------------------------*/
yoogx's avatar
yoogx committed
40
typedef char __po_hi_c_serial_conf_t_devname[21];
41
typedef asn1SccUint __po_hi_c_serial_conf_t_bits;
yoogx's avatar
yoogx committed
42

43
typedef asn1SccUint __po_hi_c_serial_conf_t_sending_wait;
yoogx's avatar
yoogx committed
44

45
46

typedef struct {
yoogx's avatar
yoogx committed
47
    __po_hi_c_serial_conf_t_devname devname;
48
49
    __po_hi_c_Baudrate_T speed;
    __po_hi_c_Parity_T parity;
yoogx's avatar
yoogx committed
50
51
    __po_hi_c_serial_conf_t_bits bits;
    __po_hi_c_serial_conf_t_sending_wait sending_wait;
52
    flag use_paritybit;
53

54
55
56
57
    struct {
        unsigned int speed:1;
        unsigned int parity:1;
        unsigned int bits:1;
58
        unsigned int sending_wait:1;
59
60
        unsigned int use_paritybit:1;
    } exist;
61

62
63
} __po_hi_c_serial_conf_t;

64
65
66
flag __po_hi_c_serial_conf_t_devname_Equal(const __po_hi_c_serial_conf_t_devname val1, const __po_hi_c_serial_conf_t_devname val2);

flag __po_hi_c_serial_conf_t_bits_Equal(const __po_hi_c_serial_conf_t_bits* pVal1, const __po_hi_c_serial_conf_t_bits* pVal2);
67

68
69
70
71
72
73
74
flag __po_hi_c_serial_conf_t_sending_wait_Equal(const __po_hi_c_serial_conf_t_sending_wait* pVal1, const __po_hi_c_serial_conf_t_sending_wait* pVal2);

flag __po_hi_c_serial_conf_t_Equal(const __po_hi_c_serial_conf_t* pVal1, const __po_hi_c_serial_conf_t* pVal2);

void __po_hi_c_serial_conf_t_devname_Initialize(__po_hi_c_serial_conf_t_devname val);
void __po_hi_c_serial_conf_t_bits_Initialize(__po_hi_c_serial_conf_t_bits* pVal);
void __po_hi_c_serial_conf_t_sending_wait_Initialize(__po_hi_c_serial_conf_t_sending_wait* pVal);
75
76
void __po_hi_c_serial_conf_t_Initialize(__po_hi_c_serial_conf_t* pVal);

77
78
79
80
81
82
83
#define ERR_SERIAL_CONF_T_DEVNAME		15  /**/
#define ERR_SERIAL_CONF_T_SPEED		22  /**/
#define ERR_SERIAL_CONF_T_PARITY		33  /**/
#define ERR_SERIAL_CONF_T_BITS		44  /**/
#define ERR_SERIAL_CONF_T_SENDING_WAIT		51  /**/
#define ERR_SERIAL_CONF_T_USE_PARITYBIT		58  /**/
flag __po_hi_c_serial_conf_t_IsConstraintValid(const __po_hi_c_serial_conf_t* pVal, int* pErrCode);
84

yoogx's avatar
yoogx committed
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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
 * ========================================================================= */

 

99
100
101

#ifdef  __cplusplus
}
yoogx's avatar
yoogx committed
102

103
104
#endif

105
#endif