ISSUE ID:- RICAPP-216
[ric-app/bouncer.git] / Bouncer / e2sm_rc / lib / NeighborCell-Item-Choice-E-UTRA.c
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "E2SM-RC-IEs"
4  *      found in "e2sm_rc.asn"
5  *      `asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example`
6  */
7
8 #include "NeighborCell-Item-Choice-E-UTRA.h"
9
10 /*
11  * This type is implemented using NativeEnumerated,
12  * so here we adjust the DEF accordingly.
13  */
14 /*
15  * This type is implemented using NativeEnumerated,
16  * so here we adjust the DEF accordingly.
17  */
18 static int
19 memb_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
20                         asn_app_constraint_failed_f *ctfailcb, void *app_key) {
21         long value;
22         
23         if(!sptr) {
24                 ASN__CTFAIL(app_key, td, sptr,
25                         "%s: value not given (%s:%d)",
26                         td->name, __FILE__, __LINE__);
27                 return -1;
28         }
29         
30         value = *(const long *)sptr;
31         
32         if((value >= 1 && value <= 65535)) {
33                 /* Constraint check succeeded */
34                 return 0;
35         } else {
36                 ASN__CTFAIL(app_key, td, sptr,
37                         "%s: constraint failed (%s:%d)",
38                         td->name, __FILE__, __LINE__);
39                 return -1;
40         }
41 }
42
43 static asn_oer_constraints_t asn_OER_type_x2_Xn_established_constr_6 CC_NOTUSED = {
44         { 0, 0 },
45         -1};
46 static asn_per_constraints_t asn_PER_type_x2_Xn_established_constr_6 CC_NOTUSED = {
47         { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }    /* (0..1,...) */,
48         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
49         0, 0    /* No PER value map */
50 };
51 static asn_oer_constraints_t asn_OER_type_hO_validated_constr_10 CC_NOTUSED = {
52         { 0, 0 },
53         -1};
54 static asn_per_constraints_t asn_PER_type_hO_validated_constr_10 CC_NOTUSED = {
55         { APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }    /* (0..1,...) */,
56         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
57         0, 0    /* No PER value map */
58 };
59 static asn_oer_constraints_t asn_OER_memb_version_constr_14 CC_NOTUSED = {
60         { 0, 0 },
61         -1};
62 static asn_per_constraints_t asn_PER_memb_version_constr_14 CC_NOTUSED = {
63         { APC_CONSTRAINED | APC_EXTENSIBLE,  16,  16,  1,  65535 }      /* (1..65535,...) */,
64         { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
65         0, 0    /* No PER value map */
66 };
67 static const asn_INTEGER_enum_map_t asn_MAP_x2_Xn_established_value2enum_6[] = {
68         { 0,    4,      "true" },
69         { 1,    5,      "false" }
70         /* This list is extensible */
71 };
72 static const unsigned int asn_MAP_x2_Xn_established_enum2value_6[] = {
73         1,      /* false(1) */
74         0       /* true(0) */
75         /* This list is extensible */
76 };
77 static const asn_INTEGER_specifics_t asn_SPC_x2_Xn_established_specs_6 = {
78         asn_MAP_x2_Xn_established_value2enum_6, /* "tag" => N; sorted by tag */
79         asn_MAP_x2_Xn_established_enum2value_6, /* N => "tag"; sorted by N */
80         2,      /* Number of elements in the maps */
81         3,      /* Extensions before this member */
82         1,      /* Strict enumeration */
83         0,      /* Native long size */
84         0
85 };
86 static const ber_tlv_tag_t asn_DEF_x2_Xn_established_tags_6[] = {
87         (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
88         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
89 };
90 static /* Use -fall-defs-global to expose */
91 asn_TYPE_descriptor_t asn_DEF_x2_Xn_established_6 = {
92         "x2-Xn-established",
93         "x2-Xn-established",
94         &asn_OP_NativeEnumerated,
95         asn_DEF_x2_Xn_established_tags_6,
96         sizeof(asn_DEF_x2_Xn_established_tags_6)
97                 /sizeof(asn_DEF_x2_Xn_established_tags_6[0]) - 1, /* 1 */
98         asn_DEF_x2_Xn_established_tags_6,       /* Same as above */
99         sizeof(asn_DEF_x2_Xn_established_tags_6)
100                 /sizeof(asn_DEF_x2_Xn_established_tags_6[0]), /* 2 */
101         { &asn_OER_type_x2_Xn_established_constr_6, &asn_PER_type_x2_Xn_established_constr_6, NativeEnumerated_constraint },
102         0, 0,   /* Defined elsewhere */
103         &asn_SPC_x2_Xn_established_specs_6      /* Additional specs */
104 };
105
106 static const asn_INTEGER_enum_map_t asn_MAP_hO_validated_value2enum_10[] = {
107         { 0,    4,      "true" },
108         { 1,    5,      "false" }
109         /* This list is extensible */
110 };
111 static const unsigned int asn_MAP_hO_validated_enum2value_10[] = {
112         1,      /* false(1) */
113         0       /* true(0) */
114         /* This list is extensible */
115 };
116 static const asn_INTEGER_specifics_t asn_SPC_hO_validated_specs_10 = {
117         asn_MAP_hO_validated_value2enum_10,     /* "tag" => N; sorted by tag */
118         asn_MAP_hO_validated_enum2value_10,     /* N => "tag"; sorted by N */
119         2,      /* Number of elements in the maps */
120         3,      /* Extensions before this member */
121         1,      /* Strict enumeration */
122         0,      /* Native long size */
123         0
124 };
125 static const ber_tlv_tag_t asn_DEF_hO_validated_tags_10[] = {
126         (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
127         (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
128 };
129 static /* Use -fall-defs-global to expose */
130 asn_TYPE_descriptor_t asn_DEF_hO_validated_10 = {
131         "hO-validated",
132         "hO-validated",
133         &asn_OP_NativeEnumerated,
134         asn_DEF_hO_validated_tags_10,
135         sizeof(asn_DEF_hO_validated_tags_10)
136                 /sizeof(asn_DEF_hO_validated_tags_10[0]) - 1, /* 1 */
137         asn_DEF_hO_validated_tags_10,   /* Same as above */
138         sizeof(asn_DEF_hO_validated_tags_10)
139                 /sizeof(asn_DEF_hO_validated_tags_10[0]), /* 2 */
140         { &asn_OER_type_hO_validated_constr_10, &asn_PER_type_hO_validated_constr_10, NativeEnumerated_constraint },
141         0, 0,   /* Defined elsewhere */
142         &asn_SPC_hO_validated_specs_10  /* Additional specs */
143 };
144
145 asn_TYPE_member_t asn_MBR_NeighborCell_Item_Choice_E_UTRA_1[] = {
146         { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, eUTRA_CGI),
147                 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
148                 -1,     /* IMPLICIT tag at current level */
149                 &asn_DEF_EUTRA_CGI,
150                 0,
151                 { 0, 0, 0 },
152                 0, 0, /* No default value */
153                 "eUTRA-CGI"
154                 },
155         { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, eUTRA_PCI),
156                 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
157                 -1,     /* IMPLICIT tag at current level */
158                 &asn_DEF_E_UTRA_PCI,
159                 0,
160                 { 0, 0, 0 },
161                 0, 0, /* No default value */
162                 "eUTRA-PCI"
163                 },
164         { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, eUTRA_ARFCN),
165                 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
166                 -1,     /* IMPLICIT tag at current level */
167                 &asn_DEF_E_UTRA_ARFCN,
168                 0,
169                 { 0, 0, 0 },
170                 0, 0, /* No default value */
171                 "eUTRA-ARFCN"
172                 },
173         { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, eUTRA_TAC),
174                 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
175                 -1,     /* IMPLICIT tag at current level */
176                 &asn_DEF_E_UTRA_TAC,
177                 0,
178                 { 0, 0, 0 },
179                 0, 0, /* No default value */
180                 "eUTRA-TAC"
181                 },
182         { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, x2_Xn_established),
183                 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
184                 -1,     /* IMPLICIT tag at current level */
185                 &asn_DEF_x2_Xn_established_6,
186                 0,
187                 { 0, 0, 0 },
188                 0, 0, /* No default value */
189                 "x2-Xn-established"
190                 },
191         { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, hO_validated),
192                 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
193                 -1,     /* IMPLICIT tag at current level */
194                 &asn_DEF_hO_validated_10,
195                 0,
196                 { 0, 0, 0 },
197                 0, 0, /* No default value */
198                 "hO-validated"
199                 },
200         { ATF_NOFLAGS, 0, offsetof(struct NeighborCell_Item_Choice_E_UTRA, version),
201                 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
202                 -1,     /* IMPLICIT tag at current level */
203                 &asn_DEF_NativeInteger,
204                 0,
205                 { &asn_OER_memb_version_constr_14, &asn_PER_memb_version_constr_14,  memb_version_constraint_1 },
206                 0, 0, /* No default value */
207                 "version"
208                 },
209 };
210 static const ber_tlv_tag_t asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1[] = {
211         (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
212 };
213 static const asn_TYPE_tag2member_t asn_MAP_NeighborCell_Item_Choice_E_UTRA_tag2el_1[] = {
214     { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eUTRA-CGI */
215     { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eUTRA-PCI */
216     { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* eUTRA-ARFCN */
217     { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* eUTRA-TAC */
218     { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* x2-Xn-established */
219     { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* hO-validated */
220     { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* version */
221 };
222 asn_SEQUENCE_specifics_t asn_SPC_NeighborCell_Item_Choice_E_UTRA_specs_1 = {
223         sizeof(struct NeighborCell_Item_Choice_E_UTRA),
224         offsetof(struct NeighborCell_Item_Choice_E_UTRA, _asn_ctx),
225         asn_MAP_NeighborCell_Item_Choice_E_UTRA_tag2el_1,
226         7,      /* Count of tags in the map */
227         0, 0, 0,        /* Optional elements (not needed) */
228         7,      /* First extension addition */
229 };
230 asn_TYPE_descriptor_t asn_DEF_NeighborCell_Item_Choice_E_UTRA = {
231         "NeighborCell-Item-Choice-E-UTRA",
232         "NeighborCell-Item-Choice-E-UTRA",
233         &asn_OP_SEQUENCE,
234         asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1,
235         sizeof(asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1)
236                 /sizeof(asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1[0]), /* 1 */
237         asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1, /* Same as above */
238         sizeof(asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1)
239                 /sizeof(asn_DEF_NeighborCell_Item_Choice_E_UTRA_tags_1[0]), /* 1 */
240         { 0, 0, SEQUENCE_constraint },
241         asn_MBR_NeighborCell_Item_Choice_E_UTRA_1,
242         7,      /* Elements count */
243         &asn_SPC_NeighborCell_Item_Choice_E_UTRA_specs_1        /* Additional specs */
244 };
245