remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / Version.c
blob83d32f89899b1b51e7de91f33431f2c08090539c
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 "Version.h"
10 static int
11 memb_maj_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 <= 255)) {
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_min_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 <= 255)) {
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_servind_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 <= 255)) {
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 asn_per_constraints_t asn_PER_memb_maj_constr_2 = {
86 { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
87 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
88 0, 0 /* No PER value map */
90 static asn_per_constraints_t asn_PER_memb_min_constr_3 = {
91 { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
92 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
93 0, 0 /* No PER value map */
95 static asn_per_constraints_t asn_PER_memb_servind_constr_4 = {
96 { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
97 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
98 0, 0 /* No PER value map */
100 static asn_TYPE_member_t asn_MBR_Version_1[] = {
101 { ATF_NOFLAGS, 0, offsetof(struct Version, maj),
102 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
103 -1, /* IMPLICIT tag at current level */
104 &asn_DEF_NativeInteger,
105 memb_maj_constraint_1,
106 &asn_PER_memb_maj_constr_2,
108 "maj"
110 { ATF_NOFLAGS, 0, offsetof(struct Version, min),
111 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
112 -1, /* IMPLICIT tag at current level */
113 &asn_DEF_NativeInteger,
114 memb_min_constraint_1,
115 &asn_PER_memb_min_constr_3,
117 "min"
119 { ATF_NOFLAGS, 0, offsetof(struct Version, servind),
120 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
121 -1, /* IMPLICIT tag at current level */
122 &asn_DEF_NativeInteger,
123 memb_servind_constraint_1,
124 &asn_PER_memb_servind_constr_4,
126 "servind"
129 static ber_tlv_tag_t asn_DEF_Version_tags_1[] = {
130 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
132 static asn_TYPE_tag2member_t asn_MAP_Version_tag2el_1[] = {
133 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* maj at 10 */
134 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* min at 11 */
135 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* servind at 12 */
137 static asn_SEQUENCE_specifics_t asn_SPC_Version_specs_1 = {
138 sizeof(struct Version),
139 offsetof(struct Version, _asn_ctx),
140 asn_MAP_Version_tag2el_1,
141 3, /* Count of tags in the map */
142 0, 0, 0, /* Optional elements (not needed) */
143 -1, /* Start extensions */
144 -1 /* Stop extensions */
146 asn_TYPE_descriptor_t asn_DEF_Version = {
147 "Version",
148 "Version",
149 SEQUENCE_free,
150 SEQUENCE_print,
151 SEQUENCE_constraint,
152 SEQUENCE_decode_ber,
153 SEQUENCE_encode_der,
154 SEQUENCE_decode_xer,
155 SEQUENCE_encode_xer,
156 SEQUENCE_decode_uper,
157 SEQUENCE_encode_uper,
158 0, /* Use generic outmost tag fetcher */
159 asn_DEF_Version_tags_1,
160 sizeof(asn_DEF_Version_tags_1)
161 /sizeof(asn_DEF_Version_tags_1[0]), /* 1 */
162 asn_DEF_Version_tags_1, /* Same as above */
163 sizeof(asn_DEF_Version_tags_1)
164 /sizeof(asn_DEF_Version_tags_1[0]), /* 1 */
165 0, /* No PER visible constraints */
166 asn_MBR_Version_1,
167 3, /* Elements count */
168 &asn_SPC_Version_specs_1 /* Additional specs */