[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-423] Modified RRC asn structures
[o-du/l2.git] / src / codec_utils / RRC / CG-UCI-OnPUSCH.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 "CG-UCI-OnPUSCH.h"
9
10 #include "BetaOffsets.h"
11 static int
12 memb_dynamic_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         size_t size;
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         /* Determine the number of elements */
24         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
25         
26         if((size >= 1 && size <= 4)) {
27                 /* Perform validation of the inner elements */
28                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
29         } else {
30                 ASN__CTFAIL(app_key, td, sptr,
31                         "%s: constraint failed (%s:%d)",
32                         td->name, __FILE__, __LINE__);
33                 return -1;
34         }
35 }
36
37 static asn_oer_constraints_t asn_OER_type_dynamic_constr_2 CC_NOTUSED = {
38         { 0, 0 },
39         -1      /* (SIZE(1..4)) */};
40 static asn_per_constraints_t asn_PER_type_dynamic_constr_2 CC_NOTUSED = {
41         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
42         { APC_CONSTRAINED,       2,  2,  1,  4 }        /* (SIZE(1..4)) */,
43         0, 0    /* No PER value map */
44 };
45 static asn_oer_constraints_t asn_OER_memb_dynamic_constr_2 CC_NOTUSED = {
46         { 0, 0 },
47         -1      /* (SIZE(1..4)) */};
48 static asn_per_constraints_t asn_PER_memb_dynamic_constr_2 CC_NOTUSED = {
49         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
50         { APC_CONSTRAINED,       2,  2,  1,  4 }        /* (SIZE(1..4)) */,
51         0, 0    /* No PER value map */
52 };
53 static asn_oer_constraints_t asn_OER_type_CG_UCI_OnPUSCH_constr_1 CC_NOTUSED = {
54         { 0, 0 },
55         -1};
56 asn_per_constraints_t asn_PER_type_CG_UCI_OnPUSCH_constr_1 CC_NOTUSED = {
57         { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
58         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
59         0, 0    /* No PER value map */
60 };
61 static asn_TYPE_member_t asn_MBR_dynamic_2[] = {
62         { ATF_POINTER, 0, 0,
63                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
64                 0,
65                 &asn_DEF_BetaOffsets,
66                 0,
67                 { 0, 0, 0 },
68                 0, 0, /* No default value */
69                 ""
70                 },
71 };
72 static const ber_tlv_tag_t asn_DEF_dynamic_tags_2[] = {
73         (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
74         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
75 };
76 static asn_SET_OF_specifics_t asn_SPC_dynamic_specs_2 = {
77         sizeof(struct CG_UCI_OnPUSCH__dynamic),
78         offsetof(struct CG_UCI_OnPUSCH__dynamic, _asn_ctx),
79         0,      /* XER encoding is XMLDelimitedItemList */
80 };
81 static /* Use -fall-defs-global to expose */
82 asn_TYPE_descriptor_t asn_DEF_dynamic_2 = {
83         "dynamic",
84         "dynamic",
85         &asn_OP_SEQUENCE_OF,
86         asn_DEF_dynamic_tags_2,
87         sizeof(asn_DEF_dynamic_tags_2)
88                 /sizeof(asn_DEF_dynamic_tags_2[0]) - 1, /* 1 */
89         asn_DEF_dynamic_tags_2, /* Same as above */
90         sizeof(asn_DEF_dynamic_tags_2)
91                 /sizeof(asn_DEF_dynamic_tags_2[0]), /* 2 */
92         { &asn_OER_type_dynamic_constr_2, &asn_PER_type_dynamic_constr_2, SEQUENCE_OF_constraint },
93         asn_MBR_dynamic_2,
94         1,      /* Single element */
95         &asn_SPC_dynamic_specs_2        /* Additional specs */
96 };
97
98 asn_TYPE_member_t asn_MBR_CG_UCI_OnPUSCH_1[] = {
99         { ATF_POINTER, 0, offsetof(struct CG_UCI_OnPUSCH, choice.dynamic),
100                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
101                 0,
102                 &asn_DEF_dynamic_2,
103                 0,
104                 { &asn_OER_memb_dynamic_constr_2, &asn_PER_memb_dynamic_constr_2,  memb_dynamic_constraint_1 },
105                 0, 0, /* No default value */
106                 "dynamic"
107                 },
108         { ATF_POINTER, 0, offsetof(struct CG_UCI_OnPUSCH, choice.semiStatic),
109                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
110                 -1,     /* IMPLICIT tag at current level */
111                 &asn_DEF_BetaOffsets,
112                 0,
113                 { 0, 0, 0 },
114                 0, 0, /* No default value */
115                 "semiStatic"
116                 },
117 };
118 static const asn_TYPE_tag2member_t asn_MAP_CG_UCI_OnPUSCH_tag2el_1[] = {
119     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* dynamic */
120     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* semiStatic */
121 };
122 asn_CHOICE_specifics_t asn_SPC_CG_UCI_OnPUSCH_specs_1 = {
123         sizeof(struct CG_UCI_OnPUSCH),
124         offsetof(struct CG_UCI_OnPUSCH, _asn_ctx),
125         offsetof(struct CG_UCI_OnPUSCH, present),
126         sizeof(((struct CG_UCI_OnPUSCH *)0)->present),
127         asn_MAP_CG_UCI_OnPUSCH_tag2el_1,
128         2,      /* Count of tags in the map */
129         0, 0,
130         -1      /* Extensions start */
131 };
132 asn_TYPE_descriptor_t asn_DEF_CG_UCI_OnPUSCH = {
133         "CG-UCI-OnPUSCH",
134         "CG-UCI-OnPUSCH",
135         &asn_OP_CHOICE,
136         0,      /* No effective tags (pointer) */
137         0,      /* No effective tags (count) */
138         0,      /* No tags (pointer) */
139         0,      /* No tags (count) */
140         { &asn_OER_type_CG_UCI_OnPUSCH_constr_1, &asn_PER_type_CG_UCI_OnPUSCH_constr_1, CHOICE_constraint },
141         asn_MBR_CG_UCI_OnPUSCH_1,
142         2,      /* Elements count */
143         &asn_SPC_CG_UCI_OnPUSCH_specs_1 /* Additional specs */
144 };
145