remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / GPSEphemerisExtensionTime.c
blob610d60adb7ee2122d05a87069f2add7eef263772
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 "GPSEphemerisExtensionTime.h"
10 static int
11 memb_gpsTOW_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 <= 604799)) {
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 asn_per_constraints_t asn_PER_memb_gpsTOW_constr_3 = {
36 { APC_CONSTRAINED, 20, -1, 0, 604799 } /* (0..604799) */,
37 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
38 0, 0 /* No PER value map */
40 static asn_TYPE_member_t asn_MBR_GPSEphemerisExtensionTime_1[] = {
41 { ATF_NOFLAGS, 0, offsetof(struct GPSEphemerisExtensionTime, gpsWeek),
42 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
43 -1, /* IMPLICIT tag at current level */
44 &asn_DEF_GPSWeek,
45 0, /* Defer constraints checking to the member type */
46 0, /* No PER visible constraints */
48 "gpsWeek"
50 { ATF_NOFLAGS, 0, offsetof(struct GPSEphemerisExtensionTime, gpsTOW),
51 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
52 -1, /* IMPLICIT tag at current level */
53 &asn_DEF_NativeInteger,
54 memb_gpsTOW_constraint_1,
55 &asn_PER_memb_gpsTOW_constr_3,
57 "gpsTOW"
60 static ber_tlv_tag_t asn_DEF_GPSEphemerisExtensionTime_tags_1[] = {
61 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
63 static asn_TYPE_tag2member_t asn_MAP_GPSEphemerisExtensionTime_tag2el_1[] = {
64 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gpsWeek at 1984 */
65 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* gpsTOW at 1985 */
67 static asn_SEQUENCE_specifics_t asn_SPC_GPSEphemerisExtensionTime_specs_1 = {
68 sizeof(struct GPSEphemerisExtensionTime),
69 offsetof(struct GPSEphemerisExtensionTime, _asn_ctx),
70 asn_MAP_GPSEphemerisExtensionTime_tag2el_1,
71 2, /* Count of tags in the map */
72 0, 0, 0, /* Optional elements (not needed) */
73 1, /* Start extensions */
74 3 /* Stop extensions */
76 asn_TYPE_descriptor_t asn_DEF_GPSEphemerisExtensionTime = {
77 "GPSEphemerisExtensionTime",
78 "GPSEphemerisExtensionTime",
79 SEQUENCE_free,
80 SEQUENCE_print,
81 SEQUENCE_constraint,
82 SEQUENCE_decode_ber,
83 SEQUENCE_encode_der,
84 SEQUENCE_decode_xer,
85 SEQUENCE_encode_xer,
86 SEQUENCE_decode_uper,
87 SEQUENCE_encode_uper,
88 0, /* Use generic outmost tag fetcher */
89 asn_DEF_GPSEphemerisExtensionTime_tags_1,
90 sizeof(asn_DEF_GPSEphemerisExtensionTime_tags_1)
91 /sizeof(asn_DEF_GPSEphemerisExtensionTime_tags_1[0]), /* 1 */
92 asn_DEF_GPSEphemerisExtensionTime_tags_1, /* Same as above */
93 sizeof(asn_DEF_GPSEphemerisExtensionTime_tags_1)
94 /sizeof(asn_DEF_GPSEphemerisExtensionTime_tags_1[0]), /* 1 */
95 0, /* No PER visible constraints */
96 asn_MBR_GPSEphemerisExtensionTime_1,
97 2, /* Elements count */
98 &asn_SPC_GPSEphemerisExtensionTime_specs_1 /* Additional specs */