2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "ULP-Components"
4 * found in "../asn1src/ULP-Components.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
8 #include "PositionEstimate.h"
11 latitudeSign_2_constraint(asn_TYPE_descriptor_t
*td
, const void *sptr
,
12 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
13 /* Replace with underlying type checker */
14 td
->check_constraints
= asn_DEF_NativeEnumerated
.check_constraints
;
15 return td
->check_constraints(td
, sptr
, ctfailcb
, app_key
);
19 * This type is implemented using NativeEnumerated,
20 * so here we adjust the DEF accordingly.
23 latitudeSign_2_inherit_TYPE_descriptor(asn_TYPE_descriptor_t
*td
) {
24 td
->free_struct
= asn_DEF_NativeEnumerated
.free_struct
;
25 td
->print_struct
= asn_DEF_NativeEnumerated
.print_struct
;
26 td
->ber_decoder
= asn_DEF_NativeEnumerated
.ber_decoder
;
27 td
->der_encoder
= asn_DEF_NativeEnumerated
.der_encoder
;
28 td
->xer_decoder
= asn_DEF_NativeEnumerated
.xer_decoder
;
29 td
->xer_encoder
= asn_DEF_NativeEnumerated
.xer_encoder
;
30 td
->uper_decoder
= asn_DEF_NativeEnumerated
.uper_decoder
;
31 td
->uper_encoder
= asn_DEF_NativeEnumerated
.uper_encoder
;
32 if(!td
->per_constraints
)
33 td
->per_constraints
= asn_DEF_NativeEnumerated
.per_constraints
;
34 td
->elements
= asn_DEF_NativeEnumerated
.elements
;
35 td
->elements_count
= asn_DEF_NativeEnumerated
.elements_count
;
36 /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
40 latitudeSign_2_free(asn_TYPE_descriptor_t
*td
,
41 void *struct_ptr
, int contents_only
) {
42 latitudeSign_2_inherit_TYPE_descriptor(td
);
43 td
->free_struct(td
, struct_ptr
, contents_only
);
47 latitudeSign_2_print(asn_TYPE_descriptor_t
*td
, const void *struct_ptr
,
48 int ilevel
, asn_app_consume_bytes_f
*cb
, void *app_key
) {
49 latitudeSign_2_inherit_TYPE_descriptor(td
);
50 return td
->print_struct(td
, struct_ptr
, ilevel
, cb
, app_key
);
54 latitudeSign_2_decode_ber(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
55 void **structure
, const void *bufptr
, size_t size
, int tag_mode
) {
56 latitudeSign_2_inherit_TYPE_descriptor(td
);
57 return td
->ber_decoder(opt_codec_ctx
, td
, structure
, bufptr
, size
, tag_mode
);
61 latitudeSign_2_encode_der(asn_TYPE_descriptor_t
*td
,
62 void *structure
, int tag_mode
, ber_tlv_tag_t tag
,
63 asn_app_consume_bytes_f
*cb
, void *app_key
) {
64 latitudeSign_2_inherit_TYPE_descriptor(td
);
65 return td
->der_encoder(td
, structure
, tag_mode
, tag
, cb
, app_key
);
69 latitudeSign_2_decode_xer(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
70 void **structure
, const char *opt_mname
, const void *bufptr
, size_t size
) {
71 latitudeSign_2_inherit_TYPE_descriptor(td
);
72 return td
->xer_decoder(opt_codec_ctx
, td
, structure
, opt_mname
, bufptr
, size
);
76 latitudeSign_2_encode_xer(asn_TYPE_descriptor_t
*td
, void *structure
,
77 int ilevel
, enum xer_encoder_flags_e flags
,
78 asn_app_consume_bytes_f
*cb
, void *app_key
) {
79 latitudeSign_2_inherit_TYPE_descriptor(td
);
80 return td
->xer_encoder(td
, structure
, ilevel
, flags
, cb
, app_key
);
84 latitudeSign_2_decode_uper(asn_codec_ctx_t
*opt_codec_ctx
, asn_TYPE_descriptor_t
*td
,
85 asn_per_constraints_t
*constraints
, void **structure
, asn_per_data_t
*per_data
) {
86 latitudeSign_2_inherit_TYPE_descriptor(td
);
87 return td
->uper_decoder(opt_codec_ctx
, td
, constraints
, structure
, per_data
);
91 latitudeSign_2_encode_uper(asn_TYPE_descriptor_t
*td
,
92 asn_per_constraints_t
*constraints
,
93 void *structure
, asn_per_outp_t
*per_out
) {
94 latitudeSign_2_inherit_TYPE_descriptor(td
);
95 return td
->uper_encoder(td
, constraints
, structure
, per_out
);
99 memb_uncertaintySemiMajor_constraint_7(asn_TYPE_descriptor_t
*td
, const void *sptr
,
100 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
104 _ASN_CTFAIL(app_key
, td
, sptr
,
105 "%s: value not given (%s:%d)",
106 td
->name
, __FILE__
, __LINE__
);
110 value
= *(const long *)sptr
;
112 if((value
>= 0 && value
<= 127)) {
113 /* Constraint check succeeded */
116 _ASN_CTFAIL(app_key
, td
, sptr
,
117 "%s: constraint failed (%s:%d)",
118 td
->name
, __FILE__
, __LINE__
);
124 memb_uncertaintySemiMinor_constraint_7(asn_TYPE_descriptor_t
*td
, const void *sptr
,
125 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
129 _ASN_CTFAIL(app_key
, td
, sptr
,
130 "%s: value not given (%s:%d)",
131 td
->name
, __FILE__
, __LINE__
);
135 value
= *(const long *)sptr
;
137 if((value
>= 0 && value
<= 127)) {
138 /* Constraint check succeeded */
141 _ASN_CTFAIL(app_key
, td
, sptr
,
142 "%s: constraint failed (%s:%d)",
143 td
->name
, __FILE__
, __LINE__
);
149 memb_orientationMajorAxis_constraint_7(asn_TYPE_descriptor_t
*td
, const void *sptr
,
150 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
154 _ASN_CTFAIL(app_key
, td
, sptr
,
155 "%s: value not given (%s:%d)",
156 td
->name
, __FILE__
, __LINE__
);
160 value
= *(const long *)sptr
;
162 if((value
>= 0 && value
<= 180)) {
163 /* Constraint check succeeded */
166 _ASN_CTFAIL(app_key
, td
, sptr
,
167 "%s: constraint failed (%s:%d)",
168 td
->name
, __FILE__
, __LINE__
);
174 memb_latitude_constraint_1(asn_TYPE_descriptor_t
*td
, const void *sptr
,
175 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
179 _ASN_CTFAIL(app_key
, td
, sptr
,
180 "%s: value not given (%s:%d)",
181 td
->name
, __FILE__
, __LINE__
);
185 value
= *(const long *)sptr
;
187 if((value
>= 0 && value
<= 8388607)) {
188 /* Constraint check succeeded */
191 _ASN_CTFAIL(app_key
, td
, sptr
,
192 "%s: constraint failed (%s:%d)",
193 td
->name
, __FILE__
, __LINE__
);
199 memb_longitude_constraint_1(asn_TYPE_descriptor_t
*td
, const void *sptr
,
200 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
204 _ASN_CTFAIL(app_key
, td
, sptr
,
205 "%s: value not given (%s:%d)",
206 td
->name
, __FILE__
, __LINE__
);
210 value
= *(const long *)sptr
;
212 if((value
>= -8388608 && value
<= 8388607)) {
213 /* Constraint check succeeded */
216 _ASN_CTFAIL(app_key
, td
, sptr
,
217 "%s: constraint failed (%s:%d)",
218 td
->name
, __FILE__
, __LINE__
);
224 memb_confidence_constraint_1(asn_TYPE_descriptor_t
*td
, const void *sptr
,
225 asn_app_constraint_failed_f
*ctfailcb
, void *app_key
) {
229 _ASN_CTFAIL(app_key
, td
, sptr
,
230 "%s: value not given (%s:%d)",
231 td
->name
, __FILE__
, __LINE__
);
235 value
= *(const long *)sptr
;
237 if((value
>= 0 && value
<= 100)) {
238 /* Constraint check succeeded */
241 _ASN_CTFAIL(app_key
, td
, sptr
,
242 "%s: constraint failed (%s:%d)",
243 td
->name
, __FILE__
, __LINE__
);
248 static asn_per_constraints_t asn_PER_type_latitudeSign_constr_2
= {
249 { APC_CONSTRAINED
, 1, 1, 0, 1 } /* (0..1) */,
250 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
251 0, 0 /* No PER value map */
253 static asn_per_constraints_t asn_PER_memb_uncertaintySemiMajor_constr_8
= {
254 { APC_CONSTRAINED
, 7, 7, 0, 127 } /* (0..127) */,
255 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
256 0, 0 /* No PER value map */
258 static asn_per_constraints_t asn_PER_memb_uncertaintySemiMinor_constr_9
= {
259 { APC_CONSTRAINED
, 7, 7, 0, 127 } /* (0..127) */,
260 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
261 0, 0 /* No PER value map */
263 static asn_per_constraints_t asn_PER_memb_orientationMajorAxis_constr_10
= {
264 { APC_CONSTRAINED
, 8, 8, 0, 180 } /* (0..180) */,
265 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
266 0, 0 /* No PER value map */
268 static asn_per_constraints_t asn_PER_memb_latitude_constr_5
= {
269 { APC_CONSTRAINED
, 23, -1, 0, 8388607 } /* (0..8388607) */,
270 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
271 0, 0 /* No PER value map */
273 static asn_per_constraints_t asn_PER_memb_longitude_constr_6
= {
274 { APC_CONSTRAINED
, 24, -1, -8388608, 8388607 } /* (-8388608..8388607) */,
275 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
276 0, 0 /* No PER value map */
278 static asn_per_constraints_t asn_PER_memb_confidence_constr_11
= {
279 { APC_CONSTRAINED
, 7, 7, 0, 100 } /* (0..100) */,
280 { APC_UNCONSTRAINED
, -1, -1, 0, 0 },
281 0, 0 /* No PER value map */
283 static asn_INTEGER_enum_map_t asn_MAP_latitudeSign_value2enum_2
[] = {
287 static unsigned int asn_MAP_latitudeSign_enum2value_2
[] = {
291 static asn_INTEGER_specifics_t asn_SPC_latitudeSign_specs_2
= {
292 asn_MAP_latitudeSign_value2enum_2
, /* "tag" => N; sorted by tag */
293 asn_MAP_latitudeSign_enum2value_2
, /* N => "tag"; sorted by N */
294 2, /* Number of elements in the maps */
295 0, /* Enumeration is not extensible */
296 1, /* Strict enumeration */
297 0, /* Native long size */
300 static ber_tlv_tag_t asn_DEF_latitudeSign_tags_2
[] = {
301 (ASN_TAG_CLASS_CONTEXT
| (0 << 2)),
302 (ASN_TAG_CLASS_UNIVERSAL
| (10 << 2))
304 static /* Use -fall-defs-global to expose */
305 asn_TYPE_descriptor_t asn_DEF_latitudeSign_2
= {
309 latitudeSign_2_print
,
310 latitudeSign_2_constraint
,
311 latitudeSign_2_decode_ber
,
312 latitudeSign_2_encode_der
,
313 latitudeSign_2_decode_xer
,
314 latitudeSign_2_encode_xer
,
315 latitudeSign_2_decode_uper
,
316 latitudeSign_2_encode_uper
,
317 0, /* Use generic outmost tag fetcher */
318 asn_DEF_latitudeSign_tags_2
,
319 sizeof(asn_DEF_latitudeSign_tags_2
)
320 /sizeof(asn_DEF_latitudeSign_tags_2
[0]) - 1, /* 1 */
321 asn_DEF_latitudeSign_tags_2
, /* Same as above */
322 sizeof(asn_DEF_latitudeSign_tags_2
)
323 /sizeof(asn_DEF_latitudeSign_tags_2
[0]), /* 2 */
324 &asn_PER_type_latitudeSign_constr_2
,
325 0, 0, /* Defined elsewhere */
326 &asn_SPC_latitudeSign_specs_2
/* Additional specs */
329 static asn_TYPE_member_t asn_MBR_uncertainty_7
[] = {
330 { ATF_NOFLAGS
, 0, offsetof(struct PositionEstimate__uncertainty
, uncertaintySemiMajor
),
331 (ASN_TAG_CLASS_CONTEXT
| (0 << 2)),
332 -1, /* IMPLICIT tag at current level */
333 &asn_DEF_NativeInteger
,
334 memb_uncertaintySemiMajor_constraint_7
,
335 &asn_PER_memb_uncertaintySemiMajor_constr_8
,
337 "uncertaintySemiMajor"
339 { ATF_NOFLAGS
, 0, offsetof(struct PositionEstimate__uncertainty
, uncertaintySemiMinor
),
340 (ASN_TAG_CLASS_CONTEXT
| (1 << 2)),
341 -1, /* IMPLICIT tag at current level */
342 &asn_DEF_NativeInteger
,
343 memb_uncertaintySemiMinor_constraint_7
,
344 &asn_PER_memb_uncertaintySemiMinor_constr_9
,
346 "uncertaintySemiMinor"
348 { ATF_NOFLAGS
, 0, offsetof(struct PositionEstimate__uncertainty
, orientationMajorAxis
),
349 (ASN_TAG_CLASS_CONTEXT
| (2 << 2)),
350 -1, /* IMPLICIT tag at current level */
351 &asn_DEF_NativeInteger
,
352 memb_orientationMajorAxis_constraint_7
,
353 &asn_PER_memb_orientationMajorAxis_constr_10
,
355 "orientationMajorAxis"
358 static ber_tlv_tag_t asn_DEF_uncertainty_tags_7
[] = {
359 (ASN_TAG_CLASS_CONTEXT
| (3 << 2)),
360 (ASN_TAG_CLASS_UNIVERSAL
| (16 << 2))
362 static asn_TYPE_tag2member_t asn_MAP_uncertainty_tag2el_7
[] = {
363 { (ASN_TAG_CLASS_CONTEXT
| (0 << 2)), 0, 0, 0 }, /* uncertaintySemiMajor at 76 */
364 { (ASN_TAG_CLASS_CONTEXT
| (1 << 2)), 1, 0, 0 }, /* uncertaintySemiMinor at 77 */
365 { (ASN_TAG_CLASS_CONTEXT
| (2 << 2)), 2, 0, 0 } /* orientationMajorAxis at 78 */
367 static asn_SEQUENCE_specifics_t asn_SPC_uncertainty_specs_7
= {
368 sizeof(struct PositionEstimate__uncertainty
),
369 offsetof(struct PositionEstimate__uncertainty
, _asn_ctx
),
370 asn_MAP_uncertainty_tag2el_7
,
371 3, /* Count of tags in the map */
372 0, 0, 0, /* Optional elements (not needed) */
373 -1, /* Start extensions */
374 -1 /* Stop extensions */
376 static /* Use -fall-defs-global to expose */
377 asn_TYPE_descriptor_t asn_DEF_uncertainty_7
= {
387 SEQUENCE_decode_uper
,
388 SEQUENCE_encode_uper
,
389 0, /* Use generic outmost tag fetcher */
390 asn_DEF_uncertainty_tags_7
,
391 sizeof(asn_DEF_uncertainty_tags_7
)
392 /sizeof(asn_DEF_uncertainty_tags_7
[0]) - 1, /* 1 */
393 asn_DEF_uncertainty_tags_7
, /* Same as above */
394 sizeof(asn_DEF_uncertainty_tags_7
)
395 /sizeof(asn_DEF_uncertainty_tags_7
[0]), /* 2 */
396 0, /* No PER visible constraints */
397 asn_MBR_uncertainty_7
,
398 3, /* Elements count */
399 &asn_SPC_uncertainty_specs_7
/* Additional specs */
402 static asn_TYPE_member_t asn_MBR_PositionEstimate_1
[] = {
403 { ATF_NOFLAGS
, 0, offsetof(struct PositionEstimate
, latitudeSign
),
404 (ASN_TAG_CLASS_CONTEXT
| (0 << 2)),
405 -1, /* IMPLICIT tag at current level */
406 &asn_DEF_latitudeSign_2
,
407 0, /* Defer constraints checking to the member type */
408 0, /* No PER visible constraints */
412 { ATF_NOFLAGS
, 0, offsetof(struct PositionEstimate
, latitude
),
413 (ASN_TAG_CLASS_CONTEXT
| (1 << 2)),
414 -1, /* IMPLICIT tag at current level */
415 &asn_DEF_NativeInteger
,
416 memb_latitude_constraint_1
,
417 &asn_PER_memb_latitude_constr_5
,
421 { ATF_NOFLAGS
, 0, offsetof(struct PositionEstimate
, longitude
),
422 (ASN_TAG_CLASS_CONTEXT
| (2 << 2)),
423 -1, /* IMPLICIT tag at current level */
424 &asn_DEF_NativeInteger
,
425 memb_longitude_constraint_1
,
426 &asn_PER_memb_longitude_constr_6
,
430 { ATF_POINTER
, 3, offsetof(struct PositionEstimate
, uncertainty
),
431 (ASN_TAG_CLASS_CONTEXT
| (3 << 2)),
433 &asn_DEF_uncertainty_7
,
434 0, /* Defer constraints checking to the member type */
435 0, /* No PER visible constraints */
439 { ATF_POINTER
, 2, offsetof(struct PositionEstimate
, confidence
),
440 (ASN_TAG_CLASS_CONTEXT
| (4 << 2)),
441 -1, /* IMPLICIT tag at current level */
442 &asn_DEF_NativeInteger
,
443 memb_confidence_constraint_1
,
444 &asn_PER_memb_confidence_constr_11
,
448 { ATF_POINTER
, 1, offsetof(struct PositionEstimate
, altitudeInfo
),
449 (ASN_TAG_CLASS_CONTEXT
| (5 << 2)),
450 -1, /* IMPLICIT tag at current level */
451 &asn_DEF_AltitudeInfo
,
452 0, /* Defer constraints checking to the member type */
453 0, /* No PER visible constraints */
458 static int asn_MAP_PositionEstimate_oms_1
[] = { 3, 4, 5 };
459 static ber_tlv_tag_t asn_DEF_PositionEstimate_tags_1
[] = {
460 (ASN_TAG_CLASS_UNIVERSAL
| (16 << 2))
462 static asn_TYPE_tag2member_t asn_MAP_PositionEstimate_tag2el_1
[] = {
463 { (ASN_TAG_CLASS_CONTEXT
| (0 << 2)), 0, 0, 0 }, /* latitudeSign at 72 */
464 { (ASN_TAG_CLASS_CONTEXT
| (1 << 2)), 1, 0, 0 }, /* latitude at 73 */
465 { (ASN_TAG_CLASS_CONTEXT
| (2 << 2)), 2, 0, 0 }, /* longitude at 74 */
466 { (ASN_TAG_CLASS_CONTEXT
| (3 << 2)), 3, 0, 0 }, /* uncertainty at 76 */
467 { (ASN_TAG_CLASS_CONTEXT
| (4 << 2)), 4, 0, 0 }, /* confidence at 80 */
468 { (ASN_TAG_CLASS_CONTEXT
| (5 << 2)), 5, 0, 0 } /* altitudeInfo at 81 */
470 static asn_SEQUENCE_specifics_t asn_SPC_PositionEstimate_specs_1
= {
471 sizeof(struct PositionEstimate
),
472 offsetof(struct PositionEstimate
, _asn_ctx
),
473 asn_MAP_PositionEstimate_tag2el_1
,
474 6, /* Count of tags in the map */
475 asn_MAP_PositionEstimate_oms_1
, /* Optional members */
476 3, 0, /* Root/Additions */
477 5, /* Start extensions */
478 7 /* Stop extensions */
480 asn_TYPE_descriptor_t asn_DEF_PositionEstimate
= {
490 SEQUENCE_decode_uper
,
491 SEQUENCE_encode_uper
,
492 0, /* Use generic outmost tag fetcher */
493 asn_DEF_PositionEstimate_tags_1
,
494 sizeof(asn_DEF_PositionEstimate_tags_1
)
495 /sizeof(asn_DEF_PositionEstimate_tags_1
[0]), /* 1 */
496 asn_DEF_PositionEstimate_tags_1
, /* Same as above */
497 sizeof(asn_DEF_PositionEstimate_tags_1
)
498 /sizeof(asn_DEF_PositionEstimate_tags_1
[0]), /* 1 */
499 0, /* No PER visible constraints */
500 asn_MBR_PositionEstimate_1
,
501 6, /* Elements count */
502 &asn_SPC_PositionEstimate_specs_1
/* Additional specs */