remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / GPS-MsrElement.c
blobd05b57d5bbde8c3c2e20eb90eeec842210499ea1
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 "GPS-MsrElement.h"
10 static int
11 memb_cNo_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 <= 63)) {
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_doppler_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 >= -32768 && 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_wholeChips_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 <= 1022)) {
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_fracChips_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 <= 1024)) {
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_pseuRangeRMSErr_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 <= 63)) {
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 asn_per_constraints_t asn_PER_memb_cNo_constr_3 = {
136 { APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */,
137 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
138 0, 0 /* No PER value map */
140 static asn_per_constraints_t asn_PER_memb_doppler_constr_4 = {
141 { APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
142 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
143 0, 0 /* No PER value map */
145 static asn_per_constraints_t asn_PER_memb_wholeChips_constr_5 = {
146 { APC_CONSTRAINED, 10, 10, 0, 1022 } /* (0..1022) */,
147 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
148 0, 0 /* No PER value map */
150 static asn_per_constraints_t asn_PER_memb_fracChips_constr_6 = {
151 { APC_CONSTRAINED, 11, 11, 0, 1024 } /* (0..1024) */,
152 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
153 0, 0 /* No PER value map */
155 static asn_per_constraints_t asn_PER_memb_pseuRangeRMSErr_constr_8 = {
156 { APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */,
157 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
158 0, 0 /* No PER value map */
160 static asn_TYPE_member_t asn_MBR_GPS_MsrElement_1[] = {
161 { ATF_NOFLAGS, 0, offsetof(struct GPS_MsrElement, satelliteID),
162 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
163 -1, /* IMPLICIT tag at current level */
164 &asn_DEF_SatelliteID,
165 0, /* Defer constraints checking to the member type */
166 0, /* No PER visible constraints */
168 "satelliteID"
170 { ATF_NOFLAGS, 0, offsetof(struct GPS_MsrElement, cNo),
171 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
172 -1, /* IMPLICIT tag at current level */
173 &asn_DEF_NativeInteger,
174 memb_cNo_constraint_1,
175 &asn_PER_memb_cNo_constr_3,
177 "cNo"
179 { ATF_NOFLAGS, 0, offsetof(struct GPS_MsrElement, doppler),
180 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
181 -1, /* IMPLICIT tag at current level */
182 &asn_DEF_NativeInteger,
183 memb_doppler_constraint_1,
184 &asn_PER_memb_doppler_constr_4,
186 "doppler"
188 { ATF_NOFLAGS, 0, offsetof(struct GPS_MsrElement, wholeChips),
189 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
190 -1, /* IMPLICIT tag at current level */
191 &asn_DEF_NativeInteger,
192 memb_wholeChips_constraint_1,
193 &asn_PER_memb_wholeChips_constr_5,
195 "wholeChips"
197 { ATF_NOFLAGS, 0, offsetof(struct GPS_MsrElement, fracChips),
198 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
199 -1, /* IMPLICIT tag at current level */
200 &asn_DEF_NativeInteger,
201 memb_fracChips_constraint_1,
202 &asn_PER_memb_fracChips_constr_6,
204 "fracChips"
206 { ATF_NOFLAGS, 0, offsetof(struct GPS_MsrElement, mpathIndic),
207 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
208 -1, /* IMPLICIT tag at current level */
209 &asn_DEF_MpathIndic,
210 0, /* Defer constraints checking to the member type */
211 0, /* No PER visible constraints */
213 "mpathIndic"
215 { ATF_NOFLAGS, 0, offsetof(struct GPS_MsrElement, pseuRangeRMSErr),
216 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
217 -1, /* IMPLICIT tag at current level */
218 &asn_DEF_NativeInteger,
219 memb_pseuRangeRMSErr_constraint_1,
220 &asn_PER_memb_pseuRangeRMSErr_constr_8,
222 "pseuRangeRMSErr"
225 static ber_tlv_tag_t asn_DEF_GPS_MsrElement_tags_1[] = {
226 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
228 static asn_TYPE_tag2member_t asn_MAP_GPS_MsrElement_tag2el_1[] = {
229 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* satelliteID at 479 */
230 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cNo at 480 */
231 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* doppler at 481 */
232 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* wholeChips at 482 */
233 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* fracChips at 483 */
234 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* mpathIndic at 487 */
235 { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* pseuRangeRMSErr at 488 */
237 static asn_SEQUENCE_specifics_t asn_SPC_GPS_MsrElement_specs_1 = {
238 sizeof(struct GPS_MsrElement),
239 offsetof(struct GPS_MsrElement, _asn_ctx),
240 asn_MAP_GPS_MsrElement_tag2el_1,
241 7, /* Count of tags in the map */
242 0, 0, 0, /* Optional elements (not needed) */
243 -1, /* Start extensions */
244 -1 /* Stop extensions */
246 asn_TYPE_descriptor_t asn_DEF_GPS_MsrElement = {
247 "GPS-MsrElement",
248 "GPS-MsrElement",
249 SEQUENCE_free,
250 SEQUENCE_print,
251 SEQUENCE_constraint,
252 SEQUENCE_decode_ber,
253 SEQUENCE_encode_der,
254 SEQUENCE_decode_xer,
255 SEQUENCE_encode_xer,
256 SEQUENCE_decode_uper,
257 SEQUENCE_encode_uper,
258 0, /* Use generic outmost tag fetcher */
259 asn_DEF_GPS_MsrElement_tags_1,
260 sizeof(asn_DEF_GPS_MsrElement_tags_1)
261 /sizeof(asn_DEF_GPS_MsrElement_tags_1[0]), /* 1 */
262 asn_DEF_GPS_MsrElement_tags_1, /* Same as above */
263 sizeof(asn_DEF_GPS_MsrElement_tags_1)
264 /sizeof(asn_DEF_GPS_MsrElement_tags_1[0]), /* 1 */
265 0, /* No PER visible constraints */
266 asn_MBR_GPS_MsrElement_1,
267 7, /* Elements count */
268 &asn_SPC_GPS_MsrElement_specs_1 /* Additional specs */