41bf4797b6f78ca83c1bc312393edf122fde02e7
[ric-plt/submgr.git] / e2ap / lib / CSIReportPerCSIProcessItem.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "X2AP-IEs"
4  *      found in "X2AP-15-4-0.asn1"
5  *      `asn1c -D ./asn1_n1 -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example`
6  */
7
8 #include "CSIReportPerCSIProcessItem.h"
9
10 #include "SubbandCQIList.h"
11 #include "ProtocolExtensionContainer.h"
12 static int
13 memb_rI_constraint_2(const asn_TYPE_descriptor_t *td, const void *sptr,
14                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
15         long value;
16         
17         if(!sptr) {
18                 ASN__CTFAIL(app_key, td, sptr,
19                         "%s: value not given (%s:%d)",
20                         td->name, __FILE__, __LINE__);
21                 return -1;
22         }
23         
24         value = *(const long *)sptr;
25         
26         if((value >= 1 && value <= 8)) {
27                 /* Constraint check succeeded */
28                 return 0;
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_memb_rI_constr_3 CC_NOTUSED = {
38         { 0, 0 },
39         -1};
40 static asn_per_constraints_t asn_PER_memb_rI_constr_3 CC_NOTUSED = {
41         { APC_CONSTRAINED | APC_EXTENSIBLE,  3,  3,  1,  8 }    /* (1..8,...) */,
42         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
43         0, 0    /* No PER value map */
44 };
45 static asn_oer_constraints_t asn_OER_type_CSIReportPerCSIProcessItem_constr_1 CC_NOTUSED = {
46         { 0, 0 },
47         -1      /* (SIZE(1..2)) */};
48 asn_per_constraints_t asn_PER_type_CSIReportPerCSIProcessItem_constr_1 CC_NOTUSED = {
49         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
50         { APC_CONSTRAINED,       1,  1,  1,  2 }        /* (SIZE(1..2)) */,
51         0, 0    /* No PER value map */
52 };
53 static asn_TYPE_member_t asn_MBR_Member_2[] = {
54         { ATF_NOFLAGS, 0, offsetof(struct CSIReportPerCSIProcessItem__Member, rI),
55                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
56                 -1,     /* IMPLICIT tag at current level */
57                 &asn_DEF_NativeInteger,
58                 0,
59                 { &asn_OER_memb_rI_constr_3, &asn_PER_memb_rI_constr_3,  memb_rI_constraint_2 },
60                 0, 0, /* No default value */
61                 "rI"
62                 },
63         { ATF_NOFLAGS, 0, offsetof(struct CSIReportPerCSIProcessItem__Member, widebandCQI),
64                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
65                 -1,     /* IMPLICIT tag at current level */
66                 &asn_DEF_WidebandCQI,
67                 0,
68                 { 0, 0, 0 },
69                 0, 0, /* No default value */
70                 "widebandCQI"
71                 },
72         { ATF_NOFLAGS, 0, offsetof(struct CSIReportPerCSIProcessItem__Member, subbandSize),
73                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
74                 -1,     /* IMPLICIT tag at current level */
75                 &asn_DEF_SubbandSize,
76                 0,
77                 { 0, 0, 0 },
78                 0, 0, /* No default value */
79                 "subbandSize"
80                 },
81         { ATF_POINTER, 2, offsetof(struct CSIReportPerCSIProcessItem__Member, subbandCQIList),
82                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
83                 -1,     /* IMPLICIT tag at current level */
84                 &asn_DEF_SubbandCQIList,
85                 0,
86                 { 0, 0, 0 },
87                 0, 0, /* No default value */
88                 "subbandCQIList"
89                 },
90         { ATF_POINTER, 1, offsetof(struct CSIReportPerCSIProcessItem__Member, iE_Extensions),
91                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
92                 -1,     /* IMPLICIT tag at current level */
93                 &asn_DEF_ProtocolExtensionContainer_7683P130,
94                 0,
95                 { 0, 0, 0 },
96                 0, 0, /* No default value */
97                 "iE-Extensions"
98                 },
99 };
100 static const int asn_MAP_Member_oms_2[] = { 3, 4 };
101 static const ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
102         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
103 };
104 static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
105     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rI */
106     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* widebandCQI */
107     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* subbandSize */
108     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* subbandCQIList */
109     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */
110 };
111 static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
112         sizeof(struct CSIReportPerCSIProcessItem__Member),
113         offsetof(struct CSIReportPerCSIProcessItem__Member, _asn_ctx),
114         asn_MAP_Member_tag2el_2,
115         5,      /* Count of tags in the map */
116         asn_MAP_Member_oms_2,   /* Optional members */
117         2, 0,   /* Root/Additions */
118         5,      /* First extension addition */
119 };
120 static /* Use -fall-defs-global to expose */
121 asn_TYPE_descriptor_t asn_DEF_Member_2 = {
122         "SEQUENCE",
123         "SEQUENCE",
124         &asn_OP_SEQUENCE,
125         asn_DEF_Member_tags_2,
126         sizeof(asn_DEF_Member_tags_2)
127                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
128         asn_DEF_Member_tags_2,  /* Same as above */
129         sizeof(asn_DEF_Member_tags_2)
130                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
131         { 0, 0, SEQUENCE_constraint },
132         asn_MBR_Member_2,
133         5,      /* Elements count */
134         &asn_SPC_Member_specs_2 /* Additional specs */
135 };
136
137 asn_TYPE_member_t asn_MBR_CSIReportPerCSIProcessItem_1[] = {
138         { ATF_POINTER, 0, 0,
139                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
140                 0,
141                 &asn_DEF_Member_2,
142                 0,
143                 { 0, 0, 0 },
144                 0, 0, /* No default value */
145                 ""
146                 },
147 };
148 static const ber_tlv_tag_t asn_DEF_CSIReportPerCSIProcessItem_tags_1[] = {
149         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
150 };
151 asn_SET_OF_specifics_t asn_SPC_CSIReportPerCSIProcessItem_specs_1 = {
152         sizeof(struct CSIReportPerCSIProcessItem),
153         offsetof(struct CSIReportPerCSIProcessItem, _asn_ctx),
154         0,      /* XER encoding is XMLDelimitedItemList */
155 };
156 asn_TYPE_descriptor_t asn_DEF_CSIReportPerCSIProcessItem = {
157         "CSIReportPerCSIProcessItem",
158         "CSIReportPerCSIProcessItem",
159         &asn_OP_SEQUENCE_OF,
160         asn_DEF_CSIReportPerCSIProcessItem_tags_1,
161         sizeof(asn_DEF_CSIReportPerCSIProcessItem_tags_1)
162                 /sizeof(asn_DEF_CSIReportPerCSIProcessItem_tags_1[0]), /* 1 */
163         asn_DEF_CSIReportPerCSIProcessItem_tags_1,      /* Same as above */
164         sizeof(asn_DEF_CSIReportPerCSIProcessItem_tags_1)
165                 /sizeof(asn_DEF_CSIReportPerCSIProcessItem_tags_1[0]), /* 1 */
166         { &asn_OER_type_CSIReportPerCSIProcessItem_constr_1, &asn_PER_type_CSIReportPerCSIProcessItem_constr_1, SEQUENCE_OF_constraint },
167         asn_MBR_CSIReportPerCSIProcessItem_1,
168         1,      /* Single element */
169         &asn_SPC_CSIReportPerCSIProcessItem_specs_1     /* Additional specs */
170 };
171