remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / GLONASSclockModel.c
blob8f8c52e32ad8d807334deabf49c2cf9d62b69cdf
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 "GLONASSclockModel.h"
10 static int
11 memb_gloTau_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 >= -2097152 && value <= 2097151)) {
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_gloGamma_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 >= -1024 && value <= 1023)) {
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_gloDeltaTau_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 >= -16 && value <= 15)) {
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 asn_per_constraints_t asn_PER_memb_gloTau_constr_2 = {
86 { APC_CONSTRAINED, 22, -1, -2097152, 2097151 } /* (-2097152..2097151) */,
87 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
88 0, 0 /* No PER value map */
90 static asn_per_constraints_t asn_PER_memb_gloGamma_constr_3 = {
91 { APC_CONSTRAINED, 11, 11, -1024, 1023 } /* (-1024..1023) */,
92 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
93 0, 0 /* No PER value map */
95 static asn_per_constraints_t asn_PER_memb_gloDeltaTau_constr_4 = {
96 { APC_CONSTRAINED, 5, 5, -16, 15 } /* (-16..15) */,
97 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
98 0, 0 /* No PER value map */
100 static asn_TYPE_member_t asn_MBR_GLONASSclockModel_1[] = {
101 { ATF_NOFLAGS, 0, offsetof(struct GLONASSclockModel, gloTau),
102 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
103 -1, /* IMPLICIT tag at current level */
104 &asn_DEF_NativeInteger,
105 memb_gloTau_constraint_1,
106 &asn_PER_memb_gloTau_constr_2,
108 "gloTau"
110 { ATF_NOFLAGS, 0, offsetof(struct GLONASSclockModel, gloGamma),
111 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
112 -1, /* IMPLICIT tag at current level */
113 &asn_DEF_NativeInteger,
114 memb_gloGamma_constraint_1,
115 &asn_PER_memb_gloGamma_constr_3,
117 "gloGamma"
119 { ATF_POINTER, 1, offsetof(struct GLONASSclockModel, gloDeltaTau),
120 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
121 -1, /* IMPLICIT tag at current level */
122 &asn_DEF_NativeInteger,
123 memb_gloDeltaTau_constraint_1,
124 &asn_PER_memb_gloDeltaTau_constr_4,
126 "gloDeltaTau"
129 static int asn_MAP_GLONASSclockModel_oms_1[] = { 2 };
130 static ber_tlv_tag_t asn_DEF_GLONASSclockModel_tags_1[] = {
131 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
133 static asn_TYPE_tag2member_t asn_MAP_GLONASSclockModel_tag2el_1[] = {
134 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gloTau at 1457 */
135 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gloGamma at 1458 */
136 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gloDeltaTau at 1459 */
138 static asn_SEQUENCE_specifics_t asn_SPC_GLONASSclockModel_specs_1 = {
139 sizeof(struct GLONASSclockModel),
140 offsetof(struct GLONASSclockModel, _asn_ctx),
141 asn_MAP_GLONASSclockModel_tag2el_1,
142 3, /* Count of tags in the map */
143 asn_MAP_GLONASSclockModel_oms_1, /* Optional members */
144 1, 0, /* Root/Additions */
145 -1, /* Start extensions */
146 -1 /* Stop extensions */
148 asn_TYPE_descriptor_t asn_DEF_GLONASSclockModel = {
149 "GLONASSclockModel",
150 "GLONASSclockModel",
151 SEQUENCE_free,
152 SEQUENCE_print,
153 SEQUENCE_constraint,
154 SEQUENCE_decode_ber,
155 SEQUENCE_encode_der,
156 SEQUENCE_decode_xer,
157 SEQUENCE_encode_xer,
158 SEQUENCE_decode_uper,
159 SEQUENCE_encode_uper,
160 0, /* Use generic outmost tag fetcher */
161 asn_DEF_GLONASSclockModel_tags_1,
162 sizeof(asn_DEF_GLONASSclockModel_tags_1)
163 /sizeof(asn_DEF_GLONASSclockModel_tags_1[0]), /* 1 */
164 asn_DEF_GLONASSclockModel_tags_1, /* Same as above */
165 sizeof(asn_DEF_GLONASSclockModel_tags_1)
166 /sizeof(asn_DEF_GLONASSclockModel_tags_1[0]), /* 1 */
167 0, /* No PER visible constraints */
168 asn_MBR_GLONASSclockModel_1,
169 3, /* Elements count */
170 &asn_SPC_GLONASSclockModel_specs_1 /* Additional specs */