[Epic-ID: ODUHIGH-406][Task-ID: ODUHIGH-441]: Update name of Paging RRC Codec
[o-du/l2.git] / src / codec_utils / RRC / PUCCH-ConfigCommon.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 "PUCCH-ConfigCommon.h"
9
10 /*
11  * This type is implemented using NativeEnumerated,
12  * so here we adjust the DEF accordingly.
13  */
14 static int
15 memb_pucch_ResourceCommon_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
16                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
17         long value;
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         value = *(const long *)sptr;
27         
28         if((value >= 0 && value <= 15)) {
29                 /* Constraint check succeeded */
30                 return 0;
31         } else {
32                 ASN__CTFAIL(app_key, td, sptr,
33                         "%s: constraint failed (%s:%d)",
34                         td->name, __FILE__, __LINE__);
35                 return -1;
36         }
37 }
38
39 static int
40 memb_hoppingId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
41                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
42         long value;
43         
44         if(!sptr) {
45                 ASN__CTFAIL(app_key, td, sptr,
46                         "%s: value not given (%s:%d)",
47                         td->name, __FILE__, __LINE__);
48                 return -1;
49         }
50         
51         value = *(const long *)sptr;
52         
53         if((value >= 0 && value <= 1023)) {
54                 /* Constraint check succeeded */
55                 return 0;
56         } else {
57                 ASN__CTFAIL(app_key, td, sptr,
58                         "%s: constraint failed (%s:%d)",
59                         td->name, __FILE__, __LINE__);
60                 return -1;
61         }
62 }
63
64 static int
65 memb_p0_nominal_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
66                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
67         long value;
68         
69         if(!sptr) {
70                 ASN__CTFAIL(app_key, td, sptr,
71                         "%s: value not given (%s:%d)",
72                         td->name, __FILE__, __LINE__);
73                 return -1;
74         }
75         
76         value = *(const long *)sptr;
77         
78         if((value >= -202 && value <= 24)) {
79                 /* Constraint check succeeded */
80                 return 0;
81         } else {
82                 ASN__CTFAIL(app_key, td, sptr,
83                         "%s: constraint failed (%s:%d)",
84                         td->name, __FILE__, __LINE__);
85                 return -1;
86         }
87 }
88
89 static asn_oer_constraints_t asn_OER_type_pucch_GroupHopping_constr_3 CC_NOTUSED = {
90         { 0, 0 },
91         -1};
92 static asn_per_constraints_t asn_PER_type_pucch_GroupHopping_constr_3 CC_NOTUSED = {
93         { APC_CONSTRAINED,       2,  2,  0,  2 }        /* (0..2) */,
94         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
95         0, 0    /* No PER value map */
96 };
97 static asn_oer_constraints_t asn_OER_memb_pucch_ResourceCommon_constr_2 CC_NOTUSED = {
98         { 1, 1 }        /* (0..15) */,
99         -1};
100 static asn_per_constraints_t asn_PER_memb_pucch_ResourceCommon_constr_2 CC_NOTUSED = {
101         { APC_CONSTRAINED,       4,  4,  0,  15 }       /* (0..15) */,
102         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
103         0, 0    /* No PER value map */
104 };
105 static asn_oer_constraints_t asn_OER_memb_hoppingId_constr_7 CC_NOTUSED = {
106         { 2, 1 }        /* (0..1023) */,
107         -1};
108 static asn_per_constraints_t asn_PER_memb_hoppingId_constr_7 CC_NOTUSED = {
109         { APC_CONSTRAINED,       10,  10,  0,  1023 }   /* (0..1023) */,
110         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
111         0, 0    /* No PER value map */
112 };
113 static asn_oer_constraints_t asn_OER_memb_p0_nominal_constr_8 CC_NOTUSED = {
114         { 2, 0 }        /* (-202..24) */,
115         -1};
116 static asn_per_constraints_t asn_PER_memb_p0_nominal_constr_8 CC_NOTUSED = {
117         { APC_CONSTRAINED,       8,  8, -202,  24 }     /* (-202..24) */,
118         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
119         0, 0    /* No PER value map */
120 };
121 static const asn_INTEGER_enum_map_t asn_MAP_pucch_GroupHopping_value2enum_3[] = {
122         { 0,    7,      "neither" },
123         { 1,    6,      "enable" },
124         { 2,    7,      "disable" }
125 };
126 static const unsigned int asn_MAP_pucch_GroupHopping_enum2value_3[] = {
127         2,      /* disable(2) */
128         1,      /* enable(1) */
129         0       /* neither(0) */
130 };
131 static const asn_INTEGER_specifics_t asn_SPC_pucch_GroupHopping_specs_3 = {
132         asn_MAP_pucch_GroupHopping_value2enum_3,        /* "tag" => N; sorted by tag */
133         asn_MAP_pucch_GroupHopping_enum2value_3,        /* N => "tag"; sorted by N */
134         3,      /* Number of elements in the maps */
135         0,      /* Enumeration is not extensible */
136         1,      /* Strict enumeration */
137         0,      /* Native long size */
138         0
139 };
140 static const ber_tlv_tag_t asn_DEF_pucch_GroupHopping_tags_3[] = {
141         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
142         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
143 };
144 static /* Use -fall-defs-global to expose */
145 asn_TYPE_descriptor_t asn_DEF_pucch_GroupHopping_3 = {
146         "pucch-GroupHopping",
147         "pucch-GroupHopping",
148         &asn_OP_NativeEnumerated,
149         asn_DEF_pucch_GroupHopping_tags_3,
150         sizeof(asn_DEF_pucch_GroupHopping_tags_3)
151                 /sizeof(asn_DEF_pucch_GroupHopping_tags_3[0]) - 1, /* 1 */
152         asn_DEF_pucch_GroupHopping_tags_3,      /* Same as above */
153         sizeof(asn_DEF_pucch_GroupHopping_tags_3)
154                 /sizeof(asn_DEF_pucch_GroupHopping_tags_3[0]), /* 2 */
155         { &asn_OER_type_pucch_GroupHopping_constr_3, &asn_PER_type_pucch_GroupHopping_constr_3, NativeEnumerated_constraint },
156         0, 0,   /* Defined elsewhere */
157         &asn_SPC_pucch_GroupHopping_specs_3     /* Additional specs */
158 };
159
160 asn_TYPE_member_t asn_MBR_PUCCH_ConfigCommon_1[] = {
161         { ATF_POINTER, 1, offsetof(struct PUCCH_ConfigCommon, pucch_ResourceCommon),
162                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
163                 -1,     /* IMPLICIT tag at current level */
164                 &asn_DEF_NativeInteger,
165                 0,
166                 { &asn_OER_memb_pucch_ResourceCommon_constr_2, &asn_PER_memb_pucch_ResourceCommon_constr_2,  memb_pucch_ResourceCommon_constraint_1 },
167                 0, 0, /* No default value */
168                 "pucch-ResourceCommon"
169                 },
170         { ATF_NOFLAGS, 0, offsetof(struct PUCCH_ConfigCommon, pucch_GroupHopping),
171                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
172                 -1,     /* IMPLICIT tag at current level */
173                 &asn_DEF_pucch_GroupHopping_3,
174                 0,
175                 { 0, 0, 0 },
176                 0, 0, /* No default value */
177                 "pucch-GroupHopping"
178                 },
179         { ATF_POINTER, 2, offsetof(struct PUCCH_ConfigCommon, hoppingId),
180                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
181                 -1,     /* IMPLICIT tag at current level */
182                 &asn_DEF_NativeInteger,
183                 0,
184                 { &asn_OER_memb_hoppingId_constr_7, &asn_PER_memb_hoppingId_constr_7,  memb_hoppingId_constraint_1 },
185                 0, 0, /* No default value */
186                 "hoppingId"
187                 },
188         { ATF_POINTER, 1, offsetof(struct PUCCH_ConfigCommon, p0_nominal),
189                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
190                 -1,     /* IMPLICIT tag at current level */
191                 &asn_DEF_NativeInteger,
192                 0,
193                 { &asn_OER_memb_p0_nominal_constr_8, &asn_PER_memb_p0_nominal_constr_8,  memb_p0_nominal_constraint_1 },
194                 0, 0, /* No default value */
195                 "p0-nominal"
196                 },
197 };
198 static const int asn_MAP_PUCCH_ConfigCommon_oms_1[] = { 0, 2, 3 };
199 static const ber_tlv_tag_t asn_DEF_PUCCH_ConfigCommon_tags_1[] = {
200         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
201 };
202 static const asn_TYPE_tag2member_t asn_MAP_PUCCH_ConfigCommon_tag2el_1[] = {
203     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pucch-ResourceCommon */
204     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pucch-GroupHopping */
205     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* hoppingId */
206     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* p0-nominal */
207 };
208 asn_SEQUENCE_specifics_t asn_SPC_PUCCH_ConfigCommon_specs_1 = {
209         sizeof(struct PUCCH_ConfigCommon),
210         offsetof(struct PUCCH_ConfigCommon, _asn_ctx),
211         asn_MAP_PUCCH_ConfigCommon_tag2el_1,
212         4,      /* Count of tags in the map */
213         asn_MAP_PUCCH_ConfigCommon_oms_1,       /* Optional members */
214         3, 0,   /* Root/Additions */
215         4,      /* First extension addition */
216 };
217 asn_TYPE_descriptor_t asn_DEF_PUCCH_ConfigCommon = {
218         "PUCCH-ConfigCommon",
219         "PUCCH-ConfigCommon",
220         &asn_OP_SEQUENCE,
221         asn_DEF_PUCCH_ConfigCommon_tags_1,
222         sizeof(asn_DEF_PUCCH_ConfigCommon_tags_1)
223                 /sizeof(asn_DEF_PUCCH_ConfigCommon_tags_1[0]), /* 1 */
224         asn_DEF_PUCCH_ConfigCommon_tags_1,      /* Same as above */
225         sizeof(asn_DEF_PUCCH_ConfigCommon_tags_1)
226                 /sizeof(asn_DEF_PUCCH_ConfigCommon_tags_1[0]), /* 1 */
227         { 0, 0, SEQUENCE_constraint },
228         asn_MBR_PUCCH_ConfigCommon_1,
229         4,      /* Elements count */
230         &asn_SPC_PUCCH_ConfigCommon_specs_1     /* Additional specs */
231 };
232