remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / GANSS-SgnElement.c
blob9f2a3e4912ad4917fd5682453a78fb8138cac652
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 "GANSS-SgnElement.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_carrierQualityInd_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 >= 0 && value <= 3)) {
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_codePhase_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 <= 2097151)) {
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_integerCodePhase_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 <= 127)) {
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_codePhaseRMSError_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 int
136 memb_doppler_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 >= -32768 && value <= 32767)) {
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_adr_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 >= 0 && value <= 33554431)) {
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 asn_per_constraints_t asn_PER_memb_cNo_constr_3 = {
186 { APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */,
187 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
188 0, 0 /* No PER value map */
190 static asn_per_constraints_t asn_PER_memb_carrierQualityInd_constr_5 = {
191 { APC_CONSTRAINED, 2, 2, 0, 3 } /* (0..3) */,
192 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
193 0, 0 /* No PER value map */
195 static asn_per_constraints_t asn_PER_memb_codePhase_constr_6 = {
196 { APC_CONSTRAINED, 21, -1, 0, 2097151 } /* (0..2097151) */,
197 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
198 0, 0 /* No PER value map */
200 static asn_per_constraints_t asn_PER_memb_integerCodePhase_constr_7 = {
201 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
202 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
203 0, 0 /* No PER value map */
205 static asn_per_constraints_t asn_PER_memb_codePhaseRMSError_constr_8 = {
206 { APC_CONSTRAINED, 6, 6, 0, 63 } /* (0..63) */,
207 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
208 0, 0 /* No PER value map */
210 static asn_per_constraints_t asn_PER_memb_doppler_constr_9 = {
211 { APC_CONSTRAINED, 16, 16, -32768, 32767 } /* (-32768..32767) */,
212 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
213 0, 0 /* No PER value map */
215 static asn_per_constraints_t asn_PER_memb_adr_constr_10 = {
216 { APC_CONSTRAINED, 25, -1, 0, 33554431 } /* (0..33554431) */,
217 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
218 0, 0 /* No PER value map */
220 static asn_TYPE_member_t asn_MBR_GANSS_SgnElement_1[] = {
221 { ATF_NOFLAGS, 0, offsetof(struct GANSS_SgnElement, svID),
222 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
223 -1, /* IMPLICIT tag at current level */
224 &asn_DEF_SVID,
225 0, /* Defer constraints checking to the member type */
226 0, /* No PER visible constraints */
228 "svID"
230 { ATF_NOFLAGS, 0, offsetof(struct GANSS_SgnElement, cNo),
231 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
232 -1, /* IMPLICIT tag at current level */
233 &asn_DEF_NativeInteger,
234 memb_cNo_constraint_1,
235 &asn_PER_memb_cNo_constr_3,
237 "cNo"
239 { ATF_NOFLAGS, 0, offsetof(struct GANSS_SgnElement, mpathDet),
240 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
241 -1, /* IMPLICIT tag at current level */
242 &asn_DEF_MpathIndic,
243 0, /* Defer constraints checking to the member type */
244 0, /* No PER visible constraints */
246 "mpathDet"
248 { ATF_POINTER, 1, offsetof(struct GANSS_SgnElement, carrierQualityInd),
249 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
250 -1, /* IMPLICIT tag at current level */
251 &asn_DEF_NativeInteger,
252 memb_carrierQualityInd_constraint_1,
253 &asn_PER_memb_carrierQualityInd_constr_5,
255 "carrierQualityInd"
257 { ATF_NOFLAGS, 0, offsetof(struct GANSS_SgnElement, codePhase),
258 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
259 -1, /* IMPLICIT tag at current level */
260 &asn_DEF_NativeInteger,
261 memb_codePhase_constraint_1,
262 &asn_PER_memb_codePhase_constr_6,
264 "codePhase"
266 { ATF_POINTER, 1, offsetof(struct GANSS_SgnElement, integerCodePhase),
267 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
268 -1, /* IMPLICIT tag at current level */
269 &asn_DEF_NativeInteger,
270 memb_integerCodePhase_constraint_1,
271 &asn_PER_memb_integerCodePhase_constr_7,
273 "integerCodePhase"
275 { ATF_NOFLAGS, 0, offsetof(struct GANSS_SgnElement, codePhaseRMSError),
276 (ASN_TAG_CLASS_CONTEXT | (6 << 2)),
277 -1, /* IMPLICIT tag at current level */
278 &asn_DEF_NativeInteger,
279 memb_codePhaseRMSError_constraint_1,
280 &asn_PER_memb_codePhaseRMSError_constr_8,
282 "codePhaseRMSError"
284 { ATF_POINTER, 2, offsetof(struct GANSS_SgnElement, doppler),
285 (ASN_TAG_CLASS_CONTEXT | (7 << 2)),
286 -1, /* IMPLICIT tag at current level */
287 &asn_DEF_NativeInteger,
288 memb_doppler_constraint_1,
289 &asn_PER_memb_doppler_constr_9,
291 "doppler"
293 { ATF_POINTER, 1, offsetof(struct GANSS_SgnElement, adr),
294 (ASN_TAG_CLASS_CONTEXT | (8 << 2)),
295 -1, /* IMPLICIT tag at current level */
296 &asn_DEF_NativeInteger,
297 memb_adr_constraint_1,
298 &asn_PER_memb_adr_constr_10,
300 "adr"
303 static int asn_MAP_GANSS_SgnElement_oms_1[] = { 3, 5, 7, 8 };
304 static ber_tlv_tag_t asn_DEF_GANSS_SgnElement_tags_1[] = {
305 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
307 static asn_TYPE_tag2member_t asn_MAP_GANSS_SgnElement_tag2el_1[] = {
308 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* svID at 2233 */
309 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cNo at 2234 */
310 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* mpathDet at 2235 */
311 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* carrierQualityInd at 2236 */
312 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* codePhase at 2237 */
313 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* integerCodePhase at 2238 */
314 { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* codePhaseRMSError at 2239 */
315 { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* doppler at 2240 */
316 { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 } /* adr at 2241 */
318 static asn_SEQUENCE_specifics_t asn_SPC_GANSS_SgnElement_specs_1 = {
319 sizeof(struct GANSS_SgnElement),
320 offsetof(struct GANSS_SgnElement, _asn_ctx),
321 asn_MAP_GANSS_SgnElement_tag2el_1,
322 9, /* Count of tags in the map */
323 asn_MAP_GANSS_SgnElement_oms_1, /* Optional members */
324 4, 0, /* Root/Additions */
325 -1, /* Start extensions */
326 -1 /* Stop extensions */
328 asn_TYPE_descriptor_t asn_DEF_GANSS_SgnElement = {
329 "GANSS-SgnElement",
330 "GANSS-SgnElement",
331 SEQUENCE_free,
332 SEQUENCE_print,
333 SEQUENCE_constraint,
334 SEQUENCE_decode_ber,
335 SEQUENCE_encode_der,
336 SEQUENCE_decode_xer,
337 SEQUENCE_encode_xer,
338 SEQUENCE_decode_uper,
339 SEQUENCE_encode_uper,
340 0, /* Use generic outmost tag fetcher */
341 asn_DEF_GANSS_SgnElement_tags_1,
342 sizeof(asn_DEF_GANSS_SgnElement_tags_1)
343 /sizeof(asn_DEF_GANSS_SgnElement_tags_1[0]), /* 1 */
344 asn_DEF_GANSS_SgnElement_tags_1, /* Same as above */
345 sizeof(asn_DEF_GANSS_SgnElement_tags_1)
346 /sizeof(asn_DEF_GANSS_SgnElement_tags_1[0]), /* 1 */
347 0, /* No PER visible constraints */
348 asn_MBR_GANSS_SgnElement_1,
349 9, /* Elements count */
350 &asn_SPC_GANSS_SgnElement_specs_1 /* Additional specs */