SIM-115: update simulator to use latest E2SM KPM version 3
[sim/e2-interface.git] / e2sim / asn1c / E2SM-COMMON-IEs_ENB-ID.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "E2SM-COMMON-IEs"
4  *      found in "e2sm-v03.01.asn"
5  *      `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -no-gen-example -no-gen-OER -D /tmp/workspace/oransim-gerrit/e2sim/asn1c/`
6  */
7
8 #include "E2SM-COMMON-IEs_ENB-ID.h"
9
10 static int
11 memb_macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
14         size_t size;
15         
16         if(!sptr) {
17                 ASN__CTFAIL(app_key, td, sptr,
18                         "%s: value not given (%s:%d)",
19                         td->name, __FILE__, __LINE__);
20                 return -1;
21         }
22         
23         if(st->size > 0) {
24                 /* Size in bits */
25                 size = 8 * st->size - (st->bits_unused & 0x07);
26         } else {
27                 size = 0;
28         }
29         
30         if((size == 20UL)) {
31                 /* Constraint check succeeded */
32                 return 0;
33         } else {
34                 ASN__CTFAIL(app_key, td, sptr,
35                         "%s: constraint failed (%s:%d)",
36                         td->name, __FILE__, __LINE__);
37                 return -1;
38         }
39 }
40
41 static int
42 memb_home_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
43                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
44         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
45         size_t size;
46         
47         if(!sptr) {
48                 ASN__CTFAIL(app_key, td, sptr,
49                         "%s: value not given (%s:%d)",
50                         td->name, __FILE__, __LINE__);
51                 return -1;
52         }
53         
54         if(st->size > 0) {
55                 /* Size in bits */
56                 size = 8 * st->size - (st->bits_unused & 0x07);
57         } else {
58                 size = 0;
59         }
60         
61         if((size == 28UL)) {
62                 /* Constraint check succeeded */
63                 return 0;
64         } else {
65                 ASN__CTFAIL(app_key, td, sptr,
66                         "%s: constraint failed (%s:%d)",
67                         td->name, __FILE__, __LINE__);
68                 return -1;
69         }
70 }
71
72 static int
73 memb_short_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
74                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
75         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
76         size_t size;
77         
78         if(!sptr) {
79                 ASN__CTFAIL(app_key, td, sptr,
80                         "%s: value not given (%s:%d)",
81                         td->name, __FILE__, __LINE__);
82                 return -1;
83         }
84         
85         if(st->size > 0) {
86                 /* Size in bits */
87                 size = 8 * st->size - (st->bits_unused & 0x07);
88         } else {
89                 size = 0;
90         }
91         
92         if((size == 18UL)) {
93                 /* Constraint check succeeded */
94                 return 0;
95         } else {
96                 ASN__CTFAIL(app_key, td, sptr,
97                         "%s: constraint failed (%s:%d)",
98                         td->name, __FILE__, __LINE__);
99                 return -1;
100         }
101 }
102
103 static int
104 memb_long_Macro_eNB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
105                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
106         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
107         size_t size;
108         
109         if(!sptr) {
110                 ASN__CTFAIL(app_key, td, sptr,
111                         "%s: value not given (%s:%d)",
112                         td->name, __FILE__, __LINE__);
113                 return -1;
114         }
115         
116         if(st->size > 0) {
117                 /* Size in bits */
118                 size = 8 * st->size - (st->bits_unused & 0x07);
119         } else {
120                 size = 0;
121         }
122         
123         if((size == 21UL)) {
124                 /* Constraint check succeeded */
125                 return 0;
126         } else {
127                 ASN__CTFAIL(app_key, td, sptr,
128                         "%s: constraint failed (%s:%d)",
129                         td->name, __FILE__, __LINE__);
130                 return -1;
131         }
132 }
133
134 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
135 static asn_per_constraints_t asn_PER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = {
136         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
137         { APC_CONSTRAINED,       0,  0,  20,  20 }      /* (SIZE(20..20)) */,
138         0, 0    /* No PER value map */
139 };
140 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
141 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
142 static asn_per_constraints_t asn_PER_memb_home_eNB_ID_constr_3 CC_NOTUSED = {
143         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
144         { APC_CONSTRAINED,       0,  0,  28,  28 }      /* (SIZE(28..28)) */,
145         0, 0    /* No PER value map */
146 };
147 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
148 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
149 static asn_per_constraints_t asn_PER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = {
150         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
151         { APC_CONSTRAINED,       0,  0,  18,  18 }      /* (SIZE(18..18)) */,
152         0, 0    /* No PER value map */
153 };
154 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
155 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
156 static asn_per_constraints_t asn_PER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = {
157         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
158         { APC_CONSTRAINED,       0,  0,  21,  21 }      /* (SIZE(21..21)) */,
159         0, 0    /* No PER value map */
160 };
161 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
162 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
163 asn_per_constraints_t asn_PER_type_E2SM_COMMON_IEs_ENB_ID_constr_1 CC_NOTUSED = {
164         { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }    /* (0..1,...) */,
165         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
166         0, 0    /* No PER value map */
167 };
168 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
169 asn_TYPE_member_t asn_MBR_E2SM_COMMON_IEs_ENB_ID_1[] = {
170         { ATF_NOFLAGS, 0, offsetof(struct E2SM_COMMON_IEs_ENB_ID, choice.macro_eNB_ID),
171                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
172                 -1,     /* IMPLICIT tag at current level */
173                 &asn_DEF_BIT_STRING,
174                 0,
175                 {
176 #if !defined(ASN_DISABLE_OER_SUPPORT)
177                         0,
178 #endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
179 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
180                         &asn_PER_memb_macro_eNB_ID_constr_2,
181 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
182                         memb_macro_eNB_ID_constraint_1
183                 },
184                 0, 0, /* No default value */
185                 "macro-eNB-ID"
186                 },
187         { ATF_NOFLAGS, 0, offsetof(struct E2SM_COMMON_IEs_ENB_ID, choice.home_eNB_ID),
188                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
189                 -1,     /* IMPLICIT tag at current level */
190                 &asn_DEF_BIT_STRING,
191                 0,
192                 {
193 #if !defined(ASN_DISABLE_OER_SUPPORT)
194                         0,
195 #endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
196 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
197                         &asn_PER_memb_home_eNB_ID_constr_3,
198 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
199                         memb_home_eNB_ID_constraint_1
200                 },
201                 0, 0, /* No default value */
202                 "home-eNB-ID"
203                 },
204         { ATF_NOFLAGS, 0, offsetof(struct E2SM_COMMON_IEs_ENB_ID, choice.short_Macro_eNB_ID),
205                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
206                 -1,     /* IMPLICIT tag at current level */
207                 &asn_DEF_BIT_STRING,
208                 0,
209                 {
210 #if !defined(ASN_DISABLE_OER_SUPPORT)
211                         0,
212 #endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
213 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
214                         &asn_PER_memb_short_Macro_eNB_ID_constr_5,
215 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
216                         memb_short_Macro_eNB_ID_constraint_1
217                 },
218                 0, 0, /* No default value */
219                 "short-Macro-eNB-ID"
220                 },
221         { ATF_NOFLAGS, 0, offsetof(struct E2SM_COMMON_IEs_ENB_ID, choice.long_Macro_eNB_ID),
222                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
223                 -1,     /* IMPLICIT tag at current level */
224                 &asn_DEF_BIT_STRING,
225                 0,
226                 {
227 #if !defined(ASN_DISABLE_OER_SUPPORT)
228                         0,
229 #endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
230 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
231                         &asn_PER_memb_long_Macro_eNB_ID_constr_6,
232 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
233                         memb_long_Macro_eNB_ID_constraint_1
234                 },
235                 0, 0, /* No default value */
236                 "long-Macro-eNB-ID"
237                 },
238 };
239 static const asn_TYPE_tag2member_t asn_MAP_E2SM_COMMON_IEs_ENB_ID_tag2el_1[] = {
240     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macro-eNB-ID */
241     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* home-eNB-ID */
242     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* short-Macro-eNB-ID */
243     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* long-Macro-eNB-ID */
244 };
245 asn_CHOICE_specifics_t asn_SPC_E2SM_COMMON_IEs_ENB_ID_specs_1 = {
246         sizeof(struct E2SM_COMMON_IEs_ENB_ID),
247         offsetof(struct E2SM_COMMON_IEs_ENB_ID, _asn_ctx),
248         offsetof(struct E2SM_COMMON_IEs_ENB_ID, present),
249         sizeof(((struct E2SM_COMMON_IEs_ENB_ID *)0)->present),
250         asn_MAP_E2SM_COMMON_IEs_ENB_ID_tag2el_1,
251         4,      /* Count of tags in the map */
252         0, 0,
253         2       /* Extensions start */
254 };
255 asn_TYPE_descriptor_t asn_DEF_E2SM_COMMON_IEs_ENB_ID = {
256         "ENB-ID",
257         "ENB-ID",
258         &asn_OP_CHOICE,
259         0,      /* No effective tags (pointer) */
260         0,      /* No effective tags (count) */
261         0,      /* No tags (pointer) */
262         0,      /* No tags (count) */
263         {
264 #if !defined(ASN_DISABLE_OER_SUPPORT)
265                 0,
266 #endif  /* !defined(ASN_DISABLE_OER_SUPPORT) */
267 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
268                 &asn_PER_type_E2SM_COMMON_IEs_ENB_ID_constr_1,
269 #endif  /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
270                 CHOICE_constraint
271         },
272         asn_MBR_E2SM_COMMON_IEs_ENB_ID_1,
273         4,      /* Elements count */
274         &asn_SPC_E2SM_COMMON_IEs_ENB_ID_specs_1 /* Additional specs */
275 };
276