remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / Almanac-GlonassAlmanacSet.c
blob88ac03e86b796a58277329df17b1952f74fcb3f9
1 /*
2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "RRLP-Components"
4 * found in "../asn1src/RRLP-Components.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
6 */
8 #include "Almanac-GlonassAlmanacSet.h"
10 static int
11 memb_gloAlmNA_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 >= 1 && value <= 1461)) {
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_gloAlmnA_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 >= 1 && value <= 24)) {
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_gloAlmHA_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 <= 31)) {
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_gloAlmLambdaA_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 >= -1048576 && value <= 1048575)) {
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_gloAlmtlambdaA_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 <= 2097151)) {
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_gloAlmDeltaIa_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 >= -131072 && value <= 131071)) {
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_gloAlmDeltaTA_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 >= -2097152 && value <= 2097151)) {
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_gloAlmDeltaTdotA_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 >= -64 && value <= 63)) {
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 int
211 memb_gloAlmEpsilonA_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
212 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
213 long value;
215 if(!sptr) {
216 _ASN_CTFAIL(app_key, td, sptr,
217 "%s: value not given (%s:%d)",
218 td->name, __FILE__, __LINE__);
219 return -1;
222 value = *(const long *)sptr;
224 if((value >= 0 && value <= 32767)) {
225 /* Constraint check succeeded */
226 return 0;
227 } else {
228 _ASN_CTFAIL(app_key, td, sptr,
229 "%s: constraint failed (%s:%d)",
230 td->name, __FILE__, __LINE__);
231 return -1;
235 static int
236 memb_gloAlmOmegaA_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
237 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
238 long value;
240 if(!sptr) {
241 _ASN_CTFAIL(app_key, td, sptr,
242 "%s: value not given (%s:%d)",
243 td->name, __FILE__, __LINE__);
244 return -1;
247 value = *(const long *)sptr;
249 if((value >= -32768 && value <= 32767)) {
250 /* Constraint check succeeded */
251 return 0;
252 } else {
253 _ASN_CTFAIL(app_key, td, sptr,
254 "%s: constraint failed (%s:%d)",
255 td->name, __FILE__, __LINE__);
256 return -1;
260 static int
261 memb_gloAlmTauA_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
262 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
263 long value;
265 if(!sptr) {
266 _ASN_CTFAIL(app_key, td, sptr,
267 "%s: value not given (%s:%d)",
268 td->name, __FILE__, __LINE__);
269 return -1;
272 value = *(const long *)sptr;
274 if((value >= -512 && value <= 511)) {
275 /* Constraint check succeeded */
276 return 0;
277 } else {
278 _ASN_CTFAIL(app_key, td, sptr,
279 "%s: constraint failed (%s:%d)",
280 td->name, __FILE__, __LINE__);
281 return -1;
285 static int
286 memb_gloAlmCA_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
287 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
288 long value;
290 if(!sptr) {
291 _ASN_CTFAIL(app_key, td, sptr,
292 "%s: value not given (%s:%d)",
293 td->name, __FILE__, __LINE__);
294 return -1;
297 value = *(const long *)sptr;
299 if((value >= 0 && value <= 1)) {
300 /* Constraint check succeeded */
301 return 0;
302 } else {
303 _ASN_CTFAIL(app_key, td, sptr,
304 "%s: constraint failed (%s:%d)",
305 td->name, __FILE__, __LINE__);
306 return -1;
310 static int
311 memb_gloAlmMA_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
312 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
313 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
314 size_t size;
316 if(!sptr) {
317 _ASN_CTFAIL(app_key, td, sptr,
318 "%s: value not given (%s:%d)",
319 td->name, __FILE__, __LINE__);
320 return -1;
323 if(st->size > 0) {
324 /* Size in bits */
325 size = 8 * st->size - (st->bits_unused & 0x07);
326 } else {
327 size = 0;
330 if((size == 2)) {
331 /* Constraint check succeeded */
332 return 0;
333 } else {
334 _ASN_CTFAIL(app_key, td, sptr,
335 "%s: constraint failed (%s:%d)",
336 td->name, __FILE__, __LINE__);
337 return -1;
341 static asn_per_constraints_t asn_PER_memb_gloAlmNA_constr_2 = {
342 { APC_CONSTRAINED, 11, 11, 1, 1461 } /* (1..1461) */,
343 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
344 0, 0 /* No PER value map */
346 static asn_per_constraints_t asn_PER_memb_gloAlmnA_constr_3 = {
347 { APC_CONSTRAINED, 5, 5, 1, 24 } /* (1..24) */,
348 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
349 0, 0 /* No PER value map */
351 static asn_per_constraints_t asn_PER_memb_gloAlmHA_constr_4 = {
352 { APC_CONSTRAINED, 5, 5, 0, 31 } /* (0..31) */,
353 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
354 0, 0 /* No PER value map */
356 static asn_per_constraints_t asn_PER_memb_gloAlmLambdaA_constr_5 = {
357 { APC_CONSTRAINED, 21, -1, -1048576, 1048575 } /* (-1048576..1048575) */,
358 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
359 0, 0 /* No PER value map */
361 static asn_per_constraints_t asn_PER_memb_gloAlmtlambdaA_constr_6 = {
362 { APC_CONSTRAINED, 21, -1, 0, 2097151 } /* (0..2097151) */,
363 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
364 0, 0 /* No PER value map */
366 static asn_per_constraints_t asn_PER_memb_gloAlmDeltaIa_constr_7 = {
367 { APC_CONSTRAINED, 18, -1, -131072, 131071 } /* (-131072..131071) */,
368 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
369 0, 0 /* No PER value map */
371 static asn_per_constraints_t asn_PER_memb_gloAlmDeltaTA_constr_8 = {
372 { APC_CONSTRAINED, 22, -1, -2097152, 2097151 } /* (-2097152..2097151) */,
373 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
374 0, 0 /* No PER value map */
376 static asn_per_constraints_t asn_PER_memb_gloAlmDeltaTdotA_constr_9 = {
377 { APC_CONSTRAINED, 7, 7, -64, 63 } /* (-64..63) */,
378 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
379 0, 0 /* No PER value map */
381 static asn_per_constraints_t asn_PER_memb_gloAlmEpsilonA_constr_10 = {
382 { APC_CONSTRAINED, 15, 15, 0, 32767 } /* (0..32767) */,
383 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
384 0, 0 /* No PER value map */
386 static asn_per_constraints_t asn_PER_memb_gloAlmOmegaA_constr_11 = {
387 { APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
388 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
389 0, 0 /* No PER value map */
391 static asn_per_constraints_t asn_PER_memb_gloAlmTauA_constr_12 = {
392 { APC_CONSTRAINED, 10, 10, -512, 511 } /* (-512..511) */,
393 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
394 0, 0 /* No PER value map */
396 static asn_per_constraints_t asn_PER_memb_gloAlmCA_constr_13 = {
397 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
398 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
399 0, 0 /* No PER value map */
401 static asn_per_constraints_t asn_PER_memb_gloAlmMA_constr_14 = {
402 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
403 { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */,
404 0, 0 /* No PER value map */
406 static asn_TYPE_member_t asn_MBR_Almanac_GlonassAlmanacSet_1[] = {
407 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmNA),
408 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
409 -1, /* IMPLICIT tag at current level */
410 &asn_DEF_NativeInteger,
411 memb_gloAlmNA_constraint_1,
412 &asn_PER_memb_gloAlmNA_constr_2,
414 "gloAlmNA"
416 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmnA),
417 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
418 -1, /* IMPLICIT tag at current level */
419 &asn_DEF_NativeInteger,
420 memb_gloAlmnA_constraint_1,
421 &asn_PER_memb_gloAlmnA_constr_3,
423 "gloAlmnA"
425 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmHA),
426 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
427 -1, /* IMPLICIT tag at current level */
428 &asn_DEF_NativeInteger,
429 memb_gloAlmHA_constraint_1,
430 &asn_PER_memb_gloAlmHA_constr_4,
432 "gloAlmHA"
434 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmLambdaA),
435 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
436 -1, /* IMPLICIT tag at current level */
437 &asn_DEF_NativeInteger,
438 memb_gloAlmLambdaA_constraint_1,
439 &asn_PER_memb_gloAlmLambdaA_constr_5,
441 "gloAlmLambdaA"
443 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmtlambdaA),
444 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
445 -1, /* IMPLICIT tag at current level */
446 &asn_DEF_NativeInteger,
447 memb_gloAlmtlambdaA_constraint_1,
448 &asn_PER_memb_gloAlmtlambdaA_constr_6,
450 "gloAlmtlambdaA"
452 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmDeltaIa),
453 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
454 -1, /* IMPLICIT tag at current level */
455 &asn_DEF_NativeInteger,
456 memb_gloAlmDeltaIa_constraint_1,
457 &asn_PER_memb_gloAlmDeltaIa_constr_7,
459 "gloAlmDeltaIa"
461 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmDeltaTA),
462 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
463 -1, /* IMPLICIT tag at current level */
464 &asn_DEF_NativeInteger,
465 memb_gloAlmDeltaTA_constraint_1,
466 &asn_PER_memb_gloAlmDeltaTA_constr_8,
468 "gloAlmDeltaTA"
470 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmDeltaTdotA),
471 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
472 -1, /* IMPLICIT tag at current level */
473 &asn_DEF_NativeInteger,
474 memb_gloAlmDeltaTdotA_constraint_1,
475 &asn_PER_memb_gloAlmDeltaTdotA_constr_9,
477 "gloAlmDeltaTdotA"
479 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmEpsilonA),
480 (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
481 -1, /* IMPLICIT tag at current level */
482 &asn_DEF_NativeInteger,
483 memb_gloAlmEpsilonA_constraint_1,
484 &asn_PER_memb_gloAlmEpsilonA_constr_10,
486 "gloAlmEpsilonA"
488 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmOmegaA),
489 (ASN_TAG_CLASS_CONTEXT | (9 << 2)),
490 -1, /* IMPLICIT tag at current level */
491 &asn_DEF_NativeInteger,
492 memb_gloAlmOmegaA_constraint_1,
493 &asn_PER_memb_gloAlmOmegaA_constr_11,
495 "gloAlmOmegaA"
497 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmTauA),
498 (ASN_TAG_CLASS_CONTEXT | (10 << 2)),
499 -1, /* IMPLICIT tag at current level */
500 &asn_DEF_NativeInteger,
501 memb_gloAlmTauA_constraint_1,
502 &asn_PER_memb_gloAlmTauA_constr_12,
504 "gloAlmTauA"
506 { ATF_NOFLAGS, 0, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmCA),
507 (ASN_TAG_CLASS_CONTEXT | (11 << 2)),
508 -1, /* IMPLICIT tag at current level */
509 &asn_DEF_NativeInteger,
510 memb_gloAlmCA_constraint_1,
511 &asn_PER_memb_gloAlmCA_constr_13,
513 "gloAlmCA"
515 { ATF_POINTER, 1, offsetof(struct Almanac_GlonassAlmanacSet, gloAlmMA),
516 (ASN_TAG_CLASS_CONTEXT | (12 << 2)),
517 -1, /* IMPLICIT tag at current level */
518 &asn_DEF_BIT_STRING,
519 memb_gloAlmMA_constraint_1,
520 &asn_PER_memb_gloAlmMA_constr_14,
522 "gloAlmMA"
525 static int asn_MAP_Almanac_GlonassAlmanacSet_oms_1[] = { 12 };
526 static ber_tlv_tag_t asn_DEF_Almanac_GlonassAlmanacSet_tags_1[] = {
527 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
529 static asn_TYPE_tag2member_t asn_MAP_Almanac_GlonassAlmanacSet_tag2el_1[] = {
530 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gloAlmNA at 1629 */
531 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gloAlmnA at 1630 */
532 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gloAlmHA at 1631 */
533 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gloAlmLambdaA at 1632 */
534 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* gloAlmtlambdaA at 1633 */
535 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* gloAlmDeltaIa at 1634 */
536 { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* gloAlmDeltaTA at 1635 */
537 { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* gloAlmDeltaTdotA at 1636 */
538 { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* gloAlmEpsilonA at 1637 */
539 { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* gloAlmOmegaA at 1638 */
540 { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* gloAlmTauA at 1639 */
541 { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* gloAlmCA at 1640 */
542 { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 } /* gloAlmMA at 1641 */
544 static asn_SEQUENCE_specifics_t asn_SPC_Almanac_GlonassAlmanacSet_specs_1 = {
545 sizeof(struct Almanac_GlonassAlmanacSet),
546 offsetof(struct Almanac_GlonassAlmanacSet, _asn_ctx),
547 asn_MAP_Almanac_GlonassAlmanacSet_tag2el_1,
548 13, /* Count of tags in the map */
549 asn_MAP_Almanac_GlonassAlmanacSet_oms_1, /* Optional members */
550 1, 0, /* Root/Additions */
551 -1, /* Start extensions */
552 -1 /* Stop extensions */
554 asn_TYPE_descriptor_t asn_DEF_Almanac_GlonassAlmanacSet = {
555 "Almanac-GlonassAlmanacSet",
556 "Almanac-GlonassAlmanacSet",
557 SEQUENCE_free,
558 SEQUENCE_print,
559 SEQUENCE_constraint,
560 SEQUENCE_decode_ber,
561 SEQUENCE_encode_der,
562 SEQUENCE_decode_xer,
563 SEQUENCE_encode_xer,
564 SEQUENCE_decode_uper,
565 SEQUENCE_encode_uper,
566 0, /* Use generic outmost tag fetcher */
567 asn_DEF_Almanac_GlonassAlmanacSet_tags_1,
568 sizeof(asn_DEF_Almanac_GlonassAlmanacSet_tags_1)
569 /sizeof(asn_DEF_Almanac_GlonassAlmanacSet_tags_1[0]), /* 1 */
570 asn_DEF_Almanac_GlonassAlmanacSet_tags_1, /* Same as above */
571 sizeof(asn_DEF_Almanac_GlonassAlmanacSet_tags_1)
572 /sizeof(asn_DEF_Almanac_GlonassAlmanacSet_tags_1[0]), /* 1 */
573 0, /* No PER visible constraints */
574 asn_MBR_Almanac_GlonassAlmanacSet_1,
575 13, /* Elements count */
576 &asn_SPC_Almanac_GlonassAlmanacSet_specs_1 /* Additional specs */