blob: f6d14e2ccbe6ed70c68e39a47506480c02e2f2be [file] [log] [blame]
Ron Shachama9733db2020-09-14 12:05:31 -04001/*
2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "E2AP-IEs"
subhash kumar singhf86662b2022-03-22 00:39:54 +05304 * found in "e2ap-v2.asn"
5 * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -findirect-choice -fno-include-deps -gen-PER -no-gen-example -no-gen-OER`
Ron Shachama9733db2020-09-14 12:05:31 -04006 */
7
8#include "ENB-ID-Choice.h"
9
10static int
11memb_enb_ID_macro_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_enb_ID_shortmacro_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 == 18)) {
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_enb_ID_longmacro_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 == 21)) {
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
Ron Shachama9733db2020-09-14 12:05:31 -0400103static asn_per_constraints_t asn_PER_memb_enb_ID_macro_constr_2 CC_NOTUSED = {
104 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
105 { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */,
106 0, 0 /* No PER value map */
107};
Ron Shachama9733db2020-09-14 12:05:31 -0400108static asn_per_constraints_t asn_PER_memb_enb_ID_shortmacro_constr_3 CC_NOTUSED = {
109 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
110 { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */,
111 0, 0 /* No PER value map */
112};
Ron Shachama9733db2020-09-14 12:05:31 -0400113static asn_per_constraints_t asn_PER_memb_enb_ID_longmacro_constr_4 CC_NOTUSED = {
114 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
115 { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */,
116 0, 0 /* No PER value map */
117};
Ron Shachama9733db2020-09-14 12:05:31 -0400118asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1 CC_NOTUSED = {
119 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
120 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
121 0, 0 /* No PER value map */
122};
123asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[] = {
124 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_macro),
125 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
126 -1, /* IMPLICIT tag at current level */
127 &asn_DEF_BIT_STRING,
128 0,
naman.gupta4e29ea32021-09-24 14:19:08 +0530129 { 0, &asn_PER_memb_enb_ID_macro_constr_2, memb_enb_ID_macro_constraint_1 },
Ron Shachama9733db2020-09-14 12:05:31 -0400130 0, 0, /* No default value */
131 "enb-ID-macro"
132 },
133 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_shortmacro),
134 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
135 -1, /* IMPLICIT tag at current level */
136 &asn_DEF_BIT_STRING,
137 0,
naman.gupta4e29ea32021-09-24 14:19:08 +0530138 { 0, &asn_PER_memb_enb_ID_shortmacro_constr_3, memb_enb_ID_shortmacro_constraint_1 },
Ron Shachama9733db2020-09-14 12:05:31 -0400139 0, 0, /* No default value */
140 "enb-ID-shortmacro"
141 },
142 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_longmacro),
143 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
144 -1, /* IMPLICIT tag at current level */
145 &asn_DEF_BIT_STRING,
146 0,
naman.gupta4e29ea32021-09-24 14:19:08 +0530147 { 0, &asn_PER_memb_enb_ID_longmacro_constr_4, memb_enb_ID_longmacro_constraint_1 },
Ron Shachama9733db2020-09-14 12:05:31 -0400148 0, 0, /* No default value */
149 "enb-ID-longmacro"
150 },
151};
152static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_Choice_tag2el_1[] = {
153 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* enb-ID-macro */
154 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* enb-ID-shortmacro */
155 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* enb-ID-longmacro */
156};
157asn_CHOICE_specifics_t asn_SPC_ENB_ID_Choice_specs_1 = {
158 sizeof(struct ENB_ID_Choice),
159 offsetof(struct ENB_ID_Choice, _asn_ctx),
160 offsetof(struct ENB_ID_Choice, present),
161 sizeof(((struct ENB_ID_Choice *)0)->present),
162 asn_MAP_ENB_ID_Choice_tag2el_1,
163 3, /* Count of tags in the map */
164 0, 0,
165 3 /* Extensions start */
166};
167asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice = {
168 "ENB-ID-Choice",
169 "ENB-ID-Choice",
170 &asn_OP_CHOICE,
171 0, /* No effective tags (pointer) */
172 0, /* No effective tags (count) */
173 0, /* No tags (pointer) */
174 0, /* No tags (count) */
naman.gupta4e29ea32021-09-24 14:19:08 +0530175 { 0, &asn_PER_type_ENB_ID_Choice_constr_1, CHOICE_constraint },
Ron Shachama9733db2020-09-14 12:05:31 -0400176 asn_MBR_ENB_ID_Choice_1,
177 3, /* Elements count */
178 &asn_SPC_ENB_ID_Choice_specs_1 /* Additional specs */
179};
180