3 * Copyright 2020 AT&T Intellectual Property
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
21 * From ASN.1 module "E2AP-IEs"
22 * found in "../asnTextFiles/e2ap-v01.00.00.asn"
23 * `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
26 #include "ENB-ID-Choice.h"
29 memb_enb_ID_macro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
30 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
31 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
35 ASN__CTFAIL(app_key, td, sptr,
36 "%s: value not given (%s:%d)",
37 td->name, __FILE__, __LINE__);
43 size = 8 * st->size - (st->bits_unused & 0x07);
49 /* Constraint check succeeded */
52 ASN__CTFAIL(app_key, td, sptr,
53 "%s: constraint failed (%s:%d)",
54 td->name, __FILE__, __LINE__);
60 memb_enb_ID_shortmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
61 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
62 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
66 ASN__CTFAIL(app_key, td, sptr,
67 "%s: value not given (%s:%d)",
68 td->name, __FILE__, __LINE__);
74 size = 8 * st->size - (st->bits_unused & 0x07);
80 /* Constraint check succeeded */
83 ASN__CTFAIL(app_key, td, sptr,
84 "%s: constraint failed (%s:%d)",
85 td->name, __FILE__, __LINE__);
91 memb_enb_ID_longmacro_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
92 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
93 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
97 ASN__CTFAIL(app_key, td, sptr,
98 "%s: value not given (%s:%d)",
99 td->name, __FILE__, __LINE__);
105 size = 8 * st->size - (st->bits_unused & 0x07);
111 /* Constraint check succeeded */
114 ASN__CTFAIL(app_key, td, sptr,
115 "%s: constraint failed (%s:%d)",
116 td->name, __FILE__, __LINE__);
121 static asn_per_constraints_t asn_PER_memb_enb_ID_macro_constr_2 CC_NOTUSED = {
122 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
123 { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */,
124 0, 0 /* No PER value map */
126 static asn_per_constraints_t asn_PER_memb_enb_ID_shortmacro_constr_3 CC_NOTUSED = {
127 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
128 { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */,
129 0, 0 /* No PER value map */
131 static asn_per_constraints_t asn_PER_memb_enb_ID_longmacro_constr_4 CC_NOTUSED = {
132 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
133 { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */,
134 0, 0 /* No PER value map */
136 asn_per_constraints_t asn_PER_type_ENB_ID_Choice_constr_1 CC_NOTUSED = {
137 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
138 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
139 0, 0 /* No PER value map */
141 asn_TYPE_member_t asn_MBR_ENB_ID_Choice_1[] = {
142 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_macro),
143 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
144 -1, /* IMPLICIT tag at current level */
147 { 0, &asn_PER_memb_enb_ID_macro_constr_2, memb_enb_ID_macro_constraint_1 },
148 0, 0, /* No default value */
151 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_shortmacro),
152 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
153 -1, /* IMPLICIT tag at current level */
156 { 0, &asn_PER_memb_enb_ID_shortmacro_constr_3, memb_enb_ID_shortmacro_constraint_1 },
157 0, 0, /* No default value */
160 { ATF_NOFLAGS, 0, offsetof(struct ENB_ID_Choice, choice.enb_ID_longmacro),
161 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
162 -1, /* IMPLICIT tag at current level */
165 { 0, &asn_PER_memb_enb_ID_longmacro_constr_4, memb_enb_ID_longmacro_constraint_1 },
166 0, 0, /* No default value */
170 static const asn_TYPE_tag2member_t asn_MAP_ENB_ID_Choice_tag2el_1[] = {
171 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* enb-ID-macro */
172 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* enb-ID-shortmacro */
173 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* enb-ID-longmacro */
175 asn_CHOICE_specifics_t asn_SPC_ENB_ID_Choice_specs_1 = {
176 sizeof(struct ENB_ID_Choice),
177 offsetof(struct ENB_ID_Choice, _asn_ctx),
178 offsetof(struct ENB_ID_Choice, present),
179 sizeof(((struct ENB_ID_Choice *)0)->present),
180 asn_MAP_ENB_ID_Choice_tag2el_1,
181 3, /* Count of tags in the map */
183 3 /* Extensions start */
185 asn_TYPE_descriptor_t asn_DEF_ENB_ID_Choice = {
189 0, /* No effective tags (pointer) */
190 0, /* No effective tags (count) */
191 0, /* No tags (pointer) */
192 0, /* No tags (count) */
193 { 0, &asn_PER_type_ENB_ID_Choice_constr_1, CHOICE_constraint },
194 asn_MBR_ENB_ID_Choice_1,
195 3, /* Elements count */
196 &asn_SPC_ENB_ID_Choice_specs_1 /* Additional specs */