1 /*****************************************************************************
3 # Copyright 2019 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. *
17 ******************************************************************************/
20 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
21 * From ASN.1 module "X2AP-IEs"
22 * found in "../../asnFiles/X2AP-IEs.asn"
23 * `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
26 #include "RelativeNarrowbandTxPower.h"
28 #include "ProtocolExtensionContainer.h"
30 * This type is implemented using NativeEnumerated,
31 * so here we adjust the DEF accordingly.
34 memb_rNTP_PerPRB_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
35 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
36 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
40 ASN__CTFAIL(app_key, td, sptr,
41 "%s: value not given (%s:%d)",
42 td->name, __FILE__, __LINE__);
48 size = 8 * st->size - (st->bits_unused & 0x07);
53 if((size >= 6 && size <= 110)) {
54 /* Constraint check succeeded */
57 ASN__CTFAIL(app_key, td, sptr,
58 "%s: constraint failed (%s:%d)",
59 td->name, __FILE__, __LINE__);
65 memb_p_B_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
66 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
70 ASN__CTFAIL(app_key, td, sptr,
71 "%s: value not given (%s:%d)",
72 td->name, __FILE__, __LINE__);
76 value = *(const long *)sptr;
78 if((value >= 0 && value <= 3)) {
79 /* Constraint check succeeded */
82 ASN__CTFAIL(app_key, td, sptr,
83 "%s: constraint failed (%s:%d)",
84 td->name, __FILE__, __LINE__);
90 memb_pDCCH_InterferenceImpact_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
91 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
95 ASN__CTFAIL(app_key, td, sptr,
96 "%s: value not given (%s:%d)",
97 td->name, __FILE__, __LINE__);
101 value = *(const long *)sptr;
103 if((value >= 0 && value <= 4)) {
104 /* Constraint check succeeded */
107 ASN__CTFAIL(app_key, td, sptr,
108 "%s: constraint failed (%s:%d)",
109 td->name, __FILE__, __LINE__);
114 static asn_per_constraints_t asn_PER_type_numberOfCellSpecificAntennaPorts_constr_4 CC_NOTUSED = {
115 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
116 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
117 0, 0 /* No PER value map */
119 static asn_per_constraints_t asn_PER_memb_rNTP_PerPRB_constr_2 CC_NOTUSED = {
120 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
121 { APC_CONSTRAINED | APC_EXTENSIBLE, 7, 7, 6, 110 } /* (SIZE(6..110,...)) */,
122 0, 0 /* No PER value map */
124 static asn_per_constraints_t asn_PER_memb_p_B_constr_9 CC_NOTUSED = {
125 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */,
126 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
127 0, 0 /* No PER value map */
129 static asn_per_constraints_t asn_PER_memb_pDCCH_InterferenceImpact_constr_10 CC_NOTUSED = {
130 { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */,
131 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
132 0, 0 /* No PER value map */
134 static const asn_INTEGER_enum_map_t asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_4[] = {
138 /* This list is extensible */
140 static const unsigned int asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_4[] = {
144 /* This list is extensible */
146 static const asn_INTEGER_specifics_t asn_SPC_numberOfCellSpecificAntennaPorts_specs_4 = {
147 asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_4, /* "tag" => N; sorted by tag */
148 asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_4, /* N => "tag"; sorted by N */
149 3, /* Number of elements in the maps */
150 4, /* Extensions before this member */
151 1, /* Strict enumeration */
152 0, /* Native long size */
155 static const ber_tlv_tag_t asn_DEF_numberOfCellSpecificAntennaPorts_tags_4[] = {
156 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
157 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
159 static /* Use -fall-defs-global to expose */
160 asn_TYPE_descriptor_t asn_DEF_numberOfCellSpecificAntennaPorts_4 = {
161 "numberOfCellSpecificAntennaPorts",
162 "numberOfCellSpecificAntennaPorts",
163 &asn_OP_NativeEnumerated,
164 asn_DEF_numberOfCellSpecificAntennaPorts_tags_4,
165 sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4)
166 /sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4[0]) - 1, /* 1 */
167 asn_DEF_numberOfCellSpecificAntennaPorts_tags_4, /* Same as above */
168 sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4)
169 /sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4[0]), /* 2 */
170 { 0, &asn_PER_type_numberOfCellSpecificAntennaPorts_constr_4, NativeEnumerated_constraint },
171 0, 0, /* Defined elsewhere */
172 &asn_SPC_numberOfCellSpecificAntennaPorts_specs_4 /* Additional specs */
175 asn_TYPE_member_t asn_MBR_RelativeNarrowbandTxPower_1[] = {
176 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, rNTP_PerPRB),
177 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
178 -1, /* IMPLICIT tag at current level */
181 { 0, &asn_PER_memb_rNTP_PerPRB_constr_2, memb_rNTP_PerPRB_constraint_1 },
182 0, 0, /* No default value */
185 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, rNTP_Threshold),
186 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
187 -1, /* IMPLICIT tag at current level */
188 &asn_DEF_RNTP_Threshold,
191 0, 0, /* No default value */
194 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, numberOfCellSpecificAntennaPorts),
195 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
196 -1, /* IMPLICIT tag at current level */
197 &asn_DEF_numberOfCellSpecificAntennaPorts_4,
200 0, 0, /* No default value */
201 "numberOfCellSpecificAntennaPorts"
203 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, p_B),
204 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
205 -1, /* IMPLICIT tag at current level */
206 &asn_DEF_NativeInteger,
208 { 0, &asn_PER_memb_p_B_constr_9, memb_p_B_constraint_1 },
209 0, 0, /* No default value */
212 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, pDCCH_InterferenceImpact),
213 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
214 -1, /* IMPLICIT tag at current level */
215 &asn_DEF_NativeInteger,
217 { 0, &asn_PER_memb_pDCCH_InterferenceImpact_constr_10, memb_pDCCH_InterferenceImpact_constraint_1 },
218 0, 0, /* No default value */
219 "pDCCH-InterferenceImpact"
221 { ATF_POINTER, 1, offsetof(struct RelativeNarrowbandTxPower, iE_Extensions),
222 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
223 -1, /* IMPLICIT tag at current level */
224 &asn_DEF_ProtocolExtensionContainer_170P184,
227 0, 0, /* No default value */
231 static const int asn_MAP_RelativeNarrowbandTxPower_oms_1[] = { 5 };
232 static const ber_tlv_tag_t asn_DEF_RelativeNarrowbandTxPower_tags_1[] = {
233 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
235 static const asn_TYPE_tag2member_t asn_MAP_RelativeNarrowbandTxPower_tag2el_1[] = {
236 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rNTP-PerPRB */
237 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rNTP-Threshold */
238 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* numberOfCellSpecificAntennaPorts */
239 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* p-B */
240 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* pDCCH-InterferenceImpact */
241 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */
243 asn_SEQUENCE_specifics_t asn_SPC_RelativeNarrowbandTxPower_specs_1 = {
244 sizeof(struct RelativeNarrowbandTxPower),
245 offsetof(struct RelativeNarrowbandTxPower, _asn_ctx),
246 asn_MAP_RelativeNarrowbandTxPower_tag2el_1,
247 6, /* Count of tags in the map */
248 asn_MAP_RelativeNarrowbandTxPower_oms_1, /* Optional members */
249 1, 0, /* Root/Additions */
250 6, /* First extension addition */
252 asn_TYPE_descriptor_t asn_DEF_RelativeNarrowbandTxPower = {
253 "RelativeNarrowbandTxPower",
254 "RelativeNarrowbandTxPower",
256 asn_DEF_RelativeNarrowbandTxPower_tags_1,
257 sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1)
258 /sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1[0]), /* 1 */
259 asn_DEF_RelativeNarrowbandTxPower_tags_1, /* Same as above */
260 sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1)
261 /sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1[0]), /* 1 */
262 { 0, 0, SEQUENCE_constraint },
263 asn_MBR_RelativeNarrowbandTxPower_1,
264 6, /* Elements count */
265 &asn_SPC_RelativeNarrowbandTxPower_specs_1 /* Additional specs */