[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / FrequencyInfoDL-SIB.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 "FrequencyInfoDL-SIB.h"
9
10 #include "SCS-SpecificCarrier.h"
11 static int
12 memb_offsetToPointA_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         long value;
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         value = *(const long *)sptr;
24         
25         if((value >= 0 && value <= 2199)) {
26                 /* Constraint check succeeded */
27                 return 0;
28         } else {
29                 ASN__CTFAIL(app_key, td, sptr,
30                         "%s: constraint failed (%s:%d)",
31                         td->name, __FILE__, __LINE__);
32                 return -1;
33         }
34 }
35
36 static int
37 memb_scs_SpecificCarrierList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
38                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39         size_t size;
40         
41         if(!sptr) {
42                 ASN__CTFAIL(app_key, td, sptr,
43                         "%s: value not given (%s:%d)",
44                         td->name, __FILE__, __LINE__);
45                 return -1;
46         }
47         
48         /* Determine the number of elements */
49         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
50         
51         if((size >= 1 && size <= 5)) {
52                 /* Perform validation of the inner elements */
53                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
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_scs_SpecificCarrierList_constr_4 CC_NOTUSED = {
63         { 0, 0 },
64         -1      /* (SIZE(1..5)) */};
65 static asn_per_constraints_t asn_PER_type_scs_SpecificCarrierList_constr_4 CC_NOTUSED = {
66         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
67         { APC_CONSTRAINED,       3,  3,  1,  5 }        /* (SIZE(1..5)) */,
68         0, 0    /* No PER value map */
69 };
70 static asn_oer_constraints_t asn_OER_memb_offsetToPointA_constr_3 CC_NOTUSED = {
71         { 2, 1 }        /* (0..2199) */,
72         -1};
73 static asn_per_constraints_t asn_PER_memb_offsetToPointA_constr_3 CC_NOTUSED = {
74         { APC_CONSTRAINED,       12,  12,  0,  2199 }   /* (0..2199) */,
75         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
76         0, 0    /* No PER value map */
77 };
78 static asn_oer_constraints_t asn_OER_memb_scs_SpecificCarrierList_constr_4 CC_NOTUSED = {
79         { 0, 0 },
80         -1      /* (SIZE(1..5)) */};
81 static asn_per_constraints_t asn_PER_memb_scs_SpecificCarrierList_constr_4 CC_NOTUSED = {
82         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
83         { APC_CONSTRAINED,       3,  3,  1,  5 }        /* (SIZE(1..5)) */,
84         0, 0    /* No PER value map */
85 };
86 static asn_TYPE_member_t asn_MBR_scs_SpecificCarrierList_4[] = {
87         { ATF_POINTER, 0, 0,
88                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
89                 0,
90                 &asn_DEF_SCS_SpecificCarrier,
91                 0,
92                 { 0, 0, 0 },
93                 0, 0, /* No default value */
94                 ""
95                 },
96 };
97 static const ber_tlv_tag_t asn_DEF_scs_SpecificCarrierList_tags_4[] = {
98         (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
99         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
100 };
101 static asn_SET_OF_specifics_t asn_SPC_scs_SpecificCarrierList_specs_4 = {
102         sizeof(struct FrequencyInfoDL_SIB__scs_SpecificCarrierList),
103         offsetof(struct FrequencyInfoDL_SIB__scs_SpecificCarrierList, _asn_ctx),
104         0,      /* XER encoding is XMLDelimitedItemList */
105 };
106 static /* Use -fall-defs-global to expose */
107 asn_TYPE_descriptor_t asn_DEF_scs_SpecificCarrierList_4 = {
108         "scs-SpecificCarrierList",
109         "scs-SpecificCarrierList",
110         &asn_OP_SEQUENCE_OF,
111         asn_DEF_scs_SpecificCarrierList_tags_4,
112         sizeof(asn_DEF_scs_SpecificCarrierList_tags_4)
113                 /sizeof(asn_DEF_scs_SpecificCarrierList_tags_4[0]) - 1, /* 1 */
114         asn_DEF_scs_SpecificCarrierList_tags_4, /* Same as above */
115         sizeof(asn_DEF_scs_SpecificCarrierList_tags_4)
116                 /sizeof(asn_DEF_scs_SpecificCarrierList_tags_4[0]), /* 2 */
117         { &asn_OER_type_scs_SpecificCarrierList_constr_4, &asn_PER_type_scs_SpecificCarrierList_constr_4, SEQUENCE_OF_constraint },
118         asn_MBR_scs_SpecificCarrierList_4,
119         1,      /* Single element */
120         &asn_SPC_scs_SpecificCarrierList_specs_4        /* Additional specs */
121 };
122
123 asn_TYPE_member_t asn_MBR_FrequencyInfoDL_SIB_1[] = {
124         { ATF_NOFLAGS, 0, offsetof(struct FrequencyInfoDL_SIB, frequencyBandList),
125                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
126                 -1,     /* IMPLICIT tag at current level */
127                 &asn_DEF_MultiFrequencyBandListNR_SIB,
128                 0,
129                 { 0, 0, 0 },
130                 0, 0, /* No default value */
131                 "frequencyBandList"
132                 },
133         { ATF_NOFLAGS, 0, offsetof(struct FrequencyInfoDL_SIB, offsetToPointA),
134                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
135                 -1,     /* IMPLICIT tag at current level */
136                 &asn_DEF_NativeInteger,
137                 0,
138                 { &asn_OER_memb_offsetToPointA_constr_3, &asn_PER_memb_offsetToPointA_constr_3,  memb_offsetToPointA_constraint_1 },
139                 0, 0, /* No default value */
140                 "offsetToPointA"
141                 },
142         { ATF_NOFLAGS, 0, offsetof(struct FrequencyInfoDL_SIB, scs_SpecificCarrierList),
143                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
144                 0,
145                 &asn_DEF_scs_SpecificCarrierList_4,
146                 0,
147                 { &asn_OER_memb_scs_SpecificCarrierList_constr_4, &asn_PER_memb_scs_SpecificCarrierList_constr_4,  memb_scs_SpecificCarrierList_constraint_1 },
148                 0, 0, /* No default value */
149                 "scs-SpecificCarrierList"
150                 },
151 };
152 static const ber_tlv_tag_t asn_DEF_FrequencyInfoDL_SIB_tags_1[] = {
153         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
154 };
155 static const asn_TYPE_tag2member_t asn_MAP_FrequencyInfoDL_SIB_tag2el_1[] = {
156     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* frequencyBandList */
157     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* offsetToPointA */
158     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* scs-SpecificCarrierList */
159 };
160 asn_SEQUENCE_specifics_t asn_SPC_FrequencyInfoDL_SIB_specs_1 = {
161         sizeof(struct FrequencyInfoDL_SIB),
162         offsetof(struct FrequencyInfoDL_SIB, _asn_ctx),
163         asn_MAP_FrequencyInfoDL_SIB_tag2el_1,
164         3,      /* Count of tags in the map */
165         0, 0, 0,        /* Optional elements (not needed) */
166         -1,     /* First extension addition */
167 };
168 asn_TYPE_descriptor_t asn_DEF_FrequencyInfoDL_SIB = {
169         "FrequencyInfoDL-SIB",
170         "FrequencyInfoDL-SIB",
171         &asn_OP_SEQUENCE,
172         asn_DEF_FrequencyInfoDL_SIB_tags_1,
173         sizeof(asn_DEF_FrequencyInfoDL_SIB_tags_1)
174                 /sizeof(asn_DEF_FrequencyInfoDL_SIB_tags_1[0]), /* 1 */
175         asn_DEF_FrequencyInfoDL_SIB_tags_1,     /* Same as above */
176         sizeof(asn_DEF_FrequencyInfoDL_SIB_tags_1)
177                 /sizeof(asn_DEF_FrequencyInfoDL_SIB_tags_1[0]), /* 1 */
178         { 0, 0, SEQUENCE_constraint },
179         asn_MBR_FrequencyInfoDL_SIB_1,
180         3,      /* Elements count */
181         &asn_SPC_FrequencyInfoDL_SIB_specs_1    /* Additional specs */
182 };
183