remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / CdmaCellInformation.c
blob8883b1994952e393384251b899a034b6a8a879d8
1 /*
2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "ULP-Components"
4 * found in "../asn1src/ULP-Components.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
6 */
8 #include "CdmaCellInformation.h"
10 static int
11 memb_refNID_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 long value;
15 if(!sptr) {
16 _ASN_CTFAIL(app_key, td, sptr,
17 "%s: value not given (%s:%d)",
18 td->name, __FILE__, __LINE__);
19 return -1;
22 value = *(const long *)sptr;
24 if((value >= 0 && value <= 65535)) {
25 /* Constraint check succeeded */
26 return 0;
27 } else {
28 _ASN_CTFAIL(app_key, td, sptr,
29 "%s: constraint failed (%s:%d)",
30 td->name, __FILE__, __LINE__);
31 return -1;
35 static int
36 memb_refSID_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
37 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38 long value;
40 if(!sptr) {
41 _ASN_CTFAIL(app_key, td, sptr,
42 "%s: value not given (%s:%d)",
43 td->name, __FILE__, __LINE__);
44 return -1;
47 value = *(const long *)sptr;
49 if((value >= 0 && value <= 32767)) {
50 /* Constraint check succeeded */
51 return 0;
52 } else {
53 _ASN_CTFAIL(app_key, td, sptr,
54 "%s: constraint failed (%s:%d)",
55 td->name, __FILE__, __LINE__);
56 return -1;
60 static int
61 memb_refBASEID_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
62 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
63 long value;
65 if(!sptr) {
66 _ASN_CTFAIL(app_key, td, sptr,
67 "%s: value not given (%s:%d)",
68 td->name, __FILE__, __LINE__);
69 return -1;
72 value = *(const long *)sptr;
74 if((value >= 0 && value <= 65535)) {
75 /* Constraint check succeeded */
76 return 0;
77 } else {
78 _ASN_CTFAIL(app_key, td, sptr,
79 "%s: constraint failed (%s:%d)",
80 td->name, __FILE__, __LINE__);
81 return -1;
85 static int
86 memb_refBASELAT_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
87 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
88 long value;
90 if(!sptr) {
91 _ASN_CTFAIL(app_key, td, sptr,
92 "%s: value not given (%s:%d)",
93 td->name, __FILE__, __LINE__);
94 return -1;
97 value = *(const long *)sptr;
99 if((value >= 0 && value <= 4194303)) {
100 /* Constraint check succeeded */
101 return 0;
102 } else {
103 _ASN_CTFAIL(app_key, td, sptr,
104 "%s: constraint failed (%s:%d)",
105 td->name, __FILE__, __LINE__);
106 return -1;
110 static int
111 memb_reBASELONG_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
112 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
113 long value;
115 if(!sptr) {
116 _ASN_CTFAIL(app_key, td, sptr,
117 "%s: value not given (%s:%d)",
118 td->name, __FILE__, __LINE__);
119 return -1;
122 value = *(const long *)sptr;
124 if((value >= 0 && value <= 8388607)) {
125 /* Constraint check succeeded */
126 return 0;
127 } else {
128 _ASN_CTFAIL(app_key, td, sptr,
129 "%s: constraint failed (%s:%d)",
130 td->name, __FILE__, __LINE__);
131 return -1;
135 static int
136 memb_refREFPN_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
137 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
138 long value;
140 if(!sptr) {
141 _ASN_CTFAIL(app_key, td, sptr,
142 "%s: value not given (%s:%d)",
143 td->name, __FILE__, __LINE__);
144 return -1;
147 value = *(const long *)sptr;
149 if((value >= 0 && value <= 511)) {
150 /* Constraint check succeeded */
151 return 0;
152 } else {
153 _ASN_CTFAIL(app_key, td, sptr,
154 "%s: constraint failed (%s:%d)",
155 td->name, __FILE__, __LINE__);
156 return -1;
160 static int
161 memb_refWeekNumber_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
162 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
163 long value;
165 if(!sptr) {
166 _ASN_CTFAIL(app_key, td, sptr,
167 "%s: value not given (%s:%d)",
168 td->name, __FILE__, __LINE__);
169 return -1;
172 value = *(const long *)sptr;
174 if((value >= 0 && value <= 65535)) {
175 /* Constraint check succeeded */
176 return 0;
177 } else {
178 _ASN_CTFAIL(app_key, td, sptr,
179 "%s: constraint failed (%s:%d)",
180 td->name, __FILE__, __LINE__);
181 return -1;
185 static int
186 memb_refSeconds_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
187 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
188 long value;
190 if(!sptr) {
191 _ASN_CTFAIL(app_key, td, sptr,
192 "%s: value not given (%s:%d)",
193 td->name, __FILE__, __LINE__);
194 return -1;
197 value = *(const long *)sptr;
199 if((value >= 0 && value <= 4194303)) {
200 /* Constraint check succeeded */
201 return 0;
202 } else {
203 _ASN_CTFAIL(app_key, td, sptr,
204 "%s: constraint failed (%s:%d)",
205 td->name, __FILE__, __LINE__);
206 return -1;
210 static asn_per_constraints_t asn_PER_memb_refNID_constr_2 = {
211 { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */,
212 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
213 0, 0 /* No PER value map */
215 static asn_per_constraints_t asn_PER_memb_refSID_constr_3 = {
216 { APC_CONSTRAINED, 15, 15, 0, 32767 } /* (0..32767) */,
217 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
218 0, 0 /* No PER value map */
220 static asn_per_constraints_t asn_PER_memb_refBASEID_constr_4 = {
221 { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */,
222 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
223 0, 0 /* No PER value map */
225 static asn_per_constraints_t asn_PER_memb_refBASELAT_constr_5 = {
226 { APC_CONSTRAINED, 22, -1, 0, 4194303 } /* (0..4194303) */,
227 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
228 0, 0 /* No PER value map */
230 static asn_per_constraints_t asn_PER_memb_reBASELONG_constr_6 = {
231 { APC_CONSTRAINED, 23, -1, 0, 8388607 } /* (0..8388607) */,
232 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
233 0, 0 /* No PER value map */
235 static asn_per_constraints_t asn_PER_memb_refREFPN_constr_7 = {
236 { APC_CONSTRAINED, 9, 9, 0, 511 } /* (0..511) */,
237 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
238 0, 0 /* No PER value map */
240 static asn_per_constraints_t asn_PER_memb_refWeekNumber_constr_8 = {
241 { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */,
242 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
243 0, 0 /* No PER value map */
245 static asn_per_constraints_t asn_PER_memb_refSeconds_constr_9 = {
246 { APC_CONSTRAINED, 22, -1, 0, 4194303 } /* (0..4194303) */,
247 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
248 0, 0 /* No PER value map */
250 static asn_TYPE_member_t asn_MBR_CdmaCellInformation_1[] = {
251 { ATF_NOFLAGS, 0, offsetof(struct CdmaCellInformation, refNID),
252 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
253 -1, /* IMPLICIT tag at current level */
254 &asn_DEF_NativeInteger,
255 memb_refNID_constraint_1,
256 &asn_PER_memb_refNID_constr_2,
258 "refNID"
260 { ATF_NOFLAGS, 0, offsetof(struct CdmaCellInformation, refSID),
261 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
262 -1, /* IMPLICIT tag at current level */
263 &asn_DEF_NativeInteger,
264 memb_refSID_constraint_1,
265 &asn_PER_memb_refSID_constr_3,
267 "refSID"
269 { ATF_NOFLAGS, 0, offsetof(struct CdmaCellInformation, refBASEID),
270 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
271 -1, /* IMPLICIT tag at current level */
272 &asn_DEF_NativeInteger,
273 memb_refBASEID_constraint_1,
274 &asn_PER_memb_refBASEID_constr_4,
276 "refBASEID"
278 { ATF_NOFLAGS, 0, offsetof(struct CdmaCellInformation, refBASELAT),
279 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
280 -1, /* IMPLICIT tag at current level */
281 &asn_DEF_NativeInteger,
282 memb_refBASELAT_constraint_1,
283 &asn_PER_memb_refBASELAT_constr_5,
285 "refBASELAT"
287 { ATF_NOFLAGS, 0, offsetof(struct CdmaCellInformation, reBASELONG),
288 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
289 -1, /* IMPLICIT tag at current level */
290 &asn_DEF_NativeInteger,
291 memb_reBASELONG_constraint_1,
292 &asn_PER_memb_reBASELONG_constr_6,
294 "reBASELONG"
296 { ATF_NOFLAGS, 0, offsetof(struct CdmaCellInformation, refREFPN),
297 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
298 -1, /* IMPLICIT tag at current level */
299 &asn_DEF_NativeInteger,
300 memb_refREFPN_constraint_1,
301 &asn_PER_memb_refREFPN_constr_7,
303 "refREFPN"
305 { ATF_NOFLAGS, 0, offsetof(struct CdmaCellInformation, refWeekNumber),
306 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
307 -1, /* IMPLICIT tag at current level */
308 &asn_DEF_NativeInteger,
309 memb_refWeekNumber_constraint_1,
310 &asn_PER_memb_refWeekNumber_constr_8,
312 "refWeekNumber"
314 { ATF_NOFLAGS, 0, offsetof(struct CdmaCellInformation, refSeconds),
315 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
316 -1, /* IMPLICIT tag at current level */
317 &asn_DEF_NativeInteger,
318 memb_refSeconds_constraint_1,
319 &asn_PER_memb_refSeconds_constr_9,
321 "refSeconds"
324 static ber_tlv_tag_t asn_DEF_CdmaCellInformation_tags_1[] = {
325 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
327 static asn_TYPE_tag2member_t asn_MAP_CdmaCellInformation_tag2el_1[] = {
328 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* refNID at 90 */
329 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* refSID at 91 */
330 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* refBASEID at 92 */
331 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* refBASELAT at 93 */
332 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* reBASELONG at 94 */
333 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* refREFPN at 95 */
334 { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* refWeekNumber at 96 */
335 { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* refSeconds at 97 */
337 static asn_SEQUENCE_specifics_t asn_SPC_CdmaCellInformation_specs_1 = {
338 sizeof(struct CdmaCellInformation),
339 offsetof(struct CdmaCellInformation, _asn_ctx),
340 asn_MAP_CdmaCellInformation_tag2el_1,
341 8, /* Count of tags in the map */
342 0, 0, 0, /* Optional elements (not needed) */
343 7, /* Start extensions */
344 9 /* Stop extensions */
346 asn_TYPE_descriptor_t asn_DEF_CdmaCellInformation = {
347 "CdmaCellInformation",
348 "CdmaCellInformation",
349 SEQUENCE_free,
350 SEQUENCE_print,
351 SEQUENCE_constraint,
352 SEQUENCE_decode_ber,
353 SEQUENCE_encode_der,
354 SEQUENCE_decode_xer,
355 SEQUENCE_encode_xer,
356 SEQUENCE_decode_uper,
357 SEQUENCE_encode_uper,
358 0, /* Use generic outmost tag fetcher */
359 asn_DEF_CdmaCellInformation_tags_1,
360 sizeof(asn_DEF_CdmaCellInformation_tags_1)
361 /sizeof(asn_DEF_CdmaCellInformation_tags_1[0]), /* 1 */
362 asn_DEF_CdmaCellInformation_tags_1, /* Same as above */
363 sizeof(asn_DEF_CdmaCellInformation_tags_1)
364 /sizeof(asn_DEF_CdmaCellInformation_tags_1[0]), /* 1 */
365 0, /* No PER visible constraints */
366 asn_MBR_CdmaCellInformation_1,
367 8, /* Elements count */
368 &asn_SPC_CdmaCellInformation_specs_1 /* Additional specs */