remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / QoP.c
blobe61825d449cf7a7246f500894e2f361ec6c3153b
1 /*
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`
6 */
8 #include "QoP.h"
10 static int
11 memb_horacc_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 <= 127)) {
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_veracc_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 <= 127)) {
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_maxLocAge_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 <= 65535)) {
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_delay_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 <= 7)) {
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 asn_per_constraints_t asn_PER_memb_horacc_constr_2 = {
111 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
112 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
113 0, 0 /* No PER value map */
115 static asn_per_constraints_t asn_PER_memb_veracc_constr_3 = {
116 { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
117 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
118 0, 0 /* No PER value map */
120 static asn_per_constraints_t asn_PER_memb_maxLocAge_constr_4 = {
121 { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */,
122 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
123 0, 0 /* No PER value map */
125 static asn_per_constraints_t asn_PER_memb_delay_constr_5 = {
126 { APC_CONSTRAINED, 3, 3, 0, 7 } /* (0..7) */,
127 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
128 0, 0 /* No PER value map */
130 static asn_TYPE_member_t asn_MBR_QoP_1[] = {
131 { ATF_NOFLAGS, 0, offsetof(struct QoP, horacc),
132 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
133 -1, /* IMPLICIT tag at current level */
134 &asn_DEF_NativeInteger,
135 memb_horacc_constraint_1,
136 &asn_PER_memb_horacc_constr_2,
138 "horacc"
140 { ATF_POINTER, 3, offsetof(struct QoP, veracc),
141 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
142 -1, /* IMPLICIT tag at current level */
143 &asn_DEF_NativeInteger,
144 memb_veracc_constraint_1,
145 &asn_PER_memb_veracc_constr_3,
147 "veracc"
149 { ATF_POINTER, 2, offsetof(struct QoP, maxLocAge),
150 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
151 -1, /* IMPLICIT tag at current level */
152 &asn_DEF_NativeInteger,
153 memb_maxLocAge_constraint_1,
154 &asn_PER_memb_maxLocAge_constr_4,
156 "maxLocAge"
158 { ATF_POINTER, 1, offsetof(struct QoP, delay),
159 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
160 -1, /* IMPLICIT tag at current level */
161 &asn_DEF_NativeInteger,
162 memb_delay_constraint_1,
163 &asn_PER_memb_delay_constr_5,
165 "delay"
168 static int asn_MAP_QoP_oms_1[] = { 1, 2, 3 };
169 static ber_tlv_tag_t asn_DEF_QoP_tags_1[] = {
170 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
172 static asn_TYPE_tag2member_t asn_MAP_QoP_tag2el_1[] = {
173 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* horacc at 208 */
174 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* veracc at 209 */
175 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* maxLocAge at 210 */
176 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* delay at 211 */
178 static asn_SEQUENCE_specifics_t asn_SPC_QoP_specs_1 = {
179 sizeof(struct QoP),
180 offsetof(struct QoP, _asn_ctx),
181 asn_MAP_QoP_tag2el_1,
182 4, /* Count of tags in the map */
183 asn_MAP_QoP_oms_1, /* Optional members */
184 3, 0, /* Root/Additions */
185 3, /* Start extensions */
186 5 /* Stop extensions */
188 asn_TYPE_descriptor_t asn_DEF_QoP = {
189 "QoP",
190 "QoP",
191 SEQUENCE_free,
192 SEQUENCE_print,
193 SEQUENCE_constraint,
194 SEQUENCE_decode_ber,
195 SEQUENCE_encode_der,
196 SEQUENCE_decode_xer,
197 SEQUENCE_encode_xer,
198 SEQUENCE_decode_uper,
199 SEQUENCE_encode_uper,
200 0, /* Use generic outmost tag fetcher */
201 asn_DEF_QoP_tags_1,
202 sizeof(asn_DEF_QoP_tags_1)
203 /sizeof(asn_DEF_QoP_tags_1[0]), /* 1 */
204 asn_DEF_QoP_tags_1, /* Same as above */
205 sizeof(asn_DEF_QoP_tags_1)
206 /sizeof(asn_DEF_QoP_tags_1[0]), /* 1 */
207 0, /* No PER visible constraints */
208 asn_MBR_QoP_1,
209 4, /* Elements count */
210 &asn_SPC_QoP_specs_1 /* Additional specs */