remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / GANSSEphemerisExtensionHeader.c
blob87e148061dd4febac0635da3387800d50c9c68f5
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 "GANSSEphemerisExtensionHeader.h"
10 static int
11 memb_validityPeriod_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 <= 8)) {
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_ephemerisExtensionDuration_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 <= 512)) {
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 asn_per_constraints_t asn_PER_memb_validityPeriod_constr_3 = {
61 { APC_CONSTRAINED, 3, 3, 1, 8 } /* (1..8) */,
62 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
63 0, 0 /* No PER value map */
65 static asn_per_constraints_t asn_PER_memb_ephemerisExtensionDuration_constr_4 = {
66 { APC_CONSTRAINED, 9, 9, 1, 512 } /* (1..512) */,
67 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
68 0, 0 /* No PER value map */
70 static asn_TYPE_member_t asn_MBR_GANSSEphemerisExtensionHeader_1[] = {
71 { ATF_NOFLAGS, 0, offsetof(struct GANSSEphemerisExtensionHeader, timeAtEstimation),
72 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
73 -1, /* IMPLICIT tag at current level */
74 &asn_DEF_GANSSEphemerisExtensionTime,
75 0, /* Defer constraints checking to the member type */
76 0, /* No PER visible constraints */
78 "timeAtEstimation"
80 { ATF_NOFLAGS, 0, offsetof(struct GANSSEphemerisExtensionHeader, validityPeriod),
81 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
82 -1, /* IMPLICIT tag at current level */
83 &asn_DEF_NativeInteger,
84 memb_validityPeriod_constraint_1,
85 &asn_PER_memb_validityPeriod_constr_3,
87 "validityPeriod"
89 { ATF_NOFLAGS, 0, offsetof(struct GANSSEphemerisExtensionHeader, ephemerisExtensionDuration),
90 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
91 -1, /* IMPLICIT tag at current level */
92 &asn_DEF_NativeInteger,
93 memb_ephemerisExtensionDuration_constraint_1,
94 &asn_PER_memb_ephemerisExtensionDuration_constr_4,
96 "ephemerisExtensionDuration"
99 static ber_tlv_tag_t asn_DEF_GANSSEphemerisExtensionHeader_tags_1[] = {
100 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
102 static asn_TYPE_tag2member_t asn_MAP_GANSSEphemerisExtensionHeader_tag2el_1[] = {
103 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* timeAtEstimation at 1687 */
104 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* validityPeriod at 1688 */
105 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ephemerisExtensionDuration at 1691 */
107 static asn_SEQUENCE_specifics_t asn_SPC_GANSSEphemerisExtensionHeader_specs_1 = {
108 sizeof(struct GANSSEphemerisExtensionHeader),
109 offsetof(struct GANSSEphemerisExtensionHeader, _asn_ctx),
110 asn_MAP_GANSSEphemerisExtensionHeader_tag2el_1,
111 3, /* Count of tags in the map */
112 0, 0, 0, /* Optional elements (not needed) */
113 2, /* Start extensions */
114 4 /* Stop extensions */
116 asn_TYPE_descriptor_t asn_DEF_GANSSEphemerisExtensionHeader = {
117 "GANSSEphemerisExtensionHeader",
118 "GANSSEphemerisExtensionHeader",
119 SEQUENCE_free,
120 SEQUENCE_print,
121 SEQUENCE_constraint,
122 SEQUENCE_decode_ber,
123 SEQUENCE_encode_der,
124 SEQUENCE_decode_xer,
125 SEQUENCE_encode_xer,
126 SEQUENCE_decode_uper,
127 SEQUENCE_encode_uper,
128 0, /* Use generic outmost tag fetcher */
129 asn_DEF_GANSSEphemerisExtensionHeader_tags_1,
130 sizeof(asn_DEF_GANSSEphemerisExtensionHeader_tags_1)
131 /sizeof(asn_DEF_GANSSEphemerisExtensionHeader_tags_1[0]), /* 1 */
132 asn_DEF_GANSSEphemerisExtensionHeader_tags_1, /* Same as above */
133 sizeof(asn_DEF_GANSSEphemerisExtensionHeader_tags_1)
134 /sizeof(asn_DEF_GANSSEphemerisExtensionHeader_tags_1[0]), /* 1 */
135 0, /* No PER visible constraints */
136 asn_MBR_GANSSEphemerisExtensionHeader_1,
137 3, /* Elements count */
138 &asn_SPC_GANSSEphemerisExtensionHeader_specs_1 /* Additional specs */