ip.h 3.54 KB
Newer Older
yoogx's avatar
yoogx committed
1
2
3
4
5
6
7
8
9
10
/*
 * 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.
 *
 * For more informations, please visit http://http://taste.tuxfamily.org/wiki
 *
 * Copyright (C) 2014 ESA & ISAE.
 */

11
12
13
14
#ifndef _INC_IP_H
#define _INC_IP_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_Port_T;

#define __po_hi_c_Port_T_REQUIRED_BYTES_FOR_ENCODING        2
#define __po_hi_c_Port_T_REQUIRED_BITS_FOR_ENCODING        15
#define __po_hi_c_Port_T_REQUIRED_BYTES_FOR_ACN_ENCODING       2
#define __po_hi_c_Port_T_REQUIRED_BITS_FOR_ACN_ENCODING        15
jdelange's avatar
jdelange committed
33
#define __po_hi_c_Port_T_REQUIRED_BYTES_FOR_XER_ENCODING       37
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

#ifndef ERR___po_hi_c_Port_T 
#define ERR___po_hi_c_Port_T		1000 /* (0..16535) */
#endif

void __po_hi_c_Port_T_Initialize(__po_hi_c_Port_T* pVal);
flag __po_hi_c_Port_T_IsConstraintValid(const __po_hi_c_Port_T* val, int* pErrCode);


typedef enum {
    __po_hi_c_ipv4 = 0,
    __po_hi_c_ipv6 = 1
} __po_hi_c_Version_T;

#define __po_hi_c_Version_T_REQUIRED_BYTES_FOR_ENCODING        1
#define __po_hi_c_Version_T_REQUIRED_BITS_FOR_ENCODING        1
#define __po_hi_c_Version_T_REQUIRED_BYTES_FOR_ACN_ENCODING       1
#define __po_hi_c_Version_T_REQUIRED_BITS_FOR_ACN_ENCODING        1
jdelange's avatar
jdelange committed
52
#define __po_hi_c_Version_T_REQUIRED_BYTES_FOR_XER_ENCODING       34
53
54
55
56
57
58
59
60
61
62
63
64

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

void __po_hi_c_Version_T_Initialize(__po_hi_c_Version_T* pVal);
flag __po_hi_c_Version_T_IsConstraintValid(const __po_hi_c_Version_T* val, int* pErrCode);


typedef struct {
    char devname[21];
    char address[41];
jdelange's avatar
jdelange committed
65
66
67
68
    char broadcast[41];
    char netmask[41];
    char gateway[41];
    char dns[41];
69
70
71
    __po_hi_c_Version_T version;
    __po_hi_c_Port_T port;
    struct {
jdelange's avatar
jdelange committed
72
73
74
75
        unsigned int broadcast:1;
        unsigned int netmask:1;
        unsigned int gateway:1;
        unsigned int dns:1;
76
77
78
79
        unsigned int version:1;
    } exist;
} __po_hi_c_ip_conf_t;

jdelange's avatar
jdelange committed
80
81
82
83
#define __po_hi_c_ip_conf_t_REQUIRED_BYTES_FOR_ENCODING        200
#define __po_hi_c_ip_conf_t_REQUIRED_BITS_FOR_ENCODING        1596
#define __po_hi_c_ip_conf_t_REQUIRED_BYTES_FOR_ACN_ENCODING       227
#define __po_hi_c_ip_conf_t_REQUIRED_BITS_FOR_ACN_ENCODING        1816
jdelange's avatar
jdelange committed
84
#define __po_hi_c_ip_conf_t_REQUIRED_BYTES_FOR_XER_ENCODING       416
85
86
87
88
89
90
91

#ifndef ERR___po_hi_c_ip_conf_t_devname 
#define ERR___po_hi_c_ip_conf_t_devname		1002 /* (SIZE (1..20)) */
#endif
#ifndef ERR___po_hi_c_ip_conf_t_address 
#define ERR___po_hi_c_ip_conf_t_address		1003 /* (SIZE (1..40)) */
#endif
jdelange's avatar
jdelange committed
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef ERR___po_hi_c_ip_conf_t_broadcast 
#define ERR___po_hi_c_ip_conf_t_broadcast		1004 /* (SIZE (1..40)) */
#endif
#ifndef ERR___po_hi_c_ip_conf_t_netmask 
#define ERR___po_hi_c_ip_conf_t_netmask		1005 /* (SIZE (1..40)) */
#endif
#ifndef ERR___po_hi_c_ip_conf_t_gateway 
#define ERR___po_hi_c_ip_conf_t_gateway		1006 /* (SIZE (1..40)) */
#endif
#ifndef ERR___po_hi_c_ip_conf_t_dns 
#define ERR___po_hi_c_ip_conf_t_dns		1007 /* (SIZE (1..40)) */
#endif
104
105
106
107
108

void __po_hi_c_ip_conf_t_Initialize(__po_hi_c_ip_conf_t* pVal);
flag __po_hi_c_ip_conf_t_IsConstraintValid(const __po_hi_c_ip_conf_t* val, int* pErrCode);


109
110
extern  __po_hi_c_ip_conf_t localhost1;
extern  __po_hi_c_ip_conf_t localhost2;
111
112
113
114
115
116
117
118

#ifdef  __cplusplus
}
#define ENUM___po_hi_c_ipv4	__po_hi_c_ipv4
#define ENUM___po_hi_c_ipv6	__po_hi_c_ipv6
#endif

#endif