remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / PosPayLoad.c
blobf3c28b006dd1771a69a33c669d12ed2e60c143d8
1 /*
2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "SUPL-POS"
4 * found in "../asn1src/SUPL-POS.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
6 */
8 #include "PosPayLoad.h"
10 static int
11 memb_tia801payload_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
14 size_t size;
16 if(!sptr) {
17 _ASN_CTFAIL(app_key, td, sptr,
18 "%s: value not given (%s:%d)",
19 td->name, __FILE__, __LINE__);
20 return -1;
23 size = st->size;
25 if((size >= 1 && size <= 8192)) {
26 /* Constraint check succeeded */
27 return 0;
28 } else {
29 _ASN_CTFAIL(app_key, td, sptr,
30 "%s: constraint failed (%s:%d)",
31 td->name, __FILE__, __LINE__);
32 return -1;
36 static int
37 memb_rrcPayload_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
38 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
40 size_t size;
42 if(!sptr) {
43 _ASN_CTFAIL(app_key, td, sptr,
44 "%s: value not given (%s:%d)",
45 td->name, __FILE__, __LINE__);
46 return -1;
49 size = st->size;
51 if((size >= 1 && size <= 8192)) {
52 /* Constraint check succeeded */
53 return 0;
54 } else {
55 _ASN_CTFAIL(app_key, td, sptr,
56 "%s: constraint failed (%s:%d)",
57 td->name, __FILE__, __LINE__);
58 return -1;
62 static int
63 memb_rrlpPayload_constraint_1(asn_TYPE_descriptor_t *td, const void *sptr,
64 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
65 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
66 size_t size;
68 if(!sptr) {
69 _ASN_CTFAIL(app_key, td, sptr,
70 "%s: value not given (%s:%d)",
71 td->name, __FILE__, __LINE__);
72 return -1;
75 size = st->size;
77 if((size >= 1 && size <= 8192)) {
78 /* Constraint check succeeded */
79 return 0;
80 } else {
81 _ASN_CTFAIL(app_key, td, sptr,
82 "%s: constraint failed (%s:%d)",
83 td->name, __FILE__, __LINE__);
84 return -1;
88 static asn_per_constraints_t asn_PER_memb_tia801payload_constr_2 = {
89 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
90 { APC_CONSTRAINED, 13, 13, 1, 8192 } /* (SIZE(1..8192)) */,
91 0, 0 /* No PER value map */
93 static asn_per_constraints_t asn_PER_memb_rrcPayload_constr_3 = {
94 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
95 { APC_CONSTRAINED, 13, 13, 1, 8192 } /* (SIZE(1..8192)) */,
96 0, 0 /* No PER value map */
98 static asn_per_constraints_t asn_PER_memb_rrlpPayload_constr_4 = {
99 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
100 { APC_CONSTRAINED, 13, 13, 1, 8192 } /* (SIZE(1..8192)) */,
101 0, 0 /* No PER value map */
103 static asn_per_constraints_t asn_PER_type_PosPayLoad_constr_1 = {
104 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
105 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
106 0, 0 /* No PER value map */
108 static asn_TYPE_member_t asn_MBR_PosPayLoad_1[] = {
109 { ATF_NOFLAGS, 0, offsetof(struct PosPayLoad, choice.tia801payload),
110 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
111 -1, /* IMPLICIT tag at current level */
112 &asn_DEF_OCTET_STRING,
113 memb_tia801payload_constraint_1,
114 &asn_PER_memb_tia801payload_constr_2,
116 "tia801payload"
118 { ATF_NOFLAGS, 0, offsetof(struct PosPayLoad, choice.rrcPayload),
119 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
120 -1, /* IMPLICIT tag at current level */
121 &asn_DEF_OCTET_STRING,
122 memb_rrcPayload_constraint_1,
123 &asn_PER_memb_rrcPayload_constr_3,
125 "rrcPayload"
127 { ATF_NOFLAGS, 0, offsetof(struct PosPayLoad, choice.rrlpPayload),
128 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
129 -1, /* IMPLICIT tag at current level */
130 &asn_DEF_OCTET_STRING,
131 memb_rrlpPayload_constraint_1,
132 &asn_PER_memb_rrlpPayload_constr_4,
134 "rrlpPayload"
137 static asn_TYPE_tag2member_t asn_MAP_PosPayLoad_tag2el_1[] = {
138 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tia801payload at 15 */
139 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rrcPayload at 16 */
140 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* rrlpPayload at 17 */
142 static asn_CHOICE_specifics_t asn_SPC_PosPayLoad_specs_1 = {
143 sizeof(struct PosPayLoad),
144 offsetof(struct PosPayLoad, _asn_ctx),
145 offsetof(struct PosPayLoad, present),
146 sizeof(((struct PosPayLoad *)0)->present),
147 asn_MAP_PosPayLoad_tag2el_1,
148 3, /* Count of tags in the map */
150 3 /* Extensions start */
152 asn_TYPE_descriptor_t asn_DEF_PosPayLoad = {
153 "PosPayLoad",
154 "PosPayLoad",
155 CHOICE_free,
156 CHOICE_print,
157 CHOICE_constraint,
158 CHOICE_decode_ber,
159 CHOICE_encode_der,
160 CHOICE_decode_xer,
161 CHOICE_encode_xer,
162 CHOICE_decode_uper,
163 CHOICE_encode_uper,
164 CHOICE_outmost_tag,
165 0, /* No effective tags (pointer) */
166 0, /* No effective tags (count) */
167 0, /* No tags (pointer) */
168 0, /* No tags (count) */
169 &asn_PER_type_PosPayLoad_constr_1,
170 asn_MBR_PosPayLoad_1,
171 3, /* Elements count */
172 &asn_SPC_PosPayLoad_specs_1 /* Additional specs */