[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / PLMN-IdentityInfo.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 "PLMN-IdentityInfo.h"
9
10 #include "PLMN-IdentitY.h"
11 /*
12  * This type is implemented using NativeEnumerated,
13  * so here we adjust the DEF accordingly.
14  */
15 static int
16 memb_plmn_IdentityList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
17                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
18         size_t size;
19         
20         if(!sptr) {
21                 ASN__CTFAIL(app_key, td, sptr,
22                         "%s: value not given (%s:%d)",
23                         td->name, __FILE__, __LINE__);
24                 return -1;
25         }
26         
27         /* Determine the number of elements */
28         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
29         
30         if((size >= 1 && size <= 12)) {
31                 /* Perform validation of the inner elements */
32                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
33         } else {
34                 ASN__CTFAIL(app_key, td, sptr,
35                         "%s: constraint failed (%s:%d)",
36                         td->name, __FILE__, __LINE__);
37                 return -1;
38         }
39 }
40
41 static asn_oer_constraints_t asn_OER_type_plmn_IdentityList_constr_2 CC_NOTUSED = {
42         { 0, 0 },
43         -1      /* (SIZE(1..12)) */};
44 static asn_per_constraints_t asn_PER_type_plmn_IdentityList_constr_2 CC_NOTUSED = {
45         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
46         { APC_CONSTRAINED,       4,  4,  1,  12 }       /* (SIZE(1..12)) */,
47         0, 0    /* No PER value map */
48 };
49 static asn_oer_constraints_t asn_OER_type_cellReservedForOperatorUse_constr_7 CC_NOTUSED = {
50         { 0, 0 },
51         -1};
52 static asn_per_constraints_t asn_PER_type_cellReservedForOperatorUse_constr_7 CC_NOTUSED = {
53         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
54         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
55         0, 0    /* No PER value map */
56 };
57 static asn_oer_constraints_t asn_OER_memb_plmn_IdentityList_constr_2 CC_NOTUSED = {
58         { 0, 0 },
59         -1      /* (SIZE(1..12)) */};
60 static asn_per_constraints_t asn_PER_memb_plmn_IdentityList_constr_2 CC_NOTUSED = {
61         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
62         { APC_CONSTRAINED,       4,  4,  1,  12 }       /* (SIZE(1..12)) */,
63         0, 0    /* No PER value map */
64 };
65 static asn_TYPE_member_t asn_MBR_plmn_IdentityList_2[] = {
66         { ATF_POINTER, 0, 0,
67                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
68                 0,
69                 &asn_DEF_PLMN_IdentitY,
70                 0,
71                 { 0, 0, 0 },
72                 0, 0, /* No default value */
73                 ""
74                 },
75 };
76 static const ber_tlv_tag_t asn_DEF_plmn_IdentityList_tags_2[] = {
77         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
78         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
79 };
80 static asn_SET_OF_specifics_t asn_SPC_plmn_IdentityList_specs_2 = {
81         sizeof(struct PLMN_IdentityInfo__plmn_IdentityList),
82         offsetof(struct PLMN_IdentityInfo__plmn_IdentityList, _asn_ctx),
83         0,      /* XER encoding is XMLDelimitedItemList */
84 };
85 static /* Use -fall-defs-global to expose */
86 asn_TYPE_descriptor_t asn_DEF_plmn_IdentityList_2 = {
87         "plmn-IdentityList",
88         "plmn-IdentityList",
89         &asn_OP_SEQUENCE_OF,
90         asn_DEF_plmn_IdentityList_tags_2,
91         sizeof(asn_DEF_plmn_IdentityList_tags_2)
92                 /sizeof(asn_DEF_plmn_IdentityList_tags_2[0]) - 1, /* 1 */
93         asn_DEF_plmn_IdentityList_tags_2,       /* Same as above */
94         sizeof(asn_DEF_plmn_IdentityList_tags_2)
95                 /sizeof(asn_DEF_plmn_IdentityList_tags_2[0]), /* 2 */
96         { &asn_OER_type_plmn_IdentityList_constr_2, &asn_PER_type_plmn_IdentityList_constr_2, SEQUENCE_OF_constraint },
97         asn_MBR_plmn_IdentityList_2,
98         1,      /* Single element */
99         &asn_SPC_plmn_IdentityList_specs_2      /* Additional specs */
100 };
101
102 static const asn_INTEGER_enum_map_t asn_MAP_cellReservedForOperatorUse_value2enum_7[] = {
103         { 0,    8,      "reserved" },
104         { 1,    11,     "notReserved" }
105 };
106 static const unsigned int asn_MAP_cellReservedForOperatorUse_enum2value_7[] = {
107         1,      /* notReserved(1) */
108         0       /* reserved(0) */
109 };
110 static const asn_INTEGER_specifics_t asn_SPC_cellReservedForOperatorUse_specs_7 = {
111         asn_MAP_cellReservedForOperatorUse_value2enum_7,        /* "tag" => N; sorted by tag */
112         asn_MAP_cellReservedForOperatorUse_enum2value_7,        /* N => "tag"; sorted by N */
113         2,      /* Number of elements in the maps */
114         0,      /* Enumeration is not extensible */
115         1,      /* Strict enumeration */
116         0,      /* Native long size */
117         0
118 };
119 static const ber_tlv_tag_t asn_DEF_cellReservedForOperatorUse_tags_7[] = {
120         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
121         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
122 };
123 static /* Use -fall-defs-global to expose */
124 asn_TYPE_descriptor_t asn_DEF_cellReservedForOperatorUse_7 = {
125         "cellReservedForOperatorUse",
126         "cellReservedForOperatorUse",
127         &asn_OP_NativeEnumerated,
128         asn_DEF_cellReservedForOperatorUse_tags_7,
129         sizeof(asn_DEF_cellReservedForOperatorUse_tags_7)
130                 /sizeof(asn_DEF_cellReservedForOperatorUse_tags_7[0]) - 1, /* 1 */
131         asn_DEF_cellReservedForOperatorUse_tags_7,      /* Same as above */
132         sizeof(asn_DEF_cellReservedForOperatorUse_tags_7)
133                 /sizeof(asn_DEF_cellReservedForOperatorUse_tags_7[0]), /* 2 */
134         { &asn_OER_type_cellReservedForOperatorUse_constr_7, &asn_PER_type_cellReservedForOperatorUse_constr_7, NativeEnumerated_constraint },
135         0, 0,   /* Defined elsewhere */
136         &asn_SPC_cellReservedForOperatorUse_specs_7     /* Additional specs */
137 };
138
139 asn_TYPE_member_t asn_MBR_PLMN_IdentityInfo_1[] = {
140         { ATF_NOFLAGS, 0, offsetof(struct PLMN_IdentityInfo, plmn_IdentityList),
141                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
142                 0,
143                 &asn_DEF_plmn_IdentityList_2,
144                 0,
145                 { &asn_OER_memb_plmn_IdentityList_constr_2, &asn_PER_memb_plmn_IdentityList_constr_2,  memb_plmn_IdentityList_constraint_1 },
146                 0, 0, /* No default value */
147                 "plmn-IdentityList"
148                 },
149         { ATF_POINTER, 2, offsetof(struct PLMN_IdentityInfo, trackingAreaCode),
150                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
151                 -1,     /* IMPLICIT tag at current level */
152                 &asn_DEF_TrackingAreaCode,
153                 0,
154                 { 0, 0, 0 },
155                 0, 0, /* No default value */
156                 "trackingAreaCode"
157                 },
158         { ATF_POINTER, 1, offsetof(struct PLMN_IdentityInfo, ranac),
159                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
160                 -1,     /* IMPLICIT tag at current level */
161                 &asn_DEF_RAN_AreaCode,
162                 0,
163                 { 0, 0, 0 },
164                 0, 0, /* No default value */
165                 "ranac"
166                 },
167         { ATF_NOFLAGS, 0, offsetof(struct PLMN_IdentityInfo, cellIdentity),
168                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
169                 -1,     /* IMPLICIT tag at current level */
170                 &asn_DEF_CellIdentity,
171                 0,
172                 { 0, 0, 0 },
173                 0, 0, /* No default value */
174                 "cellIdentity"
175                 },
176         { ATF_NOFLAGS, 0, offsetof(struct PLMN_IdentityInfo, cellReservedForOperatorUse),
177                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
178                 -1,     /* IMPLICIT tag at current level */
179                 &asn_DEF_cellReservedForOperatorUse_7,
180                 0,
181                 { 0, 0, 0 },
182                 0, 0, /* No default value */
183                 "cellReservedForOperatorUse"
184                 },
185 };
186 static const int asn_MAP_PLMN_IdentityInfo_oms_1[] = { 1, 2 };
187 static const ber_tlv_tag_t asn_DEF_PLMN_IdentityInfo_tags_1[] = {
188         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
189 };
190 static const asn_TYPE_tag2member_t asn_MAP_PLMN_IdentityInfo_tag2el_1[] = {
191     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plmn-IdentityList */
192     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* trackingAreaCode */
193     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ranac */
194     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* cellIdentity */
195     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* cellReservedForOperatorUse */
196 };
197 asn_SEQUENCE_specifics_t asn_SPC_PLMN_IdentityInfo_specs_1 = {
198         sizeof(struct PLMN_IdentityInfo),
199         offsetof(struct PLMN_IdentityInfo, _asn_ctx),
200         asn_MAP_PLMN_IdentityInfo_tag2el_1,
201         5,      /* Count of tags in the map */
202         asn_MAP_PLMN_IdentityInfo_oms_1,        /* Optional members */
203         2, 0,   /* Root/Additions */
204         5,      /* First extension addition */
205 };
206 asn_TYPE_descriptor_t asn_DEF_PLMN_IdentityInfo = {
207         "PLMN-IdentityInfo",
208         "PLMN-IdentityInfo",
209         &asn_OP_SEQUENCE,
210         asn_DEF_PLMN_IdentityInfo_tags_1,
211         sizeof(asn_DEF_PLMN_IdentityInfo_tags_1)
212                 /sizeof(asn_DEF_PLMN_IdentityInfo_tags_1[0]), /* 1 */
213         asn_DEF_PLMN_IdentityInfo_tags_1,       /* Same as above */
214         sizeof(asn_DEF_PLMN_IdentityInfo_tags_1)
215                 /sizeof(asn_DEF_PLMN_IdentityInfo_tags_1[0]), /* 1 */
216         { 0, 0, SEQUENCE_constraint },
217         asn_MBR_PLMN_IdentityInfo_1,
218         5,      /* Elements count */
219         &asn_SPC_PLMN_IdentityInfo_specs_1      /* Additional specs */
220 };
221