ISSUE ID:- RICAPP-216
[ric-app/bouncer.git] / Bouncer / e2sm_kpm / lib / CellResourceReportListItem.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "E2SM-KPM-IEs"
4  *      found in "e2sm-kpm-v01.02.asn"
5  *      `asn1c -pdu=auto -fno-include-deps -fcompound-names -findirect-choice -gen-PER -gen-OER -no-gen-example`
6  */
7
8 #include "CellResourceReportListItem.h"
9
10 #include "ServedPlmnPerCellListItem.h"
11 static int
12 memb_dl_TotalofAvailablePRBs_constraint_1(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 >= 0 && value <= 273)) {
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 int
37 memb_ul_TotalofAvailablePRBs_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
38                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39         long value;
40         
41         if(!sptr) {
42                 ASN__CTFAIL(app_key, td, sptr,
43                         "%s: value not given (%s:%d)",
44                         td->name, __FILE__, __LINE__);
45                 return -1;
46         }
47         
48         value = *(const long *)sptr;
49         
50         if((value >= 0 && value <= 273)) {
51                 /* Constraint check succeeded */
52                 return 0;
53         } else {
54                 ASN__CTFAIL(app_key, td, sptr,
55                         "%s: constraint failed (%s:%d)",
56                         td->name, __FILE__, __LINE__);
57                 return -1;
58         }
59 }
60
61 static int
62 memb_servedPlmnPerCellList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
63                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
64         size_t size;
65         
66         if(!sptr) {
67                 ASN__CTFAIL(app_key, td, sptr,
68                         "%s: value not given (%s:%d)",
69                         td->name, __FILE__, __LINE__);
70                 return -1;
71         }
72         
73         /* Determine the number of elements */
74         size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
75         
76         if((size >= 1 && size <= 12)) {
77                 /* Perform validation of the inner elements */
78                 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
79         } else {
80                 ASN__CTFAIL(app_key, td, sptr,
81                         "%s: constraint failed (%s:%d)",
82                         td->name, __FILE__, __LINE__);
83                 return -1;
84         }
85 }
86
87 static asn_oer_constraints_t asn_OER_type_servedPlmnPerCellList_constr_5 CC_NOTUSED = {
88         { 0, 0 },
89         -1      /* (SIZE(1..12)) */};
90 static asn_per_constraints_t asn_PER_type_servedPlmnPerCellList_constr_5 CC_NOTUSED = {
91         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
92         { APC_CONSTRAINED,       4,  4,  1,  12 }       /* (SIZE(1..12)) */,
93         0, 0    /* No PER value map */
94 };
95 static asn_oer_constraints_t asn_OER_memb_dl_TotalofAvailablePRBs_constr_3 CC_NOTUSED = {
96         { 2, 1 }        /* (0..273) */,
97         -1};
98 static asn_per_constraints_t asn_PER_memb_dl_TotalofAvailablePRBs_constr_3 CC_NOTUSED = {
99         { APC_CONSTRAINED,       9,  9,  0,  273 }      /* (0..273) */,
100         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
101         0, 0    /* No PER value map */
102 };
103 static asn_oer_constraints_t asn_OER_memb_ul_TotalofAvailablePRBs_constr_4 CC_NOTUSED = {
104         { 2, 1 }        /* (0..273) */,
105         -1};
106 static asn_per_constraints_t asn_PER_memb_ul_TotalofAvailablePRBs_constr_4 CC_NOTUSED = {
107         { APC_CONSTRAINED,       9,  9,  0,  273 }      /* (0..273) */,
108         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
109         0, 0    /* No PER value map */
110 };
111 static asn_oer_constraints_t asn_OER_memb_servedPlmnPerCellList_constr_5 CC_NOTUSED = {
112         { 0, 0 },
113         -1      /* (SIZE(1..12)) */};
114 static asn_per_constraints_t asn_PER_memb_servedPlmnPerCellList_constr_5 CC_NOTUSED = {
115         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
116         { APC_CONSTRAINED,       4,  4,  1,  12 }       /* (SIZE(1..12)) */,
117         0, 0    /* No PER value map */
118 };
119 static asn_TYPE_member_t asn_MBR_servedPlmnPerCellList_5[] = {
120         { ATF_POINTER, 0, 0,
121                 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
122                 0,
123                 &asn_DEF_ServedPlmnPerCellListItem,
124                 0,
125                 { 0, 0, 0 },
126                 0, 0, /* No default value */
127                 ""
128                 },
129 };
130 static const ber_tlv_tag_t asn_DEF_servedPlmnPerCellList_tags_5[] = {
131         (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
132         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
133 };
134 static asn_SET_OF_specifics_t asn_SPC_servedPlmnPerCellList_specs_5 = {
135         sizeof(struct CellResourceReportListItem__servedPlmnPerCellList),
136         offsetof(struct CellResourceReportListItem__servedPlmnPerCellList, _asn_ctx),
137         0,      /* XER encoding is XMLDelimitedItemList */
138 };
139 static /* Use -fall-defs-global to expose */
140 asn_TYPE_descriptor_t asn_DEF_servedPlmnPerCellList_5 = {
141         "servedPlmnPerCellList",
142         "servedPlmnPerCellList",
143         &asn_OP_SEQUENCE_OF,
144         asn_DEF_servedPlmnPerCellList_tags_5,
145         sizeof(asn_DEF_servedPlmnPerCellList_tags_5)
146                 /sizeof(asn_DEF_servedPlmnPerCellList_tags_5[0]) - 1, /* 1 */
147         asn_DEF_servedPlmnPerCellList_tags_5,   /* Same as above */
148         sizeof(asn_DEF_servedPlmnPerCellList_tags_5)
149                 /sizeof(asn_DEF_servedPlmnPerCellList_tags_5[0]), /* 2 */
150         { &asn_OER_type_servedPlmnPerCellList_constr_5, &asn_PER_type_servedPlmnPerCellList_constr_5, SEQUENCE_OF_constraint },
151         asn_MBR_servedPlmnPerCellList_5,
152         1,      /* Single element */
153         &asn_SPC_servedPlmnPerCellList_specs_5  /* Additional specs */
154 };
155
156 asn_TYPE_member_t asn_MBR_CellResourceReportListItem_1[] = {
157         { ATF_NOFLAGS, 0, offsetof(struct CellResourceReportListItem, nRCGI),
158                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
159                 -1,     /* IMPLICIT tag at current level */
160                 &asn_DEF_NRCGI,
161                 0,
162                 { 0, 0, 0 },
163                 0, 0, /* No default value */
164                 "nRCGI"
165                 },
166         { ATF_POINTER, 2, offsetof(struct CellResourceReportListItem, dl_TotalofAvailablePRBs),
167                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
168                 -1,     /* IMPLICIT tag at current level */
169                 &asn_DEF_NativeInteger,
170                 0,
171                 { &asn_OER_memb_dl_TotalofAvailablePRBs_constr_3, &asn_PER_memb_dl_TotalofAvailablePRBs_constr_3,  memb_dl_TotalofAvailablePRBs_constraint_1 },
172                 0, 0, /* No default value */
173                 "dl-TotalofAvailablePRBs"
174                 },
175         { ATF_POINTER, 1, offsetof(struct CellResourceReportListItem, ul_TotalofAvailablePRBs),
176                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
177                 -1,     /* IMPLICIT tag at current level */
178                 &asn_DEF_NativeInteger,
179                 0,
180                 { &asn_OER_memb_ul_TotalofAvailablePRBs_constr_4, &asn_PER_memb_ul_TotalofAvailablePRBs_constr_4,  memb_ul_TotalofAvailablePRBs_constraint_1 },
181                 0, 0, /* No default value */
182                 "ul-TotalofAvailablePRBs"
183                 },
184         { ATF_NOFLAGS, 0, offsetof(struct CellResourceReportListItem, servedPlmnPerCellList),
185                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
186                 0,
187                 &asn_DEF_servedPlmnPerCellList_5,
188                 0,
189                 { &asn_OER_memb_servedPlmnPerCellList_constr_5, &asn_PER_memb_servedPlmnPerCellList_constr_5,  memb_servedPlmnPerCellList_constraint_1 },
190                 0, 0, /* No default value */
191                 "servedPlmnPerCellList"
192                 },
193 };
194 static const int asn_MAP_CellResourceReportListItem_oms_1[] = { 1, 2 };
195 static const ber_tlv_tag_t asn_DEF_CellResourceReportListItem_tags_1[] = {
196         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
197 };
198 static const asn_TYPE_tag2member_t asn_MAP_CellResourceReportListItem_tag2el_1[] = {
199     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nRCGI */
200     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dl-TotalofAvailablePRBs */
201     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ul-TotalofAvailablePRBs */
202     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* servedPlmnPerCellList */
203 };
204 asn_SEQUENCE_specifics_t asn_SPC_CellResourceReportListItem_specs_1 = {
205         sizeof(struct CellResourceReportListItem),
206         offsetof(struct CellResourceReportListItem, _asn_ctx),
207         asn_MAP_CellResourceReportListItem_tag2el_1,
208         4,      /* Count of tags in the map */
209         asn_MAP_CellResourceReportListItem_oms_1,       /* Optional members */
210         2, 0,   /* Root/Additions */
211         4,      /* First extension addition */
212 };
213 asn_TYPE_descriptor_t asn_DEF_CellResourceReportListItem = {
214         "CellResourceReportListItem",
215         "CellResourceReportListItem",
216         &asn_OP_SEQUENCE,
217         asn_DEF_CellResourceReportListItem_tags_1,
218         sizeof(asn_DEF_CellResourceReportListItem_tags_1)
219                 /sizeof(asn_DEF_CellResourceReportListItem_tags_1[0]), /* 1 */
220         asn_DEF_CellResourceReportListItem_tags_1,      /* Same as above */
221         sizeof(asn_DEF_CellResourceReportListItem_tags_1)
222                 /sizeof(asn_DEF_CellResourceReportListItem_tags_1[0]), /* 1 */
223         { 0, 0, SEQUENCE_constraint },
224         asn_MBR_CellResourceReportListItem_1,
225         4,      /* Elements count */
226         &asn_SPC_CellResourceReportListItem_specs_1     /* Additional specs */
227 };
228