Merge "Cleanup of message sib1"
[o-du/l2.git] / src / codec_utils / RRC / UAC-BarringPerPLMN.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.5.1_asn.asn1"
5  *      `asn1c -D ./rrc_out_hlal -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "UAC-BarringPerPLMN.h"
9
10 #include "UAC-BarringPerCatList.h"
11 static int
12 memb_uac_ImplicitACBarringList_constraint_3(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         size_t size;
15         
16         if(!sptr) {
17                 ASN__CTFAIL(app_key, td, sptr,
18                         "%s: value not given (%s:%d)",
19                         td->name, __FILE__, __LINE__);
20                 return -1;
21         }
22         
23         /* Determine the number of elements */
24         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
25         
26         if((size == 63)) {
27                 /* Perform validation of the inner elements */
28                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
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
37 static int
38 memb_plmn_IdentityIndex_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
39                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
40         long value;
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         value = *(const long *)sptr;
50         
51         if((value >= 1 && value <= 12)) {
52                 /* Constraint check succeeded */
53                 return 0;
54         } else {
55                 ASN__CTFAIL(app_key, td, sptr,
56                         "%s: constraint failed (%s:%d)",
57                         td->name, __FILE__, __LINE__);
58                 return -1;
59         }
60 }
61
62 static asn_oer_constraints_t asn_OER_type_uac_ImplicitACBarringList_constr_4 CC_NOTUSED = {
63         { 0, 0 },
64         63      /* (SIZE(63..63)) */};
65 static asn_per_constraints_t asn_PER_type_uac_ImplicitACBarringList_constr_4 CC_NOTUSED = {
66         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
67         { APC_CONSTRAINED,       0,  0,  63,  63 }      /* (SIZE(63..63)) */,
68         0, 0    /* No PER value map */
69 };
70 static asn_oer_constraints_t asn_OER_memb_uac_ImplicitACBarringList_constr_4 CC_NOTUSED = {
71         { 0, 0 },
72         63      /* (SIZE(63..63)) */};
73 static asn_per_constraints_t asn_PER_memb_uac_ImplicitACBarringList_constr_4 CC_NOTUSED = {
74         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
75         { APC_CONSTRAINED,       0,  0,  63,  63 }      /* (SIZE(63..63)) */,
76         0, 0    /* No PER value map */
77 };
78 static asn_oer_constraints_t asn_OER_type_uac_ACBarringListType_constr_3 CC_NOTUSED = {
79         { 0, 0 },
80         -1};
81 static asn_per_constraints_t asn_PER_type_uac_ACBarringListType_constr_3 CC_NOTUSED = {
82         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
83         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
84         0, 0    /* No PER value map */
85 };
86 static asn_oer_constraints_t asn_OER_memb_plmn_IdentityIndex_constr_2 CC_NOTUSED = {
87         { 1, 1 }        /* (1..12) */,
88         -1};
89 static asn_per_constraints_t asn_PER_memb_plmn_IdentityIndex_constr_2 CC_NOTUSED = {
90         { APC_CONSTRAINED,       4,  4,  1,  12 }       /* (1..12) */,
91         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
92         0, 0    /* No PER value map */
93 };
94 static asn_TYPE_member_t asn_MBR_uac_ImplicitACBarringList_4[] = {
95         { ATF_POINTER, 0, 0,
96                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
97                 0,
98                 &asn_DEF_UAC_BarringInfoSetIndex,
99                 0,
100                 { 0, 0, 0 },
101                 0, 0, /* No default value */
102                 ""
103                 },
104 };
105 static const ber_tlv_tag_t asn_DEF_uac_ImplicitACBarringList_tags_4[] = {
106         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
107         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
108 };
109 static asn_SET_OF_specifics_t asn_SPC_uac_ImplicitACBarringList_specs_4 = {
110         sizeof(struct UAC_BarringPerPLMN__uac_ACBarringListType__uac_ImplicitACBarringList),
111         offsetof(struct UAC_BarringPerPLMN__uac_ACBarringListType__uac_ImplicitACBarringList, _asn_ctx),
112         0,      /* XER encoding is XMLDelimitedItemList */
113 };
114 static /* Use -fall-defs-global to expose */
115 asn_TYPE_descriptor_t asn_DEF_uac_ImplicitACBarringList_4 = {
116         "uac-ImplicitACBarringList",
117         "uac-ImplicitACBarringList",
118         &asn_OP_SEQUENCE_OF,
119         asn_DEF_uac_ImplicitACBarringList_tags_4,
120         sizeof(asn_DEF_uac_ImplicitACBarringList_tags_4)
121                 /sizeof(asn_DEF_uac_ImplicitACBarringList_tags_4[0]) - 1, /* 1 */
122         asn_DEF_uac_ImplicitACBarringList_tags_4,       /* Same as above */
123         sizeof(asn_DEF_uac_ImplicitACBarringList_tags_4)
124                 /sizeof(asn_DEF_uac_ImplicitACBarringList_tags_4[0]), /* 2 */
125         { &asn_OER_type_uac_ImplicitACBarringList_constr_4, &asn_PER_type_uac_ImplicitACBarringList_constr_4, SEQUENCE_OF_constraint },
126         asn_MBR_uac_ImplicitACBarringList_4,
127         1,      /* Single element */
128         &asn_SPC_uac_ImplicitACBarringList_specs_4      /* Additional specs */
129 };
130
131 static asn_TYPE_member_t asn_MBR_uac_ACBarringListType_3[] = {
132         { ATF_POINTER, 0, offsetof(struct UAC_BarringPerPLMN__uac_ACBarringListType, choice.uac_ImplicitACBarringList),
133                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
134                 0,
135                 &asn_DEF_uac_ImplicitACBarringList_4,
136                 0,
137                 { &asn_OER_memb_uac_ImplicitACBarringList_constr_4, &asn_PER_memb_uac_ImplicitACBarringList_constr_4,  memb_uac_ImplicitACBarringList_constraint_3 },
138                 0, 0, /* No default value */
139                 "uac-ImplicitACBarringList"
140                 },
141         { ATF_POINTER, 0, offsetof(struct UAC_BarringPerPLMN__uac_ACBarringListType, choice.uac_ExplicitACBarringList),
142                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
143                 -1,     /* IMPLICIT tag at current level */
144                 &asn_DEF_UAC_BarringPerCatList,
145                 0,
146                 { 0, 0, 0 },
147                 0, 0, /* No default value */
148                 "uac-ExplicitACBarringList"
149                 },
150 };
151 static const asn_TYPE_tag2member_t asn_MAP_uac_ACBarringListType_tag2el_3[] = {
152     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* uac-ImplicitACBarringList */
153     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* uac-ExplicitACBarringList */
154 };
155 static asn_CHOICE_specifics_t asn_SPC_uac_ACBarringListType_specs_3 = {
156         sizeof(struct UAC_BarringPerPLMN__uac_ACBarringListType),
157         offsetof(struct UAC_BarringPerPLMN__uac_ACBarringListType, _asn_ctx),
158         offsetof(struct UAC_BarringPerPLMN__uac_ACBarringListType, present),
159         sizeof(((struct UAC_BarringPerPLMN__uac_ACBarringListType *)0)->present),
160         asn_MAP_uac_ACBarringListType_tag2el_3,
161         2,      /* Count of tags in the map */
162         0, 0,
163         -1      /* Extensions start */
164 };
165 static /* Use -fall-defs-global to expose */
166 asn_TYPE_descriptor_t asn_DEF_uac_ACBarringListType_3 = {
167         "uac-ACBarringListType",
168         "uac-ACBarringListType",
169         &asn_OP_CHOICE,
170         0,      /* No effective tags (pointer) */
171         0,      /* No effective tags (count) */
172         0,      /* No tags (pointer) */
173         0,      /* No tags (count) */
174         { &asn_OER_type_uac_ACBarringListType_constr_3, &asn_PER_type_uac_ACBarringListType_constr_3, CHOICE_constraint },
175         asn_MBR_uac_ACBarringListType_3,
176         2,      /* Elements count */
177         &asn_SPC_uac_ACBarringListType_specs_3  /* Additional specs */
178 };
179
180 asn_TYPE_member_t asn_MBR_UAC_BarringPerPLMN_1[] = {
181         { ATF_NOFLAGS, 0, offsetof(struct UAC_BarringPerPLMN, plmn_IdentityIndex),
182                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
183                 -1,     /* IMPLICIT tag at current level */
184                 &asn_DEF_NativeInteger,
185                 0,
186                 { &asn_OER_memb_plmn_IdentityIndex_constr_2, &asn_PER_memb_plmn_IdentityIndex_constr_2,  memb_plmn_IdentityIndex_constraint_1 },
187                 0, 0, /* No default value */
188                 "plmn-IdentityIndex"
189                 },
190         { ATF_POINTER, 1, offsetof(struct UAC_BarringPerPLMN, uac_ACBarringListType),
191                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
192                 +1,     /* EXPLICIT tag at current level */
193                 &asn_DEF_uac_ACBarringListType_3,
194                 0,
195                 { 0, 0, 0 },
196                 0, 0, /* No default value */
197                 "uac-ACBarringListType"
198                 },
199 };
200 static const int asn_MAP_UAC_BarringPerPLMN_oms_1[] = { 1 };
201 static const ber_tlv_tag_t asn_DEF_UAC_BarringPerPLMN_tags_1[] = {
202         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
203 };
204 static const asn_TYPE_tag2member_t asn_MAP_UAC_BarringPerPLMN_tag2el_1[] = {
205     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plmn-IdentityIndex */
206     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* uac-ACBarringListType */
207 };
208 asn_SEQUENCE_specifics_t asn_SPC_UAC_BarringPerPLMN_specs_1 = {
209         sizeof(struct UAC_BarringPerPLMN),
210         offsetof(struct UAC_BarringPerPLMN, _asn_ctx),
211         asn_MAP_UAC_BarringPerPLMN_tag2el_1,
212         2,      /* Count of tags in the map */
213         asn_MAP_UAC_BarringPerPLMN_oms_1,       /* Optional members */
214         1, 0,   /* Root/Additions */
215         -1,     /* First extension addition */
216 };
217 asn_TYPE_descriptor_t asn_DEF_UAC_BarringPerPLMN = {
218         "UAC-BarringPerPLMN",
219         "UAC-BarringPerPLMN",
220         &asn_OP_SEQUENCE,
221         asn_DEF_UAC_BarringPerPLMN_tags_1,
222         sizeof(asn_DEF_UAC_BarringPerPLMN_tags_1)
223                 /sizeof(asn_DEF_UAC_BarringPerPLMN_tags_1[0]), /* 1 */
224         asn_DEF_UAC_BarringPerPLMN_tags_1,      /* Same as above */
225         sizeof(asn_DEF_UAC_BarringPerPLMN_tags_1)
226                 /sizeof(asn_DEF_UAC_BarringPerPLMN_tags_1[0]), /* 1 */
227         { 0, 0, SEQUENCE_constraint },
228         asn_MBR_UAC_BarringPerPLMN_1,
229         2,      /* Elements count */
230         &asn_SPC_UAC_BarringPerPLMN_specs_1     /* Additional specs */
231 };
232