remark release date
[Net-Radio-Location-SUPL-Test.git] / asn1 / OTD-MsrElementRest.c
blob7bd55e360d4ec0f1b141b3f8fee0339dc951b625
1 /*
2 * Generated by asn1c-0.9.23 (http://lionet.info/asn1c)
3 * From ASN.1 module "RRLP-Components"
4 * found in "../asn1src/RRLP-Components.asn"
5 * `asn1c -gen-PER -fskeletons-copy -fnative-types`
6 */
8 #include "OTD-MsrElementRest.h"
10 static int
11 memb_refFrameNumber_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 <= 42431)) {
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_taCorrection_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 <= 960)) {
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 asn_per_constraints_t asn_PER_memb_refFrameNumber_constr_2 = {
61 { APC_CONSTRAINED, 16, 16, 0, 42431 } /* (0..42431) */,
62 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
63 0, 0 /* No PER value map */
65 static asn_per_constraints_t asn_PER_memb_taCorrection_constr_6 = {
66 { APC_CONSTRAINED, 10, 10, 0, 960 } /* (0..960) */,
67 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
68 0, 0 /* No PER value map */
70 static asn_TYPE_member_t asn_MBR_OTD_MsrElementRest_1[] = {
71 { ATF_NOFLAGS, 0, offsetof(struct OTD_MsrElementRest, refFrameNumber),
72 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
73 -1, /* IMPLICIT tag at current level */
74 &asn_DEF_NativeInteger,
75 memb_refFrameNumber_constraint_1,
76 &asn_PER_memb_refFrameNumber_constr_2,
78 "refFrameNumber"
80 { ATF_NOFLAGS, 0, offsetof(struct OTD_MsrElementRest, referenceTimeSlot),
81 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
82 -1, /* IMPLICIT tag at current level */
83 &asn_DEF_ModuloTimeSlot,
84 0, /* Defer constraints checking to the member type */
85 0, /* No PER visible constraints */
87 "referenceTimeSlot"
89 { ATF_POINTER, 1, offsetof(struct OTD_MsrElementRest, toaMeasurementsOfRef),
90 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
91 -1, /* IMPLICIT tag at current level */
92 &asn_DEF_TOA_MeasurementsOfRef,
93 0, /* Defer constraints checking to the member type */
94 0, /* No PER visible constraints */
96 "toaMeasurementsOfRef"
98 { ATF_NOFLAGS, 0, offsetof(struct OTD_MsrElementRest, stdResolution),
99 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
100 -1, /* IMPLICIT tag at current level */
101 &asn_DEF_StdResolution,
102 0, /* Defer constraints checking to the member type */
103 0, /* No PER visible constraints */
105 "stdResolution"
107 { ATF_POINTER, 2, offsetof(struct OTD_MsrElementRest, taCorrection),
108 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
109 -1, /* IMPLICIT tag at current level */
110 &asn_DEF_NativeInteger,
111 memb_taCorrection_constraint_1,
112 &asn_PER_memb_taCorrection_constr_6,
114 "taCorrection"
116 { ATF_POINTER, 1, offsetof(struct OTD_MsrElementRest, otd_MsrsOfOtherSets),
117 (ASN_TAG_CLASS_CONTEXT | (5 << 2)),
118 -1, /* IMPLICIT tag at current level */
119 &asn_DEF_SeqOfOTD_MsrsOfOtherSets,
120 0, /* Defer constraints checking to the member type */
121 0, /* No PER visible constraints */
123 "otd-MsrsOfOtherSets"
126 static int asn_MAP_OTD_MsrElementRest_oms_1[] = { 2, 4, 5 };
127 static ber_tlv_tag_t asn_DEF_OTD_MsrElementRest_tags_1[] = {
128 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
130 static asn_TYPE_tag2member_t asn_MAP_OTD_MsrElementRest_tag2el_1[] = {
131 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* refFrameNumber at 360 */
132 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* referenceTimeSlot at 361 */
133 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* toaMeasurementsOfRef at 362 */
134 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* stdResolution at 363 */
135 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* taCorrection at 364 */
136 { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* otd-MsrsOfOtherSets at 367 */
138 static asn_SEQUENCE_specifics_t asn_SPC_OTD_MsrElementRest_specs_1 = {
139 sizeof(struct OTD_MsrElementRest),
140 offsetof(struct OTD_MsrElementRest, _asn_ctx),
141 asn_MAP_OTD_MsrElementRest_tag2el_1,
142 6, /* Count of tags in the map */
143 asn_MAP_OTD_MsrElementRest_oms_1, /* Optional members */
144 3, 0, /* Root/Additions */
145 -1, /* Start extensions */
146 -1 /* Stop extensions */
148 asn_TYPE_descriptor_t asn_DEF_OTD_MsrElementRest = {
149 "OTD-MsrElementRest",
150 "OTD-MsrElementRest",
151 SEQUENCE_free,
152 SEQUENCE_print,
153 SEQUENCE_constraint,
154 SEQUENCE_decode_ber,
155 SEQUENCE_encode_der,
156 SEQUENCE_decode_xer,
157 SEQUENCE_encode_xer,
158 SEQUENCE_decode_uper,
159 SEQUENCE_encode_uper,
160 0, /* Use generic outmost tag fetcher */
161 asn_DEF_OTD_MsrElementRest_tags_1,
162 sizeof(asn_DEF_OTD_MsrElementRest_tags_1)
163 /sizeof(asn_DEF_OTD_MsrElementRest_tags_1[0]), /* 1 */
164 asn_DEF_OTD_MsrElementRest_tags_1, /* Same as above */
165 sizeof(asn_DEF_OTD_MsrElementRest_tags_1)
166 /sizeof(asn_DEF_OTD_MsrElementRest_tags_1[0]), /* 1 */
167 0, /* No PER visible constraints */
168 asn_MBR_OTD_MsrElementRest_1,
169 6, /* Elements count */
170 &asn_SPC_OTD_MsrElementRest_specs_1 /* Additional specs */