[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / SIB6.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 "SIB6.h"
9
10 static int
11 memb_messageIdentifier_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
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         if(st->size > 0) {
24                 /* Size in bits */
25                 size = 8 * st->size - (st->bits_unused & 0x07);
26         } else {
27                 size = 0;
28         }
29         
30         if((size == 16)) {
31                 /* Constraint check succeeded */
32                 return 0;
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 int
42 memb_serialNumber_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
43                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
44         const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
45         size_t size;
46         
47         if(!sptr) {
48                 ASN__CTFAIL(app_key, td, sptr,
49                         "%s: value not given (%s:%d)",
50                         td->name, __FILE__, __LINE__);
51                 return -1;
52         }
53         
54         if(st->size > 0) {
55                 /* Size in bits */
56                 size = 8 * st->size - (st->bits_unused & 0x07);
57         } else {
58                 size = 0;
59         }
60         
61         if((size == 16)) {
62                 /* Constraint check succeeded */
63                 return 0;
64         } else {
65                 ASN__CTFAIL(app_key, td, sptr,
66                         "%s: constraint failed (%s:%d)",
67                         td->name, __FILE__, __LINE__);
68                 return -1;
69         }
70 }
71
72 static int
73 memb_warningType_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
74                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
75         const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
76         size_t size;
77         
78         if(!sptr) {
79                 ASN__CTFAIL(app_key, td, sptr,
80                         "%s: value not given (%s:%d)",
81                         td->name, __FILE__, __LINE__);
82                 return -1;
83         }
84         
85         size = st->size;
86         
87         if((size == 2)) {
88                 /* Constraint check succeeded */
89                 return 0;
90         } else {
91                 ASN__CTFAIL(app_key, td, sptr,
92                         "%s: constraint failed (%s:%d)",
93                         td->name, __FILE__, __LINE__);
94                 return -1;
95         }
96 }
97
98 static asn_oer_constraints_t asn_OER_memb_messageIdentifier_constr_2 CC_NOTUSED = {
99         { 0, 0 },
100         16      /* (SIZE(16..16)) */};
101 static asn_per_constraints_t asn_PER_memb_messageIdentifier_constr_2 CC_NOTUSED = {
102         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
103         { APC_CONSTRAINED,       0,  0,  16,  16 }      /* (SIZE(16..16)) */,
104         0, 0    /* No PER value map */
105 };
106 static asn_oer_constraints_t asn_OER_memb_serialNumber_constr_3 CC_NOTUSED = {
107         { 0, 0 },
108         16      /* (SIZE(16..16)) */};
109 static asn_per_constraints_t asn_PER_memb_serialNumber_constr_3 CC_NOTUSED = {
110         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
111         { APC_CONSTRAINED,       0,  0,  16,  16 }      /* (SIZE(16..16)) */,
112         0, 0    /* No PER value map */
113 };
114 static asn_oer_constraints_t asn_OER_memb_warningType_constr_4 CC_NOTUSED = {
115         { 0, 0 },
116         2       /* (SIZE(2..2)) */};
117 static asn_per_constraints_t asn_PER_memb_warningType_constr_4 CC_NOTUSED = {
118         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
119         { APC_CONSTRAINED,       0,  0,  2,  2 }        /* (SIZE(2..2)) */,
120         0, 0    /* No PER value map */
121 };
122 asn_TYPE_member_t asn_MBR_SIB6_1[] = {
123         { ATF_NOFLAGS, 0, offsetof(struct SIB6, messageIdentifier),
124                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
125                 -1,     /* IMPLICIT tag at current level */
126                 &asn_DEF_BIT_STRING,
127                 0,
128                 { &asn_OER_memb_messageIdentifier_constr_2, &asn_PER_memb_messageIdentifier_constr_2,  memb_messageIdentifier_constraint_1 },
129                 0, 0, /* No default value */
130                 "messageIdentifier"
131                 },
132         { ATF_NOFLAGS, 0, offsetof(struct SIB6, serialNumber),
133                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
134                 -1,     /* IMPLICIT tag at current level */
135                 &asn_DEF_BIT_STRING,
136                 0,
137                 { &asn_OER_memb_serialNumber_constr_3, &asn_PER_memb_serialNumber_constr_3,  memb_serialNumber_constraint_1 },
138                 0, 0, /* No default value */
139                 "serialNumber"
140                 },
141         { ATF_NOFLAGS, 0, offsetof(struct SIB6, warningType),
142                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
143                 -1,     /* IMPLICIT tag at current level */
144                 &asn_DEF_OCTET_STRING,
145                 0,
146                 { &asn_OER_memb_warningType_constr_4, &asn_PER_memb_warningType_constr_4,  memb_warningType_constraint_1 },
147                 0, 0, /* No default value */
148                 "warningType"
149                 },
150         { ATF_POINTER, 1, offsetof(struct SIB6, lateNonCriticalExtension),
151                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
152                 -1,     /* IMPLICIT tag at current level */
153                 &asn_DEF_OCTET_STRING,
154                 0,
155                 { 0, 0, 0 },
156                 0, 0, /* No default value */
157                 "lateNonCriticalExtension"
158                 },
159 };
160 static const int asn_MAP_SIB6_oms_1[] = { 3 };
161 static const ber_tlv_tag_t asn_DEF_SIB6_tags_1[] = {
162         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
163 };
164 static const asn_TYPE_tag2member_t asn_MAP_SIB6_tag2el_1[] = {
165     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* messageIdentifier */
166     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* serialNumber */
167     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* warningType */
168     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* lateNonCriticalExtension */
169 };
170 asn_SEQUENCE_specifics_t asn_SPC_SIB6_specs_1 = {
171         sizeof(struct SIB6),
172         offsetof(struct SIB6, _asn_ctx),
173         asn_MAP_SIB6_tag2el_1,
174         4,      /* Count of tags in the map */
175         asn_MAP_SIB6_oms_1,     /* Optional members */
176         1, 0,   /* Root/Additions */
177         4,      /* First extension addition */
178 };
179 asn_TYPE_descriptor_t asn_DEF_SIB6 = {
180         "SIB6",
181         "SIB6",
182         &asn_OP_SEQUENCE,
183         asn_DEF_SIB6_tags_1,
184         sizeof(asn_DEF_SIB6_tags_1)
185                 /sizeof(asn_DEF_SIB6_tags_1[0]), /* 1 */
186         asn_DEF_SIB6_tags_1,    /* Same as above */
187         sizeof(asn_DEF_SIB6_tags_1)
188                 /sizeof(asn_DEF_SIB6_tags_1[0]), /* 1 */
189         { 0, 0, SEQUENCE_constraint },
190         asn_MBR_SIB6_1,
191         4,      /* Elements count */
192         &asn_SPC_SIB6_specs_1   /* Additional specs */
193 };
194