blob: 02f8ab5d0859fbba19f574cc90026212e1b9b816 [file] [log] [blame]
Harald Welteee091892015-09-10 10:22:03 +02001/*
2 * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
3 * From ASN.1 module "RANAP-IEs"
4 * found in "../../asn1/ranap/RANAP-IEs.asn"
5 */
6
Neels Hofmeyrf1f2d7c2016-01-05 12:00:06 +01007#include <osmocom/ranap/RANAP_HorizontalSpeedAndBearing.h>
Harald Welteee091892015-09-10 10:22:03 +02008
9static int
10memb_bearing_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
11 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
12 long value;
13
14 if(!sptr) {
15 _ASN_CTFAIL(app_key, td, sptr,
16 "%s: value not given (%s:%d)",
17 td->name, __FILE__, __LINE__);
18 return -1;
19 }
20
21 value = *(const long *)sptr;
22
23 if((value >= 0l && value <= 359l)) {
24 /* Constraint check succeeded */
25 return 0;
26 } else {
27 _ASN_CTFAIL(app_key, td, sptr,
28 "%s: constraint failed (%s:%d)",
29 td->name, __FILE__, __LINE__);
30 return -1;
31 }
32}
33
34static int
35memb_horizontalSpeed_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
36 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
37 long value;
38
39 if(!sptr) {
40 _ASN_CTFAIL(app_key, td, sptr,
41 "%s: value not given (%s:%d)",
42 td->name, __FILE__, __LINE__);
43 return -1;
44 }
45
46 value = *(const long *)sptr;
47
48 if((value >= 0l && value <= 2047l)) {
49 /* Constraint check succeeded */
50 return 0;
51 } else {
52 _ASN_CTFAIL(app_key, td, sptr,
53 "%s: constraint failed (%s:%d)",
54 td->name, __FILE__, __LINE__);
55 return -1;
56 }
57}
58
59static asn_per_constraints_t asn_PER_memb_bearing_constr_2 GCC_NOTUSED = {
60 { APC_CONSTRAINED, 9, 9, 0l, 359l } /* (0..359) */,
61 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
62 0, 0 /* No PER value map */
63};
64static asn_per_constraints_t asn_PER_memb_horizontalSpeed_constr_3 GCC_NOTUSED = {
65 { APC_CONSTRAINED, 11, 11, 0l, 2047l } /* (0..2047) */,
66 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
67 0, 0 /* No PER value map */
68};
69static asn_TYPE_member_t asn_MBR_RANAP_HorizontalSpeedAndBearing_1[] = {
70 { ATF_NOFLAGS, 0, offsetof(struct RANAP_HorizontalSpeedAndBearing, bearing),
71 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
72 -1, /* IMPLICIT tag at current level */
73 &asn_DEF_NativeInteger,
74 memb_bearing_constraint_1,
75 &asn_PER_memb_bearing_constr_2,
76 0,
77 "bearing"
78 },
79 { ATF_NOFLAGS, 0, offsetof(struct RANAP_HorizontalSpeedAndBearing, horizontalSpeed),
80 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
81 -1, /* IMPLICIT tag at current level */
82 &asn_DEF_NativeInteger,
83 memb_horizontalSpeed_constraint_1,
84 &asn_PER_memb_horizontalSpeed_constr_3,
85 0,
86 "horizontalSpeed"
87 },
88};
89static const ber_tlv_tag_t asn_DEF_RANAP_HorizontalSpeedAndBearing_tags_1[] = {
90 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
91};
92static const asn_TYPE_tag2member_t asn_MAP_RANAP_HorizontalSpeedAndBearing_tag2el_1[] = {
93 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bearing */
94 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* horizontalSpeed */
95};
96static asn_SEQUENCE_specifics_t asn_SPC_RANAP_HorizontalSpeedAndBearing_specs_1 = {
97 sizeof(struct RANAP_HorizontalSpeedAndBearing),
98 offsetof(struct RANAP_HorizontalSpeedAndBearing, _asn_ctx),
99 asn_MAP_RANAP_HorizontalSpeedAndBearing_tag2el_1,
100 2, /* Count of tags in the map */
101 0, 0, 0, /* Optional elements (not needed) */
102 -1, /* Start extensions */
103 -1 /* Stop extensions */
104};
105asn_TYPE_descriptor_t asn_DEF_RANAP_HorizontalSpeedAndBearing = {
106 "RANAP_HorizontalSpeedAndBearing",
107 "RANAP_HorizontalSpeedAndBearing",
108 SEQUENCE_free,
109 SEQUENCE_print,
110 SEQUENCE_constraint,
111 SEQUENCE_decode_ber,
112 SEQUENCE_encode_der,
113 SEQUENCE_decode_xer,
114 SEQUENCE_encode_xer,
115 SEQUENCE_decode_uper,
116 SEQUENCE_encode_uper,
117 SEQUENCE_decode_aper,
118 SEQUENCE_encode_aper,
119 0, /* Use generic outmost tag fetcher */
120 asn_DEF_RANAP_HorizontalSpeedAndBearing_tags_1,
121 sizeof(asn_DEF_RANAP_HorizontalSpeedAndBearing_tags_1)
122 /sizeof(asn_DEF_RANAP_HorizontalSpeedAndBearing_tags_1[0]), /* 1 */
123 asn_DEF_RANAP_HorizontalSpeedAndBearing_tags_1, /* Same as above */
124 sizeof(asn_DEF_RANAP_HorizontalSpeedAndBearing_tags_1)
125 /sizeof(asn_DEF_RANAP_HorizontalSpeedAndBearing_tags_1[0]), /* 1 */
126 0, /* No PER visible constraints */
127 asn_MBR_RANAP_HorizontalSpeedAndBearing_1,
128 2, /* Elements count */
129 &asn_SPC_RANAP_HorizontalSpeedAndBearing_specs_1 /* Additional specs */
130};
131