[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / SIB-TypeInfo.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "../../../rrc_15.3_asn.asn1"
5  *      `asn1c -D ./25_02_2022_RRC/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "SIB-TypeInfo.h"
9
10 /*
11  * This type is implemented using NativeEnumerated,
12  * so here we adjust the DEF accordingly.
13  */
14 /*
15  * This type is implemented using NativeEnumerated,
16  * so here we adjust the DEF accordingly.
17  */
18 static int
19 memb_valueTag_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
20                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
21         long value;
22         
23         if(!sptr) {
24                 ASN__CTFAIL(app_key, td, sptr,
25                         "%s: value not given (%s:%d)",
26                         td->name, __FILE__, __LINE__);
27                 return -1;
28         }
29         
30         value = *(const long *)sptr;
31         
32         if((value >= 0 && value <= 31)) {
33                 /* Constraint check succeeded */
34                 return 0;
35         } else {
36                 ASN__CTFAIL(app_key, td, sptr,
37                         "%s: constraint failed (%s:%d)",
38                         td->name, __FILE__, __LINE__);
39                 return -1;
40         }
41 }
42
43 static asn_oer_constraints_t asn_OER_type_type_constr_2 CC_NOTUSED = {
44         { 0, 0 },
45         -1};
46 static asn_per_constraints_t asn_PER_type_type_constr_2 CC_NOTUSED = {
47         { APC_CONSTRAINED | APC_EXTENSIBLE,  4,  4,  0,  15 }   /* (0..15,...) */,
48         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
49         0, 0    /* No PER value map */
50 };
51 static asn_oer_constraints_t asn_OER_type_areaScope_constr_21 CC_NOTUSED = {
52         { 0, 0 },
53         -1};
54 static asn_per_constraints_t asn_PER_type_areaScope_constr_21 CC_NOTUSED = {
55         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
56         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
57         0, 0    /* No PER value map */
58 };
59 static asn_oer_constraints_t asn_OER_memb_valueTag_constr_20 CC_NOTUSED = {
60         { 1, 1 }        /* (0..31) */,
61         -1};
62 static asn_per_constraints_t asn_PER_memb_valueTag_constr_20 CC_NOTUSED = {
63         { APC_CONSTRAINED,       5,  5,  0,  31 }       /* (0..31) */,
64         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
65         0, 0    /* No PER value map */
66 };
67 static const asn_INTEGER_enum_map_t asn_MAP_type_value2enum_2[] = {
68         { 0,    8,      "sibType2" },
69         { 1,    8,      "sibType3" },
70         { 2,    8,      "sibType4" },
71         { 3,    8,      "sibType5" },
72         { 4,    8,      "sibType6" },
73         { 5,    8,      "sibType7" },
74         { 6,    8,      "sibType8" },
75         { 7,    8,      "sibType9" },
76         { 8,    6,      "spare8" },
77         { 9,    6,      "spare7" },
78         { 10,   6,      "spare6" },
79         { 11,   6,      "spare5" },
80         { 12,   6,      "spare4" },
81         { 13,   6,      "spare3" },
82         { 14,   6,      "spare2" },
83         { 15,   6,      "spare1" }
84         /* This list is extensible */
85 };
86 static const unsigned int asn_MAP_type_enum2value_2[] = {
87         0,      /* sibType2(0) */
88         1,      /* sibType3(1) */
89         2,      /* sibType4(2) */
90         3,      /* sibType5(3) */
91         4,      /* sibType6(4) */
92         5,      /* sibType7(5) */
93         6,      /* sibType8(6) */
94         7,      /* sibType9(7) */
95         15,     /* spare1(15) */
96         14,     /* spare2(14) */
97         13,     /* spare3(13) */
98         12,     /* spare4(12) */
99         11,     /* spare5(11) */
100         10,     /* spare6(10) */
101         9,      /* spare7(9) */
102         8       /* spare8(8) */
103         /* This list is extensible */
104 };
105 static const asn_INTEGER_specifics_t asn_SPC_type_specs_2 = {
106         asn_MAP_type_value2enum_2,      /* "tag" => N; sorted by tag */
107         asn_MAP_type_enum2value_2,      /* N => "tag"; sorted by N */
108         16,     /* Number of elements in the maps */
109         17,     /* Extensions before this member */
110         1,      /* Strict enumeration */
111         0,      /* Native long size */
112         0
113 };
114 static const ber_tlv_tag_t asn_DEF_type_tags_2[] = {
115         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
116         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
117 };
118 static /* Use -fall-defs-global to expose */
119 asn_TYPE_descriptor_t asn_DEF_type_2 = {
120         "type",
121         "type",
122         &asn_OP_NativeEnumerated,
123         asn_DEF_type_tags_2,
124         sizeof(asn_DEF_type_tags_2)
125                 /sizeof(asn_DEF_type_tags_2[0]) - 1, /* 1 */
126         asn_DEF_type_tags_2,    /* Same as above */
127         sizeof(asn_DEF_type_tags_2)
128                 /sizeof(asn_DEF_type_tags_2[0]), /* 2 */
129         { &asn_OER_type_type_constr_2, &asn_PER_type_type_constr_2, NativeEnumerated_constraint },
130         0, 0,   /* Defined elsewhere */
131         &asn_SPC_type_specs_2   /* Additional specs */
132 };
133
134 static const asn_INTEGER_enum_map_t asn_MAP_areaScope_value2enum_21[] = {
135         { 0,    4,      "true" }
136 };
137 static const unsigned int asn_MAP_areaScope_enum2value_21[] = {
138         0       /* true(0) */
139 };
140 static const asn_INTEGER_specifics_t asn_SPC_areaScope_specs_21 = {
141         asn_MAP_areaScope_value2enum_21,        /* "tag" => N; sorted by tag */
142         asn_MAP_areaScope_enum2value_21,        /* N => "tag"; sorted by N */
143         1,      /* Number of elements in the maps */
144         0,      /* Enumeration is not extensible */
145         1,      /* Strict enumeration */
146         0,      /* Native long size */
147         0
148 };
149 static const ber_tlv_tag_t asn_DEF_areaScope_tags_21[] = {
150         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
151         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
152 };
153 static /* Use -fall-defs-global to expose */
154 asn_TYPE_descriptor_t asn_DEF_areaScope_21 = {
155         "areaScope",
156         "areaScope",
157         &asn_OP_NativeEnumerated,
158         asn_DEF_areaScope_tags_21,
159         sizeof(asn_DEF_areaScope_tags_21)
160                 /sizeof(asn_DEF_areaScope_tags_21[0]) - 1, /* 1 */
161         asn_DEF_areaScope_tags_21,      /* Same as above */
162         sizeof(asn_DEF_areaScope_tags_21)
163                 /sizeof(asn_DEF_areaScope_tags_21[0]), /* 2 */
164         { &asn_OER_type_areaScope_constr_21, &asn_PER_type_areaScope_constr_21, NativeEnumerated_constraint },
165         0, 0,   /* Defined elsewhere */
166         &asn_SPC_areaScope_specs_21     /* Additional specs */
167 };
168
169 asn_TYPE_member_t asn_MBR_SIB_TypeInfo_1[] = {
170         { ATF_NOFLAGS, 0, offsetof(struct SIB_TypeInfo, type),
171                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
172                 -1,     /* IMPLICIT tag at current level */
173                 &asn_DEF_type_2,
174                 0,
175                 { 0, 0, 0 },
176                 0, 0, /* No default value */
177                 "type"
178                 },
179         { ATF_POINTER, 2, offsetof(struct SIB_TypeInfo, valueTag),
180                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
181                 -1,     /* IMPLICIT tag at current level */
182                 &asn_DEF_NativeInteger,
183                 0,
184                 { &asn_OER_memb_valueTag_constr_20, &asn_PER_memb_valueTag_constr_20,  memb_valueTag_constraint_1 },
185                 0, 0, /* No default value */
186                 "valueTag"
187                 },
188         { ATF_POINTER, 1, offsetof(struct SIB_TypeInfo, areaScope),
189                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
190                 -1,     /* IMPLICIT tag at current level */
191                 &asn_DEF_areaScope_21,
192                 0,
193                 { 0, 0, 0 },
194                 0, 0, /* No default value */
195                 "areaScope"
196                 },
197 };
198 static const int asn_MAP_SIB_TypeInfo_oms_1[] = { 1, 2 };
199 static const ber_tlv_tag_t asn_DEF_SIB_TypeInfo_tags_1[] = {
200         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
201 };
202 static const asn_TYPE_tag2member_t asn_MAP_SIB_TypeInfo_tag2el_1[] = {
203     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type */
204     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* valueTag */
205     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* areaScope */
206 };
207 asn_SEQUENCE_specifics_t asn_SPC_SIB_TypeInfo_specs_1 = {
208         sizeof(struct SIB_TypeInfo),
209         offsetof(struct SIB_TypeInfo, _asn_ctx),
210         asn_MAP_SIB_TypeInfo_tag2el_1,
211         3,      /* Count of tags in the map */
212         asn_MAP_SIB_TypeInfo_oms_1,     /* Optional members */
213         2, 0,   /* Root/Additions */
214         -1,     /* First extension addition */
215 };
216 asn_TYPE_descriptor_t asn_DEF_SIB_TypeInfo = {
217         "SIB-TypeInfo",
218         "SIB-TypeInfo",
219         &asn_OP_SEQUENCE,
220         asn_DEF_SIB_TypeInfo_tags_1,
221         sizeof(asn_DEF_SIB_TypeInfo_tags_1)
222                 /sizeof(asn_DEF_SIB_TypeInfo_tags_1[0]), /* 1 */
223         asn_DEF_SIB_TypeInfo_tags_1,    /* Same as above */
224         sizeof(asn_DEF_SIB_TypeInfo_tags_1)
225                 /sizeof(asn_DEF_SIB_TypeInfo_tags_1[0]), /* 1 */
226         { 0, 0, SEQUENCE_constraint },
227         asn_MBR_SIB_TypeInfo_1,
228         3,      /* Elements count */
229         &asn_SPC_SIB_TypeInfo_specs_1   /* Additional specs */
230 };
231