blob: 4a456f2f89344d901d31fefce4adfec6fd477e5a [file] [log] [blame]
Juha Hyttinenff8dccd2019-12-10 14:34:07 +02001/*
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`
6 */
7
8#include "NRFreqInfo.h"
9
10#include "SULInformation.h"
11#include "ProtocolExtensionContainer.h"
12#include "FreqBandNrItem.h"
13static int
14memb_nRARFCN_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
15 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
16 long value;
17
18 if(!sptr) {
19 ASN__CTFAIL(app_key, td, sptr,
20 "%s: value not given (%s:%d)",
21 td->name, __FILE__, __LINE__);
22 return -1;
23 }
24
25 value = *(const long *)sptr;
26
27 if((value >= 0 && value <= 3279165)) {
28 /* Constraint check succeeded */
29 return 0;
30 } else {
31 ASN__CTFAIL(app_key, td, sptr,
32 "%s: constraint failed (%s:%d)",
33 td->name, __FILE__, __LINE__);
34 return -1;
35 }
36}
37
38static int
39memb_freqBandListNr_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
40 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
41 size_t size;
42
43 if(!sptr) {
44 ASN__CTFAIL(app_key, td, sptr,
45 "%s: value not given (%s:%d)",
46 td->name, __FILE__, __LINE__);
47 return -1;
48 }
49
50 /* Determine the number of elements */
51 size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
52
53 if((size >= 1 && size <= 32)) {
54 /* Perform validation of the inner elements */
55 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
56 } else {
57 ASN__CTFAIL(app_key, td, sptr,
58 "%s: constraint failed (%s:%d)",
59 td->name, __FILE__, __LINE__);
60 return -1;
61 }
62}
63
64static asn_per_constraints_t asn_PER_type_freqBandListNr_constr_3 CC_NOTUSED = {
65 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
66 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
67 0, 0 /* No PER value map */
68};
69static asn_per_constraints_t asn_PER_memb_nRARFCN_constr_2 CC_NOTUSED = {
70 { APC_CONSTRAINED, 22, -1, 0, 3279165 } /* (0..3279165) */,
71 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
72 0, 0 /* No PER value map */
73};
74static asn_per_constraints_t asn_PER_memb_freqBandListNr_constr_3 CC_NOTUSED = {
75 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
76 { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */,
77 0, 0 /* No PER value map */
78};
79static asn_TYPE_member_t asn_MBR_freqBandListNr_3[] = {
80 { ATF_POINTER, 0, 0,
81 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
82 0,
83 &asn_DEF_FreqBandNrItem,
84 0,
85 { 0, 0, 0 },
86 0, 0, /* No default value */
87 ""
88 },
89};
90static const ber_tlv_tag_t asn_DEF_freqBandListNr_tags_3[] = {
91 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
92 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
93};
94static asn_SET_OF_specifics_t asn_SPC_freqBandListNr_specs_3 = {
95 sizeof(struct NRFreqInfo__freqBandListNr),
96 offsetof(struct NRFreqInfo__freqBandListNr, _asn_ctx),
97 0, /* XER encoding is XMLDelimitedItemList */
98};
99static /* Use -fall-defs-global to expose */
100asn_TYPE_descriptor_t asn_DEF_freqBandListNr_3 = {
101 "freqBandListNr",
102 "freqBandListNr",
103 &asn_OP_SEQUENCE_OF,
104 asn_DEF_freqBandListNr_tags_3,
105 sizeof(asn_DEF_freqBandListNr_tags_3)
106 /sizeof(asn_DEF_freqBandListNr_tags_3[0]) - 1, /* 1 */
107 asn_DEF_freqBandListNr_tags_3, /* Same as above */
108 sizeof(asn_DEF_freqBandListNr_tags_3)
109 /sizeof(asn_DEF_freqBandListNr_tags_3[0]), /* 2 */
110 { 0, &asn_PER_type_freqBandListNr_constr_3, SEQUENCE_OF_constraint },
111 asn_MBR_freqBandListNr_3,
112 1, /* Single element */
113 &asn_SPC_freqBandListNr_specs_3 /* Additional specs */
114};
115
116asn_TYPE_member_t asn_MBR_NRFreqInfo_1[] = {
117 { ATF_NOFLAGS, 0, offsetof(struct NRFreqInfo, nRARFCN),
118 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
119 -1, /* IMPLICIT tag at current level */
120 &asn_DEF_NativeInteger,
121 0,
122 { 0, &asn_PER_memb_nRARFCN_constr_2, memb_nRARFCN_constraint_1 },
123 0, 0, /* No default value */
124 "nRARFCN"
125 },
126 { ATF_NOFLAGS, 0, offsetof(struct NRFreqInfo, freqBandListNr),
127 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
128 0,
129 &asn_DEF_freqBandListNr_3,
130 0,
131 { 0, &asn_PER_memb_freqBandListNr_constr_3, memb_freqBandListNr_constraint_1 },
132 0, 0, /* No default value */
133 "freqBandListNr"
134 },
135 { ATF_POINTER, 2, offsetof(struct NRFreqInfo, sULInformation),
136 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
137 -1, /* IMPLICIT tag at current level */
138 &asn_DEF_SULInformation,
139 0,
140 { 0, 0, 0 },
141 0, 0, /* No default value */
142 "sULInformation"
143 },
144 { ATF_POINTER, 1, offsetof(struct NRFreqInfo, iE_Extensions),
145 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
146 -1, /* IMPLICIT tag at current level */
147 &asn_DEF_ProtocolExtensionContainer_8858P52,
148 0,
149 { 0, 0, 0 },
150 0, 0, /* No default value */
151 "iE-Extensions"
152 },
153};
154static const int asn_MAP_NRFreqInfo_oms_1[] = { 2, 3 };
155static const ber_tlv_tag_t asn_DEF_NRFreqInfo_tags_1[] = {
156 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
157};
158static const asn_TYPE_tag2member_t asn_MAP_NRFreqInfo_tag2el_1[] = {
159 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRARFCN */
160 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* freqBandListNr */
161 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sULInformation */
162 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */
163};
164asn_SEQUENCE_specifics_t asn_SPC_NRFreqInfo_specs_1 = {
165 sizeof(struct NRFreqInfo),
166 offsetof(struct NRFreqInfo, _asn_ctx),
167 asn_MAP_NRFreqInfo_tag2el_1,
168 4, /* Count of tags in the map */
169 asn_MAP_NRFreqInfo_oms_1, /* Optional members */
170 2, 0, /* Root/Additions */
171 4, /* First extension addition */
172};
173asn_TYPE_descriptor_t asn_DEF_NRFreqInfo = {
174 "NRFreqInfo",
175 "NRFreqInfo",
176 &asn_OP_SEQUENCE,
177 asn_DEF_NRFreqInfo_tags_1,
178 sizeof(asn_DEF_NRFreqInfo_tags_1)
179 /sizeof(asn_DEF_NRFreqInfo_tags_1[0]), /* 1 */
180 asn_DEF_NRFreqInfo_tags_1, /* Same as above */
181 sizeof(asn_DEF_NRFreqInfo_tags_1)
182 /sizeof(asn_DEF_NRFreqInfo_tags_1[0]), /* 1 */
183 { 0, 0, SEQUENCE_constraint },
184 asn_MBR_NRFreqInfo_1,
185 4, /* Elements count */
186 &asn_SPC_NRFreqInfo_specs_1 /* Additional specs */
187};
188