serial.h 3.3 KB
Newer Older
1
2
3
4
#ifndef _INC_SERIAL_H
#define _INC_SERIAL_H
/*
Code automatically generated by asn1scc tool
5
6
Date was: 6/21/2011
Time was: 18:14:47
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
*/

#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;

#define __po_hi_c_Baudrate_T_REQUIRED_BYTES_FOR_ENCODING        1
#define __po_hi_c_Baudrate_T_REQUIRED_BITS_FOR_ENCODING        3
#define __po_hi_c_Baudrate_T_REQUIRED_BYTES_FOR_ACN_ENCODING       1
#define __po_hi_c_Baudrate_T_REQUIRED_BITS_FOR_ACN_ENCODING        3

#ifndef ERR___po_hi_c_Baudrate_T_unknown_enumeration_value 
#define ERR___po_hi_c_Baudrate_T_unknown_enumeration_value		1000 /* invalid enumeration value */
#endif

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);


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

#define __po_hi_c_Parity_T_REQUIRED_BYTES_FOR_ENCODING        1
#define __po_hi_c_Parity_T_REQUIRED_BITS_FOR_ENCODING        1
#define __po_hi_c_Parity_T_REQUIRED_BYTES_FOR_ACN_ENCODING       1
#define __po_hi_c_Parity_T_REQUIRED_BITS_FOR_ACN_ENCODING        1

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

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);


typedef struct {
    char devname[21];
    __po_hi_c_Baudrate_T speed;
    __po_hi_c_Parity_T parity;
    asn1SccSint bits;
62
    asn1SccSint sending_wait;
63
64
65
66
67
    flag use_paritybit;
    struct {
        unsigned int speed:1;
        unsigned int parity:1;
        unsigned int bits:1;
68
        unsigned int sending_wait:1;
69
70
71
72
        unsigned int use_paritybit:1;
    } exist;
} __po_hi_c_serial_conf_t;

73
74
75
76
#define __po_hi_c_serial_conf_t_REQUIRED_BYTES_FOR_ENCODING        21
#define __po_hi_c_serial_conf_t_REQUIRED_BITS_FOR_ENCODING        166
#define __po_hi_c_serial_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING       24
#define __po_hi_c_serial_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING        186
77
78
79
80
81
82
83

#ifndef ERR___po_hi_c_serial_conf_t_devname 
#define ERR___po_hi_c_serial_conf_t_devname		1002 /* (SIZE (1..20)) */
#endif
#ifndef ERR___po_hi_c_serial_conf_t_bits 
#define ERR___po_hi_c_serial_conf_t_bits		1003 /* (7..8) */
#endif
84
85
86
#ifndef ERR___po_hi_c_serial_conf_t_sending_wait 
#define ERR___po_hi_c_serial_conf_t_sending_wait		1004 /* (0..1000) */
#endif
87
88
89
90
91

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);


92
93
extern  __po_hi_c_serial_conf_t linux_ttyS0;
extern  __po_hi_c_serial_conf_t leon_rasta_apburasta0;
94
95
96
97
98
99
100
101
102
103
104
105
106
107

#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
#endif

#endif