blob: c88dd102c1724777b07663f0d7b1b913481a16c4 [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_GA-UncertaintyEllipse.h>
Harald Welteee091892015-09-10 10:22:03 +02008
9static int
10memb_uncertaintySemi_major_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 <= 127l)) {
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_uncertaintySemi_minor_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 <= 127l)) {
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 int
60memb_orientationOfMajorAxis_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
61 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
62 long value;
63
64 if(!sptr) {
65 _ASN_CTFAIL(app_key, td, sptr,
66 "%s: value not given (%s:%d)",
67 td->name, __FILE__, __LINE__);
68 return -1;
69 }
70
71 value = *(const long *)sptr;
72
73 if((value >= 0l && value <= 179l)) {
74 /* Constraint check succeeded */
75 return 0;
76 } else {
77 _ASN_CTFAIL(app_key, td, sptr,
78 "%s: constraint failed (%s:%d)",
79 td->name, __FILE__, __LINE__);
80 return -1;
81 }
82}
83
84static asn_per_constraints_t asn_PER_memb_uncertaintySemi_major_constr_2 GCC_NOTUSED = {
85 { APC_CONSTRAINED, 7, 7, 0l, 127l } /* (0..127) */,
86 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
87 0, 0 /* No PER value map */
88};
89static asn_per_constraints_t asn_PER_memb_uncertaintySemi_minor_constr_3 GCC_NOTUSED = {
90 { APC_CONSTRAINED, 7, 7, 0l, 127l } /* (0..127) */,
91 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
92 0, 0 /* No PER value map */
93};
94static asn_per_constraints_t asn_PER_memb_orientationOfMajorAxis_constr_4 GCC_NOTUSED = {
95 { APC_CONSTRAINED, 8, 8, 0l, 179l } /* (0..179) */,
96 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
97 0, 0 /* No PER value map */
98};
99static asn_TYPE_member_t asn_MBR_RANAP_GA_UncertaintyEllipse_1[] = {
100 { ATF_NOFLAGS, 0, offsetof(struct RANAP_GA_UncertaintyEllipse, uncertaintySemi_major),
101 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
102 -1, /* IMPLICIT tag at current level */
103 &asn_DEF_NativeInteger,
104 memb_uncertaintySemi_major_constraint_1,
105 &asn_PER_memb_uncertaintySemi_major_constr_2,
106 0,
107 "uncertaintySemi-major"
108 },
109 { ATF_NOFLAGS, 0, offsetof(struct RANAP_GA_UncertaintyEllipse, uncertaintySemi_minor),
110 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
111 -1, /* IMPLICIT tag at current level */
112 &asn_DEF_NativeInteger,
113 memb_uncertaintySemi_minor_constraint_1,
114 &asn_PER_memb_uncertaintySemi_minor_constr_3,
115 0,
116 "uncertaintySemi-minor"
117 },
118 { ATF_NOFLAGS, 0, offsetof(struct RANAP_GA_UncertaintyEllipse, orientationOfMajorAxis),
119 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
120 -1, /* IMPLICIT tag at current level */
121 &asn_DEF_NativeInteger,
122 memb_orientationOfMajorAxis_constraint_1,
123 &asn_PER_memb_orientationOfMajorAxis_constr_4,
124 0,
125 "orientationOfMajorAxis"
126 },
127};
128static const ber_tlv_tag_t asn_DEF_RANAP_GA_UncertaintyEllipse_tags_1[] = {
129 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
130};
131static const asn_TYPE_tag2member_t asn_MAP_RANAP_GA_UncertaintyEllipse_tag2el_1[] = {
132 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* uncertaintySemi-major */
133 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* uncertaintySemi-minor */
134 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* orientationOfMajorAxis */
135};
136static asn_SEQUENCE_specifics_t asn_SPC_RANAP_GA_UncertaintyEllipse_specs_1 = {
137 sizeof(struct RANAP_GA_UncertaintyEllipse),
138 offsetof(struct RANAP_GA_UncertaintyEllipse, _asn_ctx),
139 asn_MAP_RANAP_GA_UncertaintyEllipse_tag2el_1,
140 3, /* Count of tags in the map */
141 0, 0, 0, /* Optional elements (not needed) */
142 2, /* Start extensions */
143 4 /* Stop extensions */
144};
145asn_TYPE_descriptor_t asn_DEF_RANAP_GA_UncertaintyEllipse = {
146 "RANAP_GA-UncertaintyEllipse",
147 "RANAP_GA-UncertaintyEllipse",
148 SEQUENCE_free,
149 SEQUENCE_print,
150 SEQUENCE_constraint,
151 SEQUENCE_decode_ber,
152 SEQUENCE_encode_der,
153 SEQUENCE_decode_xer,
154 SEQUENCE_encode_xer,
155 SEQUENCE_decode_uper,
156 SEQUENCE_encode_uper,
157 SEQUENCE_decode_aper,
158 SEQUENCE_encode_aper,
159 0, /* Use generic outmost tag fetcher */
160 asn_DEF_RANAP_GA_UncertaintyEllipse_tags_1,
161 sizeof(asn_DEF_RANAP_GA_UncertaintyEllipse_tags_1)
162 /sizeof(asn_DEF_RANAP_GA_UncertaintyEllipse_tags_1[0]), /* 1 */
163 asn_DEF_RANAP_GA_UncertaintyEllipse_tags_1, /* Same as above */
164 sizeof(asn_DEF_RANAP_GA_UncertaintyEllipse_tags_1)
165 /sizeof(asn_DEF_RANAP_GA_UncertaintyEllipse_tags_1[0]), /* 1 */
166 0, /* No PER visible constraints */
167 asn_MBR_RANAP_GA_UncertaintyEllipse_1,
168 3, /* Elements count */
169 &asn_SPC_RANAP_GA_UncertaintyEllipse_specs_1 /* Additional specs */
170};
171