blob: 0d73720a437b99cc744ee1648aa98ba1f94cd0c8 [file] [log] [blame]
sjana76e88d22020-03-19 13:24:39 -04001/*
2 * Generated by asn1c-0.9.29 n1 (http://lionet.info/asn1c)
3 * From ASN.1 module "X2AP-IEs"
4 * found in "../../asn_defs/asn1/x2ap-15-04.asn"
5 * `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER`
6 */
7
8#include "X2N_FreqBandNrItem.h"
9
10#include "X2N_ProtocolExtensionContainer.h"
11#include "X2N_SupportedSULFreqBandItem.h"
12static int
13memb_X2N_freqBandIndicatorNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
14 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
15 long value;
16
17 if(!sptr) {
18 ASN__CTFAIL(app_key, td, sptr,
19 "%s: value not given (%s:%d)",
20 td->name, __FILE__, __LINE__);
21 return -1;
22 }
23
24 value = *(const long *)sptr;
25
26 if((value >= 1 && value <= 1024)) {
27 /* Constraint check succeeded */
28 return 0;
29 } else {
30 ASN__CTFAIL(app_key, td, sptr,
31 "%s: constraint failed (%s:%d)",
32 td->name, __FILE__, __LINE__);
33 return -1;
34 }
35}
36
37static int
38memb_X2N_supportedSULBandList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
39 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
40 size_t size;
41
42 if(!sptr) {
43 ASN__CTFAIL(app_key, td, sptr,
44 "%s: value not given (%s:%d)",
45 td->name, __FILE__, __LINE__);
46 return -1;
47 }
48
49 /* Determine the number of elements */
50 size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
51
52 if((size <= 32)) {
53 /* Perform validation of the inner elements */
54 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
55 } else {
56 ASN__CTFAIL(app_key, td, sptr,
57 "%s: constraint failed (%s:%d)",
58 td->name, __FILE__, __LINE__);
59 return -1;
60 }
61}
62
63static asn_per_constraints_t asn_PER_type_X2N_supportedSULBandList_constr_3 CC_NOTUSED = {
64 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
65 { APC_CONSTRAINED, 6, 6, 0, 32 } /* (SIZE(0..32)) */,
66 0, 0 /* No PER value map */
67};
68static asn_per_constraints_t asn_PER_memb_X2N_freqBandIndicatorNr_constr_2 CC_NOTUSED = {
69 { APC_CONSTRAINED | APC_EXTENSIBLE, 10, 10, 1, 1024 } /* (1..1024,...) */,
70 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
71 0, 0 /* No PER value map */
72};
73static asn_per_constraints_t asn_PER_memb_X2N_supportedSULBandList_constr_3 CC_NOTUSED = {
74 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
75 { APC_CONSTRAINED, 6, 6, 0, 32 } /* (SIZE(0..32)) */,
76 0, 0 /* No PER value map */
77};
78static asn_TYPE_member_t asn_MBR_X2N_supportedSULBandList_3[] = {
79 { ATF_POINTER, 0, 0,
80 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
81 0,
82 &asn_DEF_X2N_SupportedSULFreqBandItem,
83 0,
84 { 0, 0, 0 },
85 0, 0, /* No default value */
86 ""
87 },
88};
89static const ber_tlv_tag_t asn_DEF_X2N_supportedSULBandList_tags_3[] = {
90 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
91 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
92};
93static asn_SET_OF_specifics_t asn_SPC_X2N_supportedSULBandList_specs_3 = {
94 sizeof(struct X2N_FreqBandNrItem__supportedSULBandList),
95 offsetof(struct X2N_FreqBandNrItem__supportedSULBandList, _asn_ctx),
96 0, /* XER encoding is XMLDelimitedItemList */
97};
98static /* Use -fall-defs-global to expose */
99asn_TYPE_descriptor_t asn_DEF_X2N_supportedSULBandList_3 = {
100 "supportedSULBandList",
101 "supportedSULBandList",
102 &asn_OP_SEQUENCE_OF,
103 asn_DEF_X2N_supportedSULBandList_tags_3,
104 sizeof(asn_DEF_X2N_supportedSULBandList_tags_3)
105 /sizeof(asn_DEF_X2N_supportedSULBandList_tags_3[0]) - 1, /* 1 */
106 asn_DEF_X2N_supportedSULBandList_tags_3, /* Same as above */
107 sizeof(asn_DEF_X2N_supportedSULBandList_tags_3)
108 /sizeof(asn_DEF_X2N_supportedSULBandList_tags_3[0]), /* 2 */
109 { 0, &asn_PER_type_X2N_supportedSULBandList_constr_3, SEQUENCE_OF_constraint },
110 asn_MBR_X2N_supportedSULBandList_3,
111 1, /* Single element */
112 &asn_SPC_X2N_supportedSULBandList_specs_3 /* Additional specs */
113};
114
115asn_TYPE_member_t asn_MBR_X2N_FreqBandNrItem_1[] = {
116 { ATF_NOFLAGS, 0, offsetof(struct X2N_FreqBandNrItem, freqBandIndicatorNr),
117 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
118 -1, /* IMPLICIT tag at current level */
119 &asn_DEF_NativeInteger,
120 0,
121 { 0, &asn_PER_memb_X2N_freqBandIndicatorNr_constr_2, memb_X2N_freqBandIndicatorNr_constraint_1 },
122 0, 0, /* No default value */
123 "freqBandIndicatorNr"
124 },
125 { ATF_NOFLAGS, 0, offsetof(struct X2N_FreqBandNrItem, supportedSULBandList),
126 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
127 0,
128 &asn_DEF_X2N_supportedSULBandList_3,
129 0,
130 { 0, &asn_PER_memb_X2N_supportedSULBandList_constr_3, memb_X2N_supportedSULBandList_constraint_1 },
131 0, 0, /* No default value */
132 "supportedSULBandList"
133 },
134 { ATF_POINTER, 1, offsetof(struct X2N_FreqBandNrItem, iE_Extensions),
135 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
136 -1, /* IMPLICIT tag at current level */
137 &asn_DEF_X2N_ProtocolExtensionContainer_8231P148,
138 0,
139 { 0, 0, 0 },
140 0, 0, /* No default value */
141 "iE-Extensions"
142 },
143};
144static const int asn_MAP_X2N_FreqBandNrItem_oms_1[] = { 2 };
145static const ber_tlv_tag_t asn_DEF_X2N_FreqBandNrItem_tags_1[] = {
146 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
147};
148static const asn_TYPE_tag2member_t asn_MAP_X2N_FreqBandNrItem_tag2el_1[] = {
149 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* freqBandIndicatorNr */
150 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* supportedSULBandList */
151 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
152};
153asn_SEQUENCE_specifics_t asn_SPC_X2N_FreqBandNrItem_specs_1 = {
154 sizeof(struct X2N_FreqBandNrItem),
155 offsetof(struct X2N_FreqBandNrItem, _asn_ctx),
156 asn_MAP_X2N_FreqBandNrItem_tag2el_1,
157 3, /* Count of tags in the map */
158 asn_MAP_X2N_FreqBandNrItem_oms_1, /* Optional members */
159 1, 0, /* Root/Additions */
160 3, /* First extension addition */
161};
162asn_TYPE_descriptor_t asn_DEF_X2N_FreqBandNrItem = {
163 "FreqBandNrItem",
164 "FreqBandNrItem",
165 &asn_OP_SEQUENCE,
166 asn_DEF_X2N_FreqBandNrItem_tags_1,
167 sizeof(asn_DEF_X2N_FreqBandNrItem_tags_1)
168 /sizeof(asn_DEF_X2N_FreqBandNrItem_tags_1[0]), /* 1 */
169 asn_DEF_X2N_FreqBandNrItem_tags_1, /* Same as above */
170 sizeof(asn_DEF_X2N_FreqBandNrItem_tags_1)
171 /sizeof(asn_DEF_X2N_FreqBandNrItem_tags_1[0]), /* 1 */
172 { 0, 0, SEQUENCE_constraint },
173 asn_MBR_X2N_FreqBandNrItem_1,
174 3, /* Elements count */
175 &asn_SPC_X2N_FreqBandNrItem_specs_1 /* Additional specs */
176};
177