2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "X2AP-IEs"
4 * found in "Spec/e2_and_x2-combined-and-minimized.asn1"
5 * `asn1c -pdu=auto -fincludes-quoted -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example`
8 #include "RelativeNarrowbandTxPower.h"
10 #include "ProtocolExtensionContainer.h"
12 * This type is implemented using NativeEnumerated,
13 * so here we adjust the DEF accordingly.
16 memb_rNTP_PerPRB_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
17 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
18 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
22 ASN__CTFAIL(app_key, td, sptr,
23 "%s: value not given (%s:%d)",
24 td->name, __FILE__, __LINE__);
30 size = 8 * st->size - (st->bits_unused & 0x07);
35 if((size >= 6 && size <= 110)) {
36 /* Constraint check succeeded */
39 ASN__CTFAIL(app_key, td, sptr,
40 "%s: constraint failed (%s:%d)",
41 td->name, __FILE__, __LINE__);
47 memb_p_B_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
48 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
52 ASN__CTFAIL(app_key, td, sptr,
53 "%s: value not given (%s:%d)",
54 td->name, __FILE__, __LINE__);
58 value = *(const long *)sptr;
60 if((value >= 0 && value <= 3)) {
61 /* Constraint check succeeded */
64 ASN__CTFAIL(app_key, td, sptr,
65 "%s: constraint failed (%s:%d)",
66 td->name, __FILE__, __LINE__);
72 memb_pDCCH_InterferenceImpact_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
73 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
77 ASN__CTFAIL(app_key, td, sptr,
78 "%s: value not given (%s:%d)",
79 td->name, __FILE__, __LINE__);
83 value = *(const long *)sptr;
85 if((value >= 0 && value <= 4)) {
86 /* Constraint check succeeded */
89 ASN__CTFAIL(app_key, td, sptr,
90 "%s: constraint failed (%s:%d)",
91 td->name, __FILE__, __LINE__);
96 static asn_per_constraints_t asn_PER_type_numberOfCellSpecificAntennaPorts_constr_4 CC_NOTUSED = {
97 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
98 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
99 0, 0 /* No PER value map */
101 static asn_per_constraints_t asn_PER_memb_rNTP_PerPRB_constr_2 CC_NOTUSED = {
102 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
103 { APC_CONSTRAINED | APC_EXTENSIBLE, 7, 7, 6, 110 } /* (SIZE(6..110,...)) */,
104 0, 0 /* No PER value map */
106 static asn_per_constraints_t asn_PER_memb_p_B_constr_9 CC_NOTUSED = {
107 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */,
108 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
109 0, 0 /* No PER value map */
111 static asn_per_constraints_t asn_PER_memb_pDCCH_InterferenceImpact_constr_10 CC_NOTUSED = {
112 { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */,
113 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
114 0, 0 /* No PER value map */
116 static const asn_INTEGER_enum_map_t asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_4[] = {
120 /* This list is extensible */
122 static const unsigned int asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_4[] = {
126 /* This list is extensible */
128 static const asn_INTEGER_specifics_t asn_SPC_numberOfCellSpecificAntennaPorts_specs_4 = {
129 asn_MAP_numberOfCellSpecificAntennaPorts_value2enum_4, /* "tag" => N; sorted by tag */
130 asn_MAP_numberOfCellSpecificAntennaPorts_enum2value_4, /* N => "tag"; sorted by N */
131 3, /* Number of elements in the maps */
132 4, /* Extensions before this member */
133 1, /* Strict enumeration */
134 0, /* Native long size */
137 static const ber_tlv_tag_t asn_DEF_numberOfCellSpecificAntennaPorts_tags_4[] = {
138 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
139 (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
141 static /* Use -fall-defs-global to expose */
142 asn_TYPE_descriptor_t asn_DEF_numberOfCellSpecificAntennaPorts_4 = {
143 "numberOfCellSpecificAntennaPorts",
144 "numberOfCellSpecificAntennaPorts",
145 &asn_OP_NativeEnumerated,
146 asn_DEF_numberOfCellSpecificAntennaPorts_tags_4,
147 sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4)
148 /sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4[0]) - 1, /* 1 */
149 asn_DEF_numberOfCellSpecificAntennaPorts_tags_4, /* Same as above */
150 sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4)
151 /sizeof(asn_DEF_numberOfCellSpecificAntennaPorts_tags_4[0]), /* 2 */
152 { 0, &asn_PER_type_numberOfCellSpecificAntennaPorts_constr_4, NativeEnumerated_constraint },
153 0, 0, /* Defined elsewhere */
154 &asn_SPC_numberOfCellSpecificAntennaPorts_specs_4 /* Additional specs */
157 asn_TYPE_member_t asn_MBR_RelativeNarrowbandTxPower_1[] = {
158 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, rNTP_PerPRB),
159 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
160 -1, /* IMPLICIT tag at current level */
163 { 0, &asn_PER_memb_rNTP_PerPRB_constr_2, memb_rNTP_PerPRB_constraint_1 },
164 0, 0, /* No default value */
167 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, rNTP_Threshold),
168 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
169 -1, /* IMPLICIT tag at current level */
170 &asn_DEF_RNTP_Threshold,
173 0, 0, /* No default value */
176 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, numberOfCellSpecificAntennaPorts),
177 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
178 -1, /* IMPLICIT tag at current level */
179 &asn_DEF_numberOfCellSpecificAntennaPorts_4,
182 0, 0, /* No default value */
183 "numberOfCellSpecificAntennaPorts"
185 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, p_B),
186 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
187 -1, /* IMPLICIT tag at current level */
188 &asn_DEF_NativeInteger,
190 { 0, &asn_PER_memb_p_B_constr_9, memb_p_B_constraint_1 },
191 0, 0, /* No default value */
194 { ATF_NOFLAGS, 0, offsetof(struct RelativeNarrowbandTxPower, pDCCH_InterferenceImpact),
195 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
196 -1, /* IMPLICIT tag at current level */
197 &asn_DEF_NativeInteger,
199 { 0, &asn_PER_memb_pDCCH_InterferenceImpact_constr_10, memb_pDCCH_InterferenceImpact_constraint_1 },
200 0, 0, /* No default value */
201 "pDCCH-InterferenceImpact"
203 { ATF_POINTER, 1, offsetof(struct RelativeNarrowbandTxPower, iE_Extensions),
204 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
205 -1, /* IMPLICIT tag at current level */
206 &asn_DEF_ProtocolExtensionContainer_8858P60,
209 0, 0, /* No default value */
213 static const int asn_MAP_RelativeNarrowbandTxPower_oms_1[] = { 5 };
214 static const ber_tlv_tag_t asn_DEF_RelativeNarrowbandTxPower_tags_1[] = {
215 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
217 static const asn_TYPE_tag2member_t asn_MAP_RelativeNarrowbandTxPower_tag2el_1[] = {
218 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rNTP-PerPRB */
219 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rNTP-Threshold */
220 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* numberOfCellSpecificAntennaPorts */
221 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* p-B */
222 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* pDCCH-InterferenceImpact */
223 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */
225 asn_SEQUENCE_specifics_t asn_SPC_RelativeNarrowbandTxPower_specs_1 = {
226 sizeof(struct RelativeNarrowbandTxPower),
227 offsetof(struct RelativeNarrowbandTxPower, _asn_ctx),
228 asn_MAP_RelativeNarrowbandTxPower_tag2el_1,
229 6, /* Count of tags in the map */
230 asn_MAP_RelativeNarrowbandTxPower_oms_1, /* Optional members */
231 1, 0, /* Root/Additions */
232 6, /* First extension addition */
234 asn_TYPE_descriptor_t asn_DEF_RelativeNarrowbandTxPower = {
235 "RelativeNarrowbandTxPower",
236 "RelativeNarrowbandTxPower",
238 asn_DEF_RelativeNarrowbandTxPower_tags_1,
239 sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1)
240 /sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1[0]), /* 1 */
241 asn_DEF_RelativeNarrowbandTxPower_tags_1, /* Same as above */
242 sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1)
243 /sizeof(asn_DEF_RelativeNarrowbandTxPower_tags_1[0]), /* 1 */
244 { 0, 0, SEQUENCE_constraint },
245 asn_MBR_RelativeNarrowbandTxPower_1,
246 6, /* Elements count */
247 &asn_SPC_RelativeNarrowbandTxPower_specs_1 /* Additional specs */