[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / NZP-CSI-RS-Resource.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 "NZP-CSI-RS-Resource.h"
9
10 #include "CSI-ResourcePeriodicityAndOffset.h"
11 /*
12  * This type is implemented using NativeEnumerated,
13  * so here we adjust the DEF accordingly.
14  */
15 static int
16 memb_powerControlOffset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
17                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
18         long value;
19         
20         if(!sptr) {
21                 ASN__CTFAIL(app_key, td, sptr,
22                         "%s: value not given (%s:%d)",
23                         td->name, __FILE__, __LINE__);
24                 return -1;
25         }
26         
27         value = *(const long *)sptr;
28         
29         if((value >= -8 && value <= 15)) {
30                 /* Constraint check succeeded */
31                 return 0;
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_powerControlOffsetSS_constr_5 CC_NOTUSED = {
41         { 0, 0 },
42         -1};
43 static asn_per_constraints_t asn_PER_type_powerControlOffsetSS_constr_5 CC_NOTUSED = {
44         { APC_CONSTRAINED,       2,  2,  0,  3 }        /* (0..3) */,
45         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
46         0, 0    /* No PER value map */
47 };
48 static asn_oer_constraints_t asn_OER_memb_powerControlOffset_constr_4 CC_NOTUSED = {
49         { 1, 0 }        /* (-8..15) */,
50         -1};
51 static asn_per_constraints_t asn_PER_memb_powerControlOffset_constr_4 CC_NOTUSED = {
52         { APC_CONSTRAINED,       5,  5, -8,  15 }       /* (-8..15) */,
53         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
54         0, 0    /* No PER value map */
55 };
56 static const asn_INTEGER_enum_map_t asn_MAP_powerControlOffsetSS_value2enum_5[] = {
57         { 0,    4,      "db-3" },
58         { 1,    3,      "db0" },
59         { 2,    3,      "db3" },
60         { 3,    3,      "db6" }
61 };
62 static const unsigned int asn_MAP_powerControlOffsetSS_enum2value_5[] = {
63         0,      /* db-3(0) */
64         1,      /* db0(1) */
65         2,      /* db3(2) */
66         3       /* db6(3) */
67 };
68 static const asn_INTEGER_specifics_t asn_SPC_powerControlOffsetSS_specs_5 = {
69         asn_MAP_powerControlOffsetSS_value2enum_5,      /* "tag" => N; sorted by tag */
70         asn_MAP_powerControlOffsetSS_enum2value_5,      /* N => "tag"; sorted by N */
71         4,      /* Number of elements in the maps */
72         0,      /* Enumeration is not extensible */
73         1,      /* Strict enumeration */
74         0,      /* Native long size */
75         0
76 };
77 static const ber_tlv_tag_t asn_DEF_powerControlOffsetSS_tags_5[] = {
78         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
79         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
80 };
81 static /* Use -fall-defs-global to expose */
82 asn_TYPE_descriptor_t asn_DEF_powerControlOffsetSS_5 = {
83         "powerControlOffsetSS",
84         "powerControlOffsetSS",
85         &asn_OP_NativeEnumerated,
86         asn_DEF_powerControlOffsetSS_tags_5,
87         sizeof(asn_DEF_powerControlOffsetSS_tags_5)
88                 /sizeof(asn_DEF_powerControlOffsetSS_tags_5[0]) - 1, /* 1 */
89         asn_DEF_powerControlOffsetSS_tags_5,    /* Same as above */
90         sizeof(asn_DEF_powerControlOffsetSS_tags_5)
91                 /sizeof(asn_DEF_powerControlOffsetSS_tags_5[0]), /* 2 */
92         { &asn_OER_type_powerControlOffsetSS_constr_5, &asn_PER_type_powerControlOffsetSS_constr_5, NativeEnumerated_constraint },
93         0, 0,   /* Defined elsewhere */
94         &asn_SPC_powerControlOffsetSS_specs_5   /* Additional specs */
95 };
96
97 asn_TYPE_member_t asn_MBR_NZP_CSI_RS_Resource_1[] = {
98         { ATF_NOFLAGS, 0, offsetof(struct NZP_CSI_RS_Resource, nzp_CSI_RS_ResourceId),
99                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
100                 -1,     /* IMPLICIT tag at current level */
101                 &asn_DEF_NZP_CSI_RS_ResourceId,
102                 0,
103                 { 0, 0, 0 },
104                 0, 0, /* No default value */
105                 "nzp-CSI-RS-ResourceId"
106                 },
107         { ATF_NOFLAGS, 0, offsetof(struct NZP_CSI_RS_Resource, resourceMapping),
108                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
109                 -1,     /* IMPLICIT tag at current level */
110                 &asn_DEF_CSI_RS_ResourceMapping,
111                 0,
112                 { 0, 0, 0 },
113                 0, 0, /* No default value */
114                 "resourceMapping"
115                 },
116         { ATF_NOFLAGS, 0, offsetof(struct NZP_CSI_RS_Resource, powerControlOffset),
117                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
118                 -1,     /* IMPLICIT tag at current level */
119                 &asn_DEF_NativeInteger,
120                 0,
121                 { &asn_OER_memb_powerControlOffset_constr_4, &asn_PER_memb_powerControlOffset_constr_4,  memb_powerControlOffset_constraint_1 },
122                 0, 0, /* No default value */
123                 "powerControlOffset"
124                 },
125         { ATF_POINTER, 1, offsetof(struct NZP_CSI_RS_Resource, powerControlOffsetSS),
126                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
127                 -1,     /* IMPLICIT tag at current level */
128                 &asn_DEF_powerControlOffsetSS_5,
129                 0,
130                 { 0, 0, 0 },
131                 0, 0, /* No default value */
132                 "powerControlOffsetSS"
133                 },
134         { ATF_NOFLAGS, 0, offsetof(struct NZP_CSI_RS_Resource, scramblingID),
135                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
136                 -1,     /* IMPLICIT tag at current level */
137                 &asn_DEF_ScramblingId,
138                 0,
139                 { 0, 0, 0 },
140                 0, 0, /* No default value */
141                 "scramblingID"
142                 },
143         { ATF_POINTER, 2, offsetof(struct NZP_CSI_RS_Resource, periodicityAndOffset),
144                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
145                 +1,     /* EXPLICIT tag at current level */
146                 &asn_DEF_CSI_ResourcePeriodicityAndOffset,
147                 0,
148                 { 0, 0, 0 },
149                 0, 0, /* No default value */
150                 "periodicityAndOffset"
151                 },
152         { ATF_POINTER, 1, offsetof(struct NZP_CSI_RS_Resource, qcl_InfoPeriodicCSI_RS),
153                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
154                 -1,     /* IMPLICIT tag at current level */
155                 &asn_DEF_TCI_StateId,
156                 0,
157                 { 0, 0, 0 },
158                 0, 0, /* No default value */
159                 "qcl-InfoPeriodicCSI-RS"
160                 },
161 };
162 static const int asn_MAP_NZP_CSI_RS_Resource_oms_1[] = { 3, 5, 6 };
163 static const ber_tlv_tag_t asn_DEF_NZP_CSI_RS_Resource_tags_1[] = {
164         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
165 };
166 static const asn_TYPE_tag2member_t asn_MAP_NZP_CSI_RS_Resource_tag2el_1[] = {
167     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nzp-CSI-RS-ResourceId */
168     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* resourceMapping */
169     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* powerControlOffset */
170     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* powerControlOffsetSS */
171     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* scramblingID */
172     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* periodicityAndOffset */
173     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* qcl-InfoPeriodicCSI-RS */
174 };
175 asn_SEQUENCE_specifics_t asn_SPC_NZP_CSI_RS_Resource_specs_1 = {
176         sizeof(struct NZP_CSI_RS_Resource),
177         offsetof(struct NZP_CSI_RS_Resource, _asn_ctx),
178         asn_MAP_NZP_CSI_RS_Resource_tag2el_1,
179         7,      /* Count of tags in the map */
180         asn_MAP_NZP_CSI_RS_Resource_oms_1,      /* Optional members */
181         3, 0,   /* Root/Additions */
182         7,      /* First extension addition */
183 };
184 asn_TYPE_descriptor_t asn_DEF_NZP_CSI_RS_Resource = {
185         "NZP-CSI-RS-Resource",
186         "NZP-CSI-RS-Resource",
187         &asn_OP_SEQUENCE,
188         asn_DEF_NZP_CSI_RS_Resource_tags_1,
189         sizeof(asn_DEF_NZP_CSI_RS_Resource_tags_1)
190                 /sizeof(asn_DEF_NZP_CSI_RS_Resource_tags_1[0]), /* 1 */
191         asn_DEF_NZP_CSI_RS_Resource_tags_1,     /* Same as above */
192         sizeof(asn_DEF_NZP_CSI_RS_Resource_tags_1)
193                 /sizeof(asn_DEF_NZP_CSI_RS_Resource_tags_1[0]), /* 1 */
194         { 0, 0, SEQUENCE_constraint },
195         asn_MBR_NZP_CSI_RS_Resource_1,
196         7,      /* Elements count */
197         &asn_SPC_NZP_CSI_RS_Resource_specs_1    /* Additional specs */
198 };
199