[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / SSB-MTC2.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 "SSB-MTC2.h"
9
10 /*
11  * This type is implemented using NativeEnumerated,
12  * so here we adjust the DEF accordingly.
13  */
14 static int
15 memb_pci_List_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
16                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
17         size_t size;
18         
19         if(!sptr) {
20                 ASN__CTFAIL(app_key, td, sptr,
21                         "%s: value not given (%s:%d)",
22                         td->name, __FILE__, __LINE__);
23                 return -1;
24         }
25         
26         /* Determine the number of elements */
27         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
28         
29         if((size >= 1 && size <= 64)) {
30                 /* Perform validation of the inner elements */
31                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
32         } else {
33                 ASN__CTFAIL(app_key, td, sptr,
34                         "%s: constraint failed (%s:%d)",
35                         td->name, __FILE__, __LINE__);
36                 return -1;
37         }
38 }
39
40 static asn_oer_constraints_t asn_OER_type_pci_List_constr_2 CC_NOTUSED = {
41         { 0, 0 },
42         -1      /* (SIZE(1..64)) */};
43 static asn_per_constraints_t asn_PER_type_pci_List_constr_2 CC_NOTUSED = {
44         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
45         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (SIZE(1..64)) */,
46         0, 0    /* No PER value map */
47 };
48 static asn_oer_constraints_t asn_OER_type_periodicity_constr_4 CC_NOTUSED = {
49         { 0, 0 },
50         -1};
51 static asn_per_constraints_t asn_PER_type_periodicity_constr_4 CC_NOTUSED = {
52         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
53         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
54         0, 0    /* No PER value map */
55 };
56 static asn_oer_constraints_t asn_OER_memb_pci_List_constr_2 CC_NOTUSED = {
57         { 0, 0 },
58         -1      /* (SIZE(1..64)) */};
59 static asn_per_constraints_t asn_PER_memb_pci_List_constr_2 CC_NOTUSED = {
60         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
61         { APC_CONSTRAINED,       6,  6,  1,  64 }       /* (SIZE(1..64)) */,
62         0, 0    /* No PER value map */
63 };
64 static asn_TYPE_member_t asn_MBR_pci_List_2[] = {
65         { ATF_POINTER, 0, 0,
66                 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
67                 0,
68                 &asn_DEF_PhysCellId,
69                 0,
70                 { 0, 0, 0 },
71                 0, 0, /* No default value */
72                 ""
73                 },
74 };
75 static const ber_tlv_tag_t asn_DEF_pci_List_tags_2[] = {
76         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
77         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
78 };
79 static asn_SET_OF_specifics_t asn_SPC_pci_List_specs_2 = {
80         sizeof(struct SSB_MTC2__pci_List),
81         offsetof(struct SSB_MTC2__pci_List, _asn_ctx),
82         0,      /* XER encoding is XMLDelimitedItemList */
83 };
84 static /* Use -fall-defs-global to expose */
85 asn_TYPE_descriptor_t asn_DEF_pci_List_2 = {
86         "pci-List",
87         "pci-List",
88         &asn_OP_SEQUENCE_OF,
89         asn_DEF_pci_List_tags_2,
90         sizeof(asn_DEF_pci_List_tags_2)
91                 /sizeof(asn_DEF_pci_List_tags_2[0]) - 1, /* 1 */
92         asn_DEF_pci_List_tags_2,        /* Same as above */
93         sizeof(asn_DEF_pci_List_tags_2)
94                 /sizeof(asn_DEF_pci_List_tags_2[0]), /* 2 */
95         { &asn_OER_type_pci_List_constr_2, &asn_PER_type_pci_List_constr_2, SEQUENCE_OF_constraint },
96         asn_MBR_pci_List_2,
97         1,      /* Single element */
98         &asn_SPC_pci_List_specs_2       /* Additional specs */
99 };
100
101 static const asn_INTEGER_enum_map_t asn_MAP_periodicity_value2enum_4[] = {
102         { 0,    3,      "sf5" },
103         { 1,    4,      "sf10" },
104         { 2,    4,      "sf20" },
105         { 3,    4,      "sf40" },
106         { 4,    4,      "sf80" },
107         { 5,    6,      "spare3" },
108         { 6,    6,      "spare2" },
109         { 7,    6,      "spare1" }
110 };
111 static const unsigned int asn_MAP_periodicity_enum2value_4[] = {
112         1,      /* sf10(1) */
113         2,      /* sf20(2) */
114         3,      /* sf40(3) */
115         0,      /* sf5(0) */
116         4,      /* sf80(4) */
117         7,      /* spare1(7) */
118         6,      /* spare2(6) */
119         5       /* spare3(5) */
120 };
121 static const asn_INTEGER_specifics_t asn_SPC_periodicity_specs_4 = {
122         asn_MAP_periodicity_value2enum_4,       /* "tag" => N; sorted by tag */
123         asn_MAP_periodicity_enum2value_4,       /* N => "tag"; sorted by N */
124         8,      /* Number of elements in the maps */
125         0,      /* Enumeration is not extensible */
126         1,      /* Strict enumeration */
127         0,      /* Native long size */
128         0
129 };
130 static const ber_tlv_tag_t asn_DEF_periodicity_tags_4[] = {
131         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
132         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
133 };
134 static /* Use -fall-defs-global to expose */
135 asn_TYPE_descriptor_t asn_DEF_periodicity_4 = {
136         "periodicity",
137         "periodicity",
138         &asn_OP_NativeEnumerated,
139         asn_DEF_periodicity_tags_4,
140         sizeof(asn_DEF_periodicity_tags_4)
141                 /sizeof(asn_DEF_periodicity_tags_4[0]) - 1, /* 1 */
142         asn_DEF_periodicity_tags_4,     /* Same as above */
143         sizeof(asn_DEF_periodicity_tags_4)
144                 /sizeof(asn_DEF_periodicity_tags_4[0]), /* 2 */
145         { &asn_OER_type_periodicity_constr_4, &asn_PER_type_periodicity_constr_4, NativeEnumerated_constraint },
146         0, 0,   /* Defined elsewhere */
147         &asn_SPC_periodicity_specs_4    /* Additional specs */
148 };
149
150 asn_TYPE_member_t asn_MBR_SSB_MTC2_1[] = {
151         { ATF_POINTER, 1, offsetof(struct SSB_MTC2, pci_List),
152                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
153                 0,
154                 &asn_DEF_pci_List_2,
155                 0,
156                 { &asn_OER_memb_pci_List_constr_2, &asn_PER_memb_pci_List_constr_2,  memb_pci_List_constraint_1 },
157                 0, 0, /* No default value */
158                 "pci-List"
159                 },
160         { ATF_NOFLAGS, 0, offsetof(struct SSB_MTC2, periodicity),
161                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
162                 -1,     /* IMPLICIT tag at current level */
163                 &asn_DEF_periodicity_4,
164                 0,
165                 { 0, 0, 0 },
166                 0, 0, /* No default value */
167                 "periodicity"
168                 },
169 };
170 static const int asn_MAP_SSB_MTC2_oms_1[] = { 0 };
171 static const ber_tlv_tag_t asn_DEF_SSB_MTC2_tags_1[] = {
172         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
173 };
174 static const asn_TYPE_tag2member_t asn_MAP_SSB_MTC2_tag2el_1[] = {
175     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pci-List */
176     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* periodicity */
177 };
178 asn_SEQUENCE_specifics_t asn_SPC_SSB_MTC2_specs_1 = {
179         sizeof(struct SSB_MTC2),
180         offsetof(struct SSB_MTC2, _asn_ctx),
181         asn_MAP_SSB_MTC2_tag2el_1,
182         2,      /* Count of tags in the map */
183         asn_MAP_SSB_MTC2_oms_1, /* Optional members */
184         1, 0,   /* Root/Additions */
185         -1,     /* First extension addition */
186 };
187 asn_TYPE_descriptor_t asn_DEF_SSB_MTC2 = {
188         "SSB-MTC2",
189         "SSB-MTC2",
190         &asn_OP_SEQUENCE,
191         asn_DEF_SSB_MTC2_tags_1,
192         sizeof(asn_DEF_SSB_MTC2_tags_1)
193                 /sizeof(asn_DEF_SSB_MTC2_tags_1[0]), /* 1 */
194         asn_DEF_SSB_MTC2_tags_1,        /* Same as above */
195         sizeof(asn_DEF_SSB_MTC2_tags_1)
196                 /sizeof(asn_DEF_SSB_MTC2_tags_1[0]), /* 1 */
197         { 0, 0, SEQUENCE_constraint },
198         asn_MBR_SSB_MTC2_1,
199         2,      /* Elements count */
200         &asn_SPC_SSB_MTC2_specs_1       /* Additional specs */
201 };
202