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.
21 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
22 * From ASN.1 module "X2AP-IEs"
23 * found in "../../asnFiles/X2AP-IEs.asn"
24 * `asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
27 #include "NRFreqInfo.h"
29 #include "SULInformation.h"
30 #include "ProtocolExtensionContainer.h"
31 #include "FreqBandNrItem.h"
33 memb_nRARFCN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
34 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38 ASN__CTFAIL(app_key, td, sptr,
39 "%s: value not given (%s:%d)",
40 td->name, __FILE__, __LINE__);
44 value = *(const long *)sptr;
46 if((value >= 0 && value <= 3279165)) {
47 /* Constraint check succeeded */
50 ASN__CTFAIL(app_key, td, sptr,
51 "%s: constraint failed (%s:%d)",
52 td->name, __FILE__, __LINE__);
58 memb_freqBandListNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
59 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
63 ASN__CTFAIL(app_key, td, sptr,
64 "%s: value not given (%s:%d)",
65 td->name, __FILE__, __LINE__);
69 /* Determine the number of elements */
70 size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
72 if((size >= 1 && size <= 32)) {
73 /* Perform validation of the inner elements */
74 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
76 ASN__CTFAIL(app_key, td, sptr,
77 "%s: constraint failed (%s:%d)",
78 td->name, __FILE__, __LINE__);
83 static asn_per_constraints_t asn_PER_type_freqBandListNr_constr_3 CC_NOTUSED = {
84 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
85 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
86 0, 0 /* No PER value map */
88 static asn_per_constraints_t asn_PER_memb_nRARFCN_constr_2 CC_NOTUSED = {
89 { APC_CONSTRAINED, 22, -1, 0, 3279165 } /* (0..3279165) */,
90 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
91 0, 0 /* No PER value map */
93 static asn_per_constraints_t asn_PER_memb_freqBandListNr_constr_3 CC_NOTUSED = {
94 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
95 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
96 0, 0 /* No PER value map */
98 static asn_TYPE_member_t asn_MBR_freqBandListNr_3[] = {
100 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
102 &asn_DEF_FreqBandNrItem,
105 0, 0, /* No default value */
109 static const ber_tlv_tag_t asn_DEF_freqBandListNr_tags_3[] = {
110 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
111 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
113 static asn_SET_OF_specifics_t asn_SPC_freqBandListNr_specs_3 = {
114 sizeof(struct NRFreqInfo__freqBandListNr),
115 offsetof(struct NRFreqInfo__freqBandListNr, _asn_ctx),
116 0, /* XER encoding is XMLDelimitedItemList */
118 static /* Use -fall-defs-global to expose */
119 asn_TYPE_descriptor_t asn_DEF_freqBandListNr_3 = {
123 asn_DEF_freqBandListNr_tags_3,
124 sizeof(asn_DEF_freqBandListNr_tags_3)
125 /sizeof(asn_DEF_freqBandListNr_tags_3[0]) - 1, /* 1 */
126 asn_DEF_freqBandListNr_tags_3, /* Same as above */
127 sizeof(asn_DEF_freqBandListNr_tags_3)
128 /sizeof(asn_DEF_freqBandListNr_tags_3[0]), /* 2 */
129 { 0, &asn_PER_type_freqBandListNr_constr_3, SEQUENCE_OF_constraint },
130 asn_MBR_freqBandListNr_3,
131 1, /* Single element */
132 &asn_SPC_freqBandListNr_specs_3 /* Additional specs */
135 asn_TYPE_member_t asn_MBR_NRFreqInfo_1[] = {
136 { ATF_NOFLAGS, 0, offsetof(struct NRFreqInfo, nRARFCN),
137 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
138 -1, /* IMPLICIT tag at current level */
139 &asn_DEF_NativeInteger,
141 { 0, &asn_PER_memb_nRARFCN_constr_2, memb_nRARFCN_constraint_1 },
142 0, 0, /* No default value */
145 { ATF_NOFLAGS, 0, offsetof(struct NRFreqInfo, freqBandListNr),
146 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
148 &asn_DEF_freqBandListNr_3,
150 { 0, &asn_PER_memb_freqBandListNr_constr_3, memb_freqBandListNr_constraint_1 },
151 0, 0, /* No default value */
154 { ATF_POINTER, 2, offsetof(struct NRFreqInfo, sULInformation),
155 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
156 -1, /* IMPLICIT tag at current level */
157 &asn_DEF_SULInformation,
160 0, 0, /* No default value */
163 { ATF_POINTER, 1, offsetof(struct NRFreqInfo, iE_Extensions),
164 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
165 -1, /* IMPLICIT tag at current level */
166 &asn_DEF_ProtocolExtensionContainer_170P173,
169 0, 0, /* No default value */
173 static const int asn_MAP_NRFreqInfo_oms_1[] = { 2, 3 };
174 static const ber_tlv_tag_t asn_DEF_NRFreqInfo_tags_1[] = {
175 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
177 static const asn_TYPE_tag2member_t asn_MAP_NRFreqInfo_tag2el_1[] = {
178 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRARFCN */
179 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* freqBandListNr */
180 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sULInformation */
181 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
183 asn_SEQUENCE_specifics_t asn_SPC_NRFreqInfo_specs_1 = {
184 sizeof(struct NRFreqInfo),
185 offsetof(struct NRFreqInfo, _asn_ctx),
186 asn_MAP_NRFreqInfo_tag2el_1,
187 4, /* Count of tags in the map */
188 asn_MAP_NRFreqInfo_oms_1, /* Optional members */
189 2, 0, /* Root/Additions */
190 4, /* First extension addition */
192 asn_TYPE_descriptor_t asn_DEF_NRFreqInfo = {
196 asn_DEF_NRFreqInfo_tags_1,
197 sizeof(asn_DEF_NRFreqInfo_tags_1)
198 /sizeof(asn_DEF_NRFreqInfo_tags_1[0]), /* 1 */
199 asn_DEF_NRFreqInfo_tags_1, /* Same as above */
200 sizeof(asn_DEF_NRFreqInfo_tags_1)
201 /sizeof(asn_DEF_NRFreqInfo_tags_1[0]), /* 1 */
202 { 0, 0, SEQUENCE_constraint },
203 asn_MBR_NRFreqInfo_1,
204 4, /* Elements count */
205 &asn_SPC_NRFreqInfo_specs_1 /* Additional specs */