[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / DRB-ToAddMod.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "NR-RRC-Definitions"
4  *      found in "./22April22_Paging/rrc_15.3_asn.asn1"
5  *      `asn1c -D ./22April22_Paging -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
6  */
7
8 #include "DRB-ToAddMod.h"
9
10 #include "PDCP-Config.h"
11 #include "SDAP-Config.h"
12 static int
13 memb_eps_BearerIdentity_constraint_2(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 >= 0 && value <= 15)) {
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
37 /*
38  * This type is implemented using NativeEnumerated,
39  * so here we adjust the DEF accordingly.
40  */
41 /*
42  * This type is implemented using NativeEnumerated,
43  * so here we adjust the DEF accordingly.
44  */
45 static asn_oer_constraints_t asn_OER_memb_eps_BearerIdentity_constr_3 CC_NOTUSED = {
46         { 1, 1 }        /* (0..15) */,
47         -1};
48 static asn_per_constraints_t asn_PER_memb_eps_BearerIdentity_constr_3 CC_NOTUSED = {
49         { APC_CONSTRAINED,       4,  4,  0,  15 }       /* (0..15) */,
50         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
51         0, 0    /* No PER value map */
52 };
53 static asn_oer_constraints_t asn_OER_type_cnAssociation_constr_2 CC_NOTUSED = {
54         { 0, 0 },
55         -1};
56 static asn_per_constraints_t asn_PER_type_cnAssociation_constr_2 CC_NOTUSED = {
57         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
58         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
59         0, 0    /* No PER value map */
60 };
61 static asn_oer_constraints_t asn_OER_type_reestablishPDCP_constr_6 CC_NOTUSED = {
62         { 0, 0 },
63         -1};
64 static asn_per_constraints_t asn_PER_type_reestablishPDCP_constr_6 CC_NOTUSED = {
65         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
66         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
67         0, 0    /* No PER value map */
68 };
69 static asn_oer_constraints_t asn_OER_type_recoverPDCP_constr_8 CC_NOTUSED = {
70         { 0, 0 },
71         -1};
72 static asn_per_constraints_t asn_PER_type_recoverPDCP_constr_8 CC_NOTUSED = {
73         { APC_CONSTRAINED,       0,  0,  0,  0 }        /* (0..0) */,
74         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
75         0, 0    /* No PER value map */
76 };
77 static asn_TYPE_member_t asn_MBR_cnAssociation_2[] = {
78         { ATF_NOFLAGS, 0, offsetof(struct DRB_ToAddMod__cnAssociation, choice.eps_BearerIdentity),
79                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
80                 -1,     /* IMPLICIT tag at current level */
81                 &asn_DEF_NativeInteger,
82                 0,
83                 { &asn_OER_memb_eps_BearerIdentity_constr_3, &asn_PER_memb_eps_BearerIdentity_constr_3,  memb_eps_BearerIdentity_constraint_2 },
84                 0, 0, /* No default value */
85                 "eps-BearerIdentity"
86                 },
87         { ATF_POINTER, 0, offsetof(struct DRB_ToAddMod__cnAssociation, choice.sdap_Config),
88                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
89                 -1,     /* IMPLICIT tag at current level */
90                 &asn_DEF_SDAP_Config,
91                 0,
92                 { 0, 0, 0 },
93                 0, 0, /* No default value */
94                 "sdap-Config"
95                 },
96 };
97 static const asn_TYPE_tag2member_t asn_MAP_cnAssociation_tag2el_2[] = {
98     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eps-BearerIdentity */
99     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sdap-Config */
100 };
101 static asn_CHOICE_specifics_t asn_SPC_cnAssociation_specs_2 = {
102         sizeof(struct DRB_ToAddMod__cnAssociation),
103         offsetof(struct DRB_ToAddMod__cnAssociation, _asn_ctx),
104         offsetof(struct DRB_ToAddMod__cnAssociation, present),
105         sizeof(((struct DRB_ToAddMod__cnAssociation *)0)->present),
106         asn_MAP_cnAssociation_tag2el_2,
107         2,      /* Count of tags in the map */
108         0, 0,
109         -1      /* Extensions start */
110 };
111 static /* Use -fall-defs-global to expose */
112 asn_TYPE_descriptor_t asn_DEF_cnAssociation_2 = {
113         "cnAssociation",
114         "cnAssociation",
115         &asn_OP_CHOICE,
116         0,      /* No effective tags (pointer) */
117         0,      /* No effective tags (count) */
118         0,      /* No tags (pointer) */
119         0,      /* No tags (count) */
120         { &asn_OER_type_cnAssociation_constr_2, &asn_PER_type_cnAssociation_constr_2, CHOICE_constraint },
121         asn_MBR_cnAssociation_2,
122         2,      /* Elements count */
123         &asn_SPC_cnAssociation_specs_2  /* Additional specs */
124 };
125
126 static const asn_INTEGER_enum_map_t asn_MAP_reestablishPDCP_value2enum_6[] = {
127         { 0,    4,      "true" }
128 };
129 static const unsigned int asn_MAP_reestablishPDCP_enum2value_6[] = {
130         0       /* true(0) */
131 };
132 static const asn_INTEGER_specifics_t asn_SPC_reestablishPDCP_specs_6 = {
133         asn_MAP_reestablishPDCP_value2enum_6,   /* "tag" => N; sorted by tag */
134         asn_MAP_reestablishPDCP_enum2value_6,   /* N => "tag"; sorted by N */
135         1,      /* Number of elements in the maps */
136         0,      /* Enumeration is not extensible */
137         1,      /* Strict enumeration */
138         0,      /* Native long size */
139         0
140 };
141 static const ber_tlv_tag_t asn_DEF_reestablishPDCP_tags_6[] = {
142         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
143         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
144 };
145 static /* Use -fall-defs-global to expose */
146 asn_TYPE_descriptor_t asn_DEF_reestablishPDCP_6 = {
147         "reestablishPDCP",
148         "reestablishPDCP",
149         &asn_OP_NativeEnumerated,
150         asn_DEF_reestablishPDCP_tags_6,
151         sizeof(asn_DEF_reestablishPDCP_tags_6)
152                 /sizeof(asn_DEF_reestablishPDCP_tags_6[0]) - 1, /* 1 */
153         asn_DEF_reestablishPDCP_tags_6, /* Same as above */
154         sizeof(asn_DEF_reestablishPDCP_tags_6)
155                 /sizeof(asn_DEF_reestablishPDCP_tags_6[0]), /* 2 */
156         { &asn_OER_type_reestablishPDCP_constr_6, &asn_PER_type_reestablishPDCP_constr_6, NativeEnumerated_constraint },
157         0, 0,   /* Defined elsewhere */
158         &asn_SPC_reestablishPDCP_specs_6        /* Additional specs */
159 };
160
161 static const asn_INTEGER_enum_map_t asn_MAP_recoverPDCP_value2enum_8[] = {
162         { 0,    4,      "true" }
163 };
164 static const unsigned int asn_MAP_recoverPDCP_enum2value_8[] = {
165         0       /* true(0) */
166 };
167 static const asn_INTEGER_specifics_t asn_SPC_recoverPDCP_specs_8 = {
168         asn_MAP_recoverPDCP_value2enum_8,       /* "tag" => N; sorted by tag */
169         asn_MAP_recoverPDCP_enum2value_8,       /* N => "tag"; sorted by N */
170         1,      /* Number of elements in the maps */
171         0,      /* Enumeration is not extensible */
172         1,      /* Strict enumeration */
173         0,      /* Native long size */
174         0
175 };
176 static const ber_tlv_tag_t asn_DEF_recoverPDCP_tags_8[] = {
177         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
178         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
179 };
180 static /* Use -fall-defs-global to expose */
181 asn_TYPE_descriptor_t asn_DEF_recoverPDCP_8 = {
182         "recoverPDCP",
183         "recoverPDCP",
184         &asn_OP_NativeEnumerated,
185         asn_DEF_recoverPDCP_tags_8,
186         sizeof(asn_DEF_recoverPDCP_tags_8)
187                 /sizeof(asn_DEF_recoverPDCP_tags_8[0]) - 1, /* 1 */
188         asn_DEF_recoverPDCP_tags_8,     /* Same as above */
189         sizeof(asn_DEF_recoverPDCP_tags_8)
190                 /sizeof(asn_DEF_recoverPDCP_tags_8[0]), /* 2 */
191         { &asn_OER_type_recoverPDCP_constr_8, &asn_PER_type_recoverPDCP_constr_8, NativeEnumerated_constraint },
192         0, 0,   /* Defined elsewhere */
193         &asn_SPC_recoverPDCP_specs_8    /* Additional specs */
194 };
195
196 asn_TYPE_member_t asn_MBR_DRB_ToAddMod_1[] = {
197         { ATF_POINTER, 1, offsetof(struct DRB_ToAddMod, cnAssociation),
198                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
199                 +1,     /* EXPLICIT tag at current level */
200                 &asn_DEF_cnAssociation_2,
201                 0,
202                 { 0, 0, 0 },
203                 0, 0, /* No default value */
204                 "cnAssociation"
205                 },
206         { ATF_NOFLAGS, 0, offsetof(struct DRB_ToAddMod, drb_Identity),
207                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
208                 -1,     /* IMPLICIT tag at current level */
209                 &asn_DEF_DRB_Identity,
210                 0,
211                 { 0, 0, 0 },
212                 0, 0, /* No default value */
213                 "drb-Identity"
214                 },
215         { ATF_POINTER, 3, offsetof(struct DRB_ToAddMod, reestablishPDCP),
216                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
217                 -1,     /* IMPLICIT tag at current level */
218                 &asn_DEF_reestablishPDCP_6,
219                 0,
220                 { 0, 0, 0 },
221                 0, 0, /* No default value */
222                 "reestablishPDCP"
223                 },
224         { ATF_POINTER, 2, offsetof(struct DRB_ToAddMod, recoverPDCP),
225                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
226                 -1,     /* IMPLICIT tag at current level */
227                 &asn_DEF_recoverPDCP_8,
228                 0,
229                 { 0, 0, 0 },
230                 0, 0, /* No default value */
231                 "recoverPDCP"
232                 },
233         { ATF_POINTER, 1, offsetof(struct DRB_ToAddMod, pdcp_Config),
234                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
235                 -1,     /* IMPLICIT tag at current level */
236                 &asn_DEF_PDCP_Config,
237                 0,
238                 { 0, 0, 0 },
239                 0, 0, /* No default value */
240                 "pdcp-Config"
241                 },
242 };
243 static const int asn_MAP_DRB_ToAddMod_oms_1[] = { 0, 2, 3, 4 };
244 static const ber_tlv_tag_t asn_DEF_DRB_ToAddMod_tags_1[] = {
245         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
246 };
247 static const asn_TYPE_tag2member_t asn_MAP_DRB_ToAddMod_tag2el_1[] = {
248     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cnAssociation */
249     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* drb-Identity */
250     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* reestablishPDCP */
251     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* recoverPDCP */
252     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* pdcp-Config */
253 };
254 asn_SEQUENCE_specifics_t asn_SPC_DRB_ToAddMod_specs_1 = {
255         sizeof(struct DRB_ToAddMod),
256         offsetof(struct DRB_ToAddMod, _asn_ctx),
257         asn_MAP_DRB_ToAddMod_tag2el_1,
258         5,      /* Count of tags in the map */
259         asn_MAP_DRB_ToAddMod_oms_1,     /* Optional members */
260         4, 0,   /* Root/Additions */
261         5,      /* First extension addition */
262 };
263 asn_TYPE_descriptor_t asn_DEF_DRB_ToAddMod = {
264         "DRB-ToAddMod",
265         "DRB-ToAddMod",
266         &asn_OP_SEQUENCE,
267         asn_DEF_DRB_ToAddMod_tags_1,
268         sizeof(asn_DEF_DRB_ToAddMod_tags_1)
269                 /sizeof(asn_DEF_DRB_ToAddMod_tags_1[0]), /* 1 */
270         asn_DEF_DRB_ToAddMod_tags_1,    /* Same as above */
271         sizeof(asn_DEF_DRB_ToAddMod_tags_1)
272                 /sizeof(asn_DEF_DRB_ToAddMod_tags_1[0]), /* 1 */
273         { 0, 0, SEQUENCE_constraint },
274         asn_MBR_DRB_ToAddMod_1,
275         5,      /* Elements count */
276         &asn_SPC_DRB_ToAddMod_specs_1   /* Additional specs */
277 };
278