[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / PeriodicalReportConfigInterRAT.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 "PeriodicalReportConfigInterRAT.h"
9
10 /*
11  * This type is implemented using NativeEnumerated,
12  * so here we adjust the DEF accordingly.
13  */
14 static int
15 memb_maxReportCells_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 >= 1 && value <= 8)) {
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 asn_oer_constraints_t asn_OER_type_reportAmount_constr_3 CC_NOTUSED = {
40         { 0, 0 },
41         -1};
42 static asn_per_constraints_t asn_PER_type_reportAmount_constr_3 CC_NOTUSED = {
43         { APC_CONSTRAINED,       3,  3,  0,  7 }        /* (0..7) */,
44         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
45         0, 0    /* No PER value map */
46 };
47 static asn_oer_constraints_t asn_OER_memb_maxReportCells_constr_13 CC_NOTUSED = {
48         { 1, 1 }        /* (1..8) */,
49         -1};
50 static asn_per_constraints_t asn_PER_memb_maxReportCells_constr_13 CC_NOTUSED = {
51         { APC_CONSTRAINED,       3,  3,  1,  8 }        /* (1..8) */,
52         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
53         0, 0    /* No PER value map */
54 };
55 static const asn_INTEGER_enum_map_t asn_MAP_reportAmount_value2enum_3[] = {
56         { 0,    2,      "r1" },
57         { 1,    2,      "r2" },
58         { 2,    2,      "r4" },
59         { 3,    2,      "r8" },
60         { 4,    3,      "r16" },
61         { 5,    3,      "r32" },
62         { 6,    3,      "r64" },
63         { 7,    8,      "infinity" }
64 };
65 static const unsigned int asn_MAP_reportAmount_enum2value_3[] = {
66         7,      /* infinity(7) */
67         0,      /* r1(0) */
68         4,      /* r16(4) */
69         1,      /* r2(1) */
70         5,      /* r32(5) */
71         2,      /* r4(2) */
72         6,      /* r64(6) */
73         3       /* r8(3) */
74 };
75 static const asn_INTEGER_specifics_t asn_SPC_reportAmount_specs_3 = {
76         asn_MAP_reportAmount_value2enum_3,      /* "tag" => N; sorted by tag */
77         asn_MAP_reportAmount_enum2value_3,      /* N => "tag"; sorted by N */
78         8,      /* Number of elements in the maps */
79         0,      /* Enumeration is not extensible */
80         1,      /* Strict enumeration */
81         0,      /* Native long size */
82         0
83 };
84 static const ber_tlv_tag_t asn_DEF_reportAmount_tags_3[] = {
85         (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
86         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
87 };
88 static /* Use -fall-defs-global to expose */
89 asn_TYPE_descriptor_t asn_DEF_reportAmount_3 = {
90         "reportAmount",
91         "reportAmount",
92         &asn_OP_NativeEnumerated,
93         asn_DEF_reportAmount_tags_3,
94         sizeof(asn_DEF_reportAmount_tags_3)
95                 /sizeof(asn_DEF_reportAmount_tags_3[0]) - 1, /* 1 */
96         asn_DEF_reportAmount_tags_3,    /* Same as above */
97         sizeof(asn_DEF_reportAmount_tags_3)
98                 /sizeof(asn_DEF_reportAmount_tags_3[0]), /* 2 */
99         { &asn_OER_type_reportAmount_constr_3, &asn_PER_type_reportAmount_constr_3, NativeEnumerated_constraint },
100         0, 0,   /* Defined elsewhere */
101         &asn_SPC_reportAmount_specs_3   /* Additional specs */
102 };
103
104 asn_TYPE_member_t asn_MBR_PeriodicalReportConfigInterRAT_1[] = {
105         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfigInterRAT, reportInterval),
106                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
107                 -1,     /* IMPLICIT tag at current level */
108                 &asn_DEF_ReportInterval,
109                 0,
110                 { 0, 0, 0 },
111                 0, 0, /* No default value */
112                 "reportInterval"
113                 },
114         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfigInterRAT, reportAmount),
115                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
116                 -1,     /* IMPLICIT tag at current level */
117                 &asn_DEF_reportAmount_3,
118                 0,
119                 { 0, 0, 0 },
120                 0, 0, /* No default value */
121                 "reportAmount"
122                 },
123         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfigInterRAT, reportQuantity),
124                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
125                 -1,     /* IMPLICIT tag at current level */
126                 &asn_DEF_MeasReportQuantity,
127                 0,
128                 { 0, 0, 0 },
129                 0, 0, /* No default value */
130                 "reportQuantity"
131                 },
132         { ATF_NOFLAGS, 0, offsetof(struct PeriodicalReportConfigInterRAT, maxReportCells),
133                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
134                 -1,     /* IMPLICIT tag at current level */
135                 &asn_DEF_NativeInteger,
136                 0,
137                 { &asn_OER_memb_maxReportCells_constr_13, &asn_PER_memb_maxReportCells_constr_13,  memb_maxReportCells_constraint_1 },
138                 0, 0, /* No default value */
139                 "maxReportCells"
140                 },
141 };
142 static const ber_tlv_tag_t asn_DEF_PeriodicalReportConfigInterRAT_tags_1[] = {
143         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
144 };
145 static const asn_TYPE_tag2member_t asn_MAP_PeriodicalReportConfigInterRAT_tag2el_1[] = {
146     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* reportInterval */
147     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* reportAmount */
148     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* reportQuantity */
149     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* maxReportCells */
150 };
151 asn_SEQUENCE_specifics_t asn_SPC_PeriodicalReportConfigInterRAT_specs_1 = {
152         sizeof(struct PeriodicalReportConfigInterRAT),
153         offsetof(struct PeriodicalReportConfigInterRAT, _asn_ctx),
154         asn_MAP_PeriodicalReportConfigInterRAT_tag2el_1,
155         4,      /* Count of tags in the map */
156         0, 0, 0,        /* Optional elements (not needed) */
157         4,      /* First extension addition */
158 };
159 asn_TYPE_descriptor_t asn_DEF_PeriodicalReportConfigInterRAT = {
160         "PeriodicalReportConfigInterRAT",
161         "PeriodicalReportConfigInterRAT",
162         &asn_OP_SEQUENCE,
163         asn_DEF_PeriodicalReportConfigInterRAT_tags_1,
164         sizeof(asn_DEF_PeriodicalReportConfigInterRAT_tags_1)
165                 /sizeof(asn_DEF_PeriodicalReportConfigInterRAT_tags_1[0]), /* 1 */
166         asn_DEF_PeriodicalReportConfigInterRAT_tags_1,  /* Same as above */
167         sizeof(asn_DEF_PeriodicalReportConfigInterRAT_tags_1)
168                 /sizeof(asn_DEF_PeriodicalReportConfigInterRAT_tags_1[0]), /* 1 */
169         { 0, 0, SEQUENCE_constraint },
170         asn_MBR_PeriodicalReportConfigInterRAT_1,
171         4,      /* Elements count */
172         &asn_SPC_PeriodicalReportConfigInterRAT_specs_1 /* Additional specs */
173 };
174