Add version 0.5.0
[ric-plt/submgr.git] / e2ap / lib / CSIReportPerCSIProcess.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "X2AP-IEs"
4  *      found in "Spec/e2ap-v031ex.asn"
5  *      `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER`
6  */
7
8 #include "CSIReportPerCSIProcess.h"
9
10 #include "ProtocolExtensionContainer.h"
11 static int
12 memb_cSIProcessConfigurationIndex_constraint_2(const asn_TYPE_descriptor_t *td, const void *sptr,
13                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
14         long value;
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         value = *(const long *)sptr;
24         
25         if((value >= 1 && value <= 7)) {
26                 /* Constraint check succeeded */
27                 return 0;
28         } else {
29                 ASN__CTFAIL(app_key, td, sptr,
30                         "%s: constraint failed (%s:%d)",
31                         td->name, __FILE__, __LINE__);
32                 return -1;
33         }
34 }
35
36 static asn_oer_constraints_t asn_OER_memb_cSIProcessConfigurationIndex_constr_3 CC_NOTUSED = {
37         { 0, 0 },
38         -1};
39 static asn_per_constraints_t asn_PER_memb_cSIProcessConfigurationIndex_constr_3 CC_NOTUSED = {
40         { APC_CONSTRAINED | APC_EXTENSIBLE,  3,  3,  1,  7 }    /* (1..7,...) */,
41         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
42         0, 0    /* No PER value map */
43 };
44 static asn_oer_constraints_t asn_OER_type_CSIReportPerCSIProcess_constr_1 CC_NOTUSED = {
45         { 0, 0 },
46         -1      /* (SIZE(1..4)) */};
47 asn_per_constraints_t asn_PER_type_CSIReportPerCSIProcess_constr_1 CC_NOTUSED = {
48         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
49         { APC_CONSTRAINED,       2,  2,  1,  4 }        /* (SIZE(1..4)) */,
50         0, 0    /* No PER value map */
51 };
52 static asn_TYPE_member_t asn_MBR_Member_2[] = {
53         { ATF_NOFLAGS, 0, offsetof(struct CSIReportPerCSIProcess__Member, cSIProcessConfigurationIndex),
54                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
55                 -1,     /* IMPLICIT tag at current level */
56                 &asn_DEF_NativeInteger,
57                 0,
58                 { &asn_OER_memb_cSIProcessConfigurationIndex_constr_3, &asn_PER_memb_cSIProcessConfigurationIndex_constr_3,  memb_cSIProcessConfigurationIndex_constraint_2 },
59                 0, 0, /* No default value */
60                 "cSIProcessConfigurationIndex"
61                 },
62         { ATF_NOFLAGS, 0, offsetof(struct CSIReportPerCSIProcess__Member, cSIReportPerCSIProcessItem),
63                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
64                 -1,     /* IMPLICIT tag at current level */
65                 &asn_DEF_CSIReportPerCSIProcessItem,
66                 0,
67                 { 0, 0, 0 },
68                 0, 0, /* No default value */
69                 "cSIReportPerCSIProcessItem"
70                 },
71         { ATF_POINTER, 1, offsetof(struct CSIReportPerCSIProcess__Member, iE_Extensions),
72                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
73                 -1,     /* IMPLICIT tag at current level */
74                 &asn_DEF_ProtocolExtensionContainer_9566P129,
75                 0,
76                 { 0, 0, 0 },
77                 0, 0, /* No default value */
78                 "iE-Extensions"
79                 },
80 };
81 static const int asn_MAP_Member_oms_2[] = { 2 };
82 static const ber_tlv_tag_t asn_DEF_Member_tags_2[] = {
83         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
84 };
85 static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_2[] = {
86     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cSIProcessConfigurationIndex */
87     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cSIReportPerCSIProcessItem */
88     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */
89 };
90 static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_2 = {
91         sizeof(struct CSIReportPerCSIProcess__Member),
92         offsetof(struct CSIReportPerCSIProcess__Member, _asn_ctx),
93         asn_MAP_Member_tag2el_2,
94         3,      /* Count of tags in the map */
95         asn_MAP_Member_oms_2,   /* Optional members */
96         1, 0,   /* Root/Additions */
97         3,      /* First extension addition */
98 };
99 static /* Use -fall-defs-global to expose */
100 asn_TYPE_descriptor_t asn_DEF_Member_2 = {
101         "SEQUENCE",
102         "SEQUENCE",
103         &asn_OP_SEQUENCE,
104         asn_DEF_Member_tags_2,
105         sizeof(asn_DEF_Member_tags_2)
106                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
107         asn_DEF_Member_tags_2,  /* Same as above */
108         sizeof(asn_DEF_Member_tags_2)
109                 /sizeof(asn_DEF_Member_tags_2[0]), /* 1 */
110         { 0, 0, SEQUENCE_constraint },
111         asn_MBR_Member_2,
112         3,      /* Elements count */
113         &asn_SPC_Member_specs_2 /* Additional specs */
114 };
115
116 asn_TYPE_member_t asn_MBR_CSIReportPerCSIProcess_1[] = {
117         { ATF_POINTER, 0, 0,
118                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
119                 0,
120                 &asn_DEF_Member_2,
121                 0,
122                 { 0, 0, 0 },
123                 0, 0, /* No default value */
124                 ""
125                 },
126 };
127 static const ber_tlv_tag_t asn_DEF_CSIReportPerCSIProcess_tags_1[] = {
128         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
129 };
130 asn_SET_OF_specifics_t asn_SPC_CSIReportPerCSIProcess_specs_1 = {
131         sizeof(struct CSIReportPerCSIProcess),
132         offsetof(struct CSIReportPerCSIProcess, _asn_ctx),
133         0,      /* XER encoding is XMLDelimitedItemList */
134 };
135 asn_TYPE_descriptor_t asn_DEF_CSIReportPerCSIProcess = {
136         "CSIReportPerCSIProcess",
137         "CSIReportPerCSIProcess",
138         &asn_OP_SEQUENCE_OF,
139         asn_DEF_CSIReportPerCSIProcess_tags_1,
140         sizeof(asn_DEF_CSIReportPerCSIProcess_tags_1)
141                 /sizeof(asn_DEF_CSIReportPerCSIProcess_tags_1[0]), /* 1 */
142         asn_DEF_CSIReportPerCSIProcess_tags_1,  /* Same as above */
143         sizeof(asn_DEF_CSIReportPerCSIProcess_tags_1)
144                 /sizeof(asn_DEF_CSIReportPerCSIProcess_tags_1[0]), /* 1 */
145         { &asn_OER_type_CSIReportPerCSIProcess_constr_1, &asn_PER_type_CSIReportPerCSIProcess_constr_1, SEQUENCE_OF_constraint },
146         asn_MBR_CSIReportPerCSIProcess_1,
147         1,      /* Single element */
148         &asn_SPC_CSIReportPerCSIProcess_specs_1 /* Additional specs */
149 };
150