blob: e2a5f8997c8816e6cec2e4c71f86ac2d9a58dc0d [file] [log] [blame]
rajalakshmisv21b61dd2021-12-07 04:53:03 +00001/*
2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "E2SM-KPM-RC"
4 * found in "e2sm-kpm-rc.asn"
5 * `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example -D .`
6 */
7
8#include "ENB-ID.h"
9
10static int
11memb_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 == 20)) {
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
41static int
42memb_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 == 28)) {
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
72static int
73memb_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 == 18)) {
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
103static int
104memb_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 == 21)) {
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
134static asn_oer_constraints_t asn_OER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = {
135 { 0, 0 },
136 20 /* (SIZE(20..20)) */};
137static asn_per_constraints_t asn_PER_memb_macro_eNB_ID_constr_2 CC_NOTUSED = {
138 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
139 { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */,
140 0, 0 /* No PER value map */
141};
142static asn_oer_constraints_t asn_OER_memb_home_eNB_ID_constr_3 CC_NOTUSED = {
143 { 0, 0 },
144 28 /* (SIZE(28..28)) */};
145static asn_per_constraints_t asn_PER_memb_home_eNB_ID_constr_3 CC_NOTUSED = {
146 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
147 { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */,
148 0, 0 /* No PER value map */
149};
150static asn_oer_constraints_t asn_OER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = {
151 { 0, 0 },
152 18 /* (SIZE(18..18)) */};
153static asn_per_constraints_t asn_PER_memb_short_Macro_eNB_ID_constr_5 CC_NOTUSED = {
154 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
155 { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */,
156 0, 0 /* No PER value map */
157};
158static asn_oer_constraints_t asn_OER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = {
159 { 0, 0 },
160 21 /* (SIZE(21..21)) */};
161static asn_per_constraints_t asn_PER_memb_long_Macro_eNB_ID_constr_6 CC_NOTUSED = {
162 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
163 { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */,
164 0, 0 /* No PER value map */
165};
166static asn_oer_constraints_t asn_OER_type_ENB_ID_constr_1 CC_NOTUSED = {
167 { 0, 0 },
168 -1};
169asn_per_constraints_t asn_PER_type_ENB_ID_constr_1 CC_NOTUSED = {
170 { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */,
171 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
172 0, 0 /* No PER value map */
173};
174asn_TYPE_member_t asn_MBR_ENB_ID_1[] = {
175 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.macro_eNB_ID),
176 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
177 -1, /* IMPLICIT tag at current level */
178 &asn_DEF_BIT_STRING,
179 0,
180 { &asn_OER_memb_macro_eNB_ID_constr_2, &asn_PER_memb_macro_eNB_ID_constr_2, memb_macro_eNB_ID_constraint_1 },
181 0, 0, /* No default value */
182 "macro-eNB-ID"
183 },
184 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.home_eNB_ID),
185 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
186 -1, /* IMPLICIT tag at current level */
187 &asn_DEF_BIT_STRING,
188 0,
189 { &asn_OER_memb_home_eNB_ID_constr_3, &asn_PER_memb_home_eNB_ID_constr_3, memb_home_eNB_ID_constraint_1 },
190 0, 0, /* No default value */
191 "home-eNB-ID"
192 },
193 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.short_Macro_eNB_ID),
194 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
195 -1, /* IMPLICIT tag at current level */
196 &asn_DEF_BIT_STRING,
197 0,
198 { &asn_OER_memb_short_Macro_eNB_ID_constr_5, &asn_PER_memb_short_Macro_eNB_ID_constr_5, memb_short_Macro_eNB_ID_constraint_1 },
199 0, 0, /* No default value */
200 "short-Macro-eNB-ID"
201 },
202 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID, choice.long_Macro_eNB_ID),
203 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
204 -1, /* IMPLICIT tag at current level */
205 &asn_DEF_BIT_STRING,
206 0,
207 { &asn_OER_memb_long_Macro_eNB_ID_constr_6, &asn_PER_memb_long_Macro_eNB_ID_constr_6, memb_long_Macro_eNB_ID_constraint_1 },
208 0, 0, /* No default value */
209 "long-Macro-eNB-ID"
210 },
211};
212static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_tag2el_1[] = {
213 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macro-eNB-ID */
214 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* home-eNB-ID */
215 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* short-Macro-eNB-ID */
216 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* long-Macro-eNB-ID */
217};
218asn_CHOICE_specifics_t asn_SPC_ENB_ID_specs_1 = {
219 sizeof(struct ENB_ID),
220 offsetof(struct ENB_ID, _asn_ctx),
221 offsetof(struct ENB_ID, present),
222 sizeof(((struct ENB_ID *)0)->present),
223 asn_MAP_ENB_ID_tag2el_1,
224 4, /* Count of tags in the map */
225 0, 0,
226 2 /* Extensions start */
227};
228asn_TYPE_descriptor_t asn_DEF_ENB_ID = {
229 "ENB-ID",
230 "ENB-ID",
231 &asn_OP_CHOICE,
232 0, /* No effective tags (pointer) */
233 0, /* No effective tags (count) */
234 0, /* No tags (pointer) */
235 0, /* No tags (count) */
236 { &asn_OER_type_ENB_ID_constr_1, &asn_PER_type_ENB_ID_constr_1, CHOICE_constraint },
237 asn_MBR_ENB_ID_1,
238 4, /* Elements count */
239 &asn_SPC_ENB_ID_specs_1 /* Additional specs */
240};
241