2 * Copyright 2019 AT&T Intellectual Property
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * This source code is part of the near-RT RIC (RAN Intelligent Controller)
19 * platform project (RICP).
25 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
26 * From ASN.1 module "X2AP-IEs"
27 * found in "../../asnFiles/X2AP-IEs.asn"
28 * `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
31 #include "RelativeNarrowbandTxPower.h"
33 #include "ProtocolExtensionContainer.h"
35 * This type is implemented using NativeEnumerated,
36 * so here we adjust the DEF accordingly.
39 memb_rNTP_PerPRB_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
40 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
41 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
45 ASN__CTFAIL(app_key, td, sptr,
46 "%s: value not given (%s:%d)",
47 td->name, __FILE__, __LINE__);
53 size = 8 * st->size - (st->bits_unused & 0x07);
58 if((size >= 6 && size <= 110)) {
59 /* Constraint check succeeded */
62 ASN__CTFAIL(app_key, td, sptr,
63 "%s: constraint failed (%s:%d)",
64 td->name, __FILE__, __LINE__);
70 memb_p_B_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
71 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
75 ASN__CTFAIL(app_key, td, sptr,
76 "%s: value not given (%s:%d)",
77 td->name, __FILE__, __LINE__);
81 value = *(const long *)sptr;
83 if((value >= 0 && value <= 3)) {
84 /* Constraint check succeeded */
87 ASN__CTFAIL(app_key, td, sptr,
88 "%s: constraint failed (%s:%d)",
89 td->name, __FILE__, __LINE__);
95 memb_pDCCH_InterferenceImpact_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
96 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
100 ASN__CTFAIL(app_key, td, sptr,
101 "%s: value not given (%s:%d)",
102 td->name, __FILE__, __LINE__);
106 value = *(const long *)sptr;
108 if((value >= 0 && value <= 4)) {
109 /* Constraint check succeeded */
112 ASN__CTFAIL(app_key, td, sptr,
113 "%s: constraint failed (%s:%d)",
114 td->name, __FILE__, __LINE__);
119 static asn_per_constraints_t asn_PER_type_numberOfCellSpecificAntennaPorts_constr_4 CC_NOTUSED = {
120 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
121 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
122 0, 0 /* No PER value map */
124 static asn_per_constraints_t asn_PER_memb_rNTP_PerPRB_constr_2 CC_NOTUSED = {
125 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
126 { APC_CONSTRAINED | APC_EXTENSIBLE, 7, 7, 6, 110 } /* (SIZE(6..110,...)) */,
127 0, 0 /* No PER value map */
129 static asn_per_constraints_t asn_PER_memb_p_B_constr_9 CC_NOTUSED = {
130 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */,
131 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
132 0, 0 /* No PER value map */
134 static asn_per_constraints_t asn_PER_memb_pDCCH_InterferenceImpact_constr_10 CC_NOTUSED = {
135 { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */,
136 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
137 0, 0 /* No PER value map */
139 static const asn_INTEGER_enum_map_t asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_4[] = {
143 /* This list is extensible */
145 static const unsigned int asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_4[] = {
149 /* This list is extensible */
151 static const asn_INTEGER_specifics_t asn_SPC_numberOfCellSpecificAntennaPorts_specs_4 = {
152 asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_4, /* "tag" => N; sorted by tag */
153 asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_4, /* N => "tag"; sorted by N */
154 3, /* Number of elements in the maps */
155 4, /* Extensions before this member */
156 1, /* Strict enumeration */
157 0, /* Native long size */
160 static const ber_tlv_tag_t asn_DEF_numberOfCellSpecificAntennaPorts_tags_4[] = {
161 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
162 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
164 static /* Use -fall-defs-global to expose */
165 asn_TYPE_descriptor_t asn_DEF_numberOfCellSpecificAntennaPorts_4 = {
166 "numberOfCellSpecificAntennaPorts",
167 "numberOfCellSpecificAntennaPorts",
168 &asn_OP_NativeEnumerated,
169 asn_DEF_numberOfCellSpecificAntennaPorts_tags_4,
170 sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4)
171 /sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4[0]) - 1, /* 1 */
172 asn_DEF_numberOfCellSpecificAntennaPorts_tags_4, /* Same as above */
173 sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4)
174 /sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4[0]), /* 2 */
175 { 0, &asn_PER_type_numberOfCellSpecificAntennaPorts_constr_4, NativeEnumerated_constraint },
176 0, 0, /* Defined elsewhere */
177 &asn_SPC_numberOfCellSpecificAntennaPorts_specs_4 /* Additional specs */
180 asn_TYPE_member_t asn_MBR_RelativeNarrowbandTxPower_1[] = {
181 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, rNTP_PerPRB),
182 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
183 -1, /* IMPLICIT tag at current level */
186 { 0, &asn_PER_memb_rNTP_PerPRB_constr_2, memb_rNTP_PerPRB_constraint_1 },
187 0, 0, /* No default value */
190 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, rNTP_Threshold),
191 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
192 -1, /* IMPLICIT tag at current level */
193 &asn_DEF_RNTP_Threshold,
196 0, 0, /* No default value */
199 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, numberOfCellSpecificAntennaPorts),
200 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
201 -1, /* IMPLICIT tag at current level */
202 &asn_DEF_numberOfCellSpecificAntennaPorts_4,
205 0, 0, /* No default value */
206 "numberOfCellSpecificAntennaPorts"
208 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, p_B),
209 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
210 -1, /* IMPLICIT tag at current level */
211 &asn_DEF_NativeInteger,
213 { 0, &asn_PER_memb_p_B_constr_9, memb_p_B_constraint_1 },
214 0, 0, /* No default value */
217 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, pDCCH_InterferenceImpact),
218 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
219 -1, /* IMPLICIT tag at current level */
220 &asn_DEF_NativeInteger,
222 { 0, &asn_PER_memb_pDCCH_InterferenceImpact_constr_10, memb_pDCCH_InterferenceImpact_constraint_1 },
223 0, 0, /* No default value */
224 "pDCCH-InterferenceImpact"
226 { ATF_POINTER, 1, offsetof(struct RelativeNarrowbandTxPower, iE_Extensions),
227 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
228 -1, /* IMPLICIT tag at current level */
229 &asn_DEF_ProtocolExtensionContainer_170P184,
232 0, 0, /* No default value */
236 static const int asn_MAP_RelativeNarrowbandTxPower_oms_1[] = { 5 };
237 static const ber_tlv_tag_t asn_DEF_RelativeNarrowbandTxPower_tags_1[] = {
238 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
240 static const asn_TYPE_tag2member_t asn_MAP_RelativeNarrowbandTxPower_tag2el_1[] = {
241 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rNTP-PerPRB */
242 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rNTP-Threshold */
243 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* numberOfCellSpecificAntennaPorts */
244 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* p-B */
245 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* pDCCH-InterferenceImpact */
246 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */
248 asn_SEQUENCE_specifics_t asn_SPC_RelativeNarrowbandTxPower_specs_1 = {
249 sizeof(struct RelativeNarrowbandTxPower),
250 offsetof(struct RelativeNarrowbandTxPower, _asn_ctx),
251 asn_MAP_RelativeNarrowbandTxPower_tag2el_1,
252 6, /* Count of tags in the map */
253 asn_MAP_RelativeNarrowbandTxPower_oms_1, /* Optional members */
254 1, 0, /* Root/Additions */
255 6, /* First extension addition */
257 asn_TYPE_descriptor_t asn_DEF_RelativeNarrowbandTxPower = {
258 "RelativeNarrowbandTxPower",
259 "RelativeNarrowbandTxPower",
261 asn_DEF_RelativeNarrowbandTxPower_tags_1,
262 sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1)
263 /sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1[0]), /* 1 */
264 asn_DEF_RelativeNarrowbandTxPower_tags_1, /* Same as above */
265 sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1)
266 /sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1[0]), /* 1 */
267 { 0, 0, SEQUENCE_constraint },
268 asn_MBR_RelativeNarrowbandTxPower_1,
269 6, /* Elements count */
270 &asn_SPC_RelativeNarrowbandTxPower_specs_1 /* Additional specs */