Vanetza
 
Loading...
Searching...
No Matches
CtlFormat.c
1/*
2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "EtsiTs102941TrustLists"
4 * found in "asn1/TS102941v131-TrustLists.asn"
5 * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -R`
6 */
7
8#include "CtlFormat.h"
9
10static int
11memb_ctlSequence_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 long value;
14
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;
20 }
21
22 value = *(const long *)sptr;
23
24 if((value >= 0L && value <= 255L)) {
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;
32 }
33}
34
35#if !defined(ASN_DISABLE_OER_SUPPORT)
36static asn_oer_constraints_t asn_OER_memb_ctlSequence_constr_5 CC_NOTUSED = {
37 { 1, 1 } /* (0..255) */,
38 -1};
39#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
40#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
41static asn_per_constraints_t asn_PER_memb_ctlSequence_constr_5 CC_NOTUSED = {
42 { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
43 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
44 0, 0 /* No PER value map */
45};
46#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
47static asn_TYPE_member_t asn_MBR_ctlCommands_6[] = {
48 { ATF_POINTER, 0, 0,
49 -1 /* Ambiguous tag (CHOICE?) */,
50 0,
51 &asn_DEF_CtlCommand,
52 0,
53 {
54#if !defined(ASN_DISABLE_OER_SUPPORT)
55 0,
56#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
57#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
58 0,
59#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
60 0
61 },
62 0, 0, /* No default value */
63 ""
64 },
65};
66static const ber_tlv_tag_t asn_DEF_ctlCommands_tags_6[] = {
67 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
68 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
69};
70static asn_SET_OF_specifics_t asn_SPC_ctlCommands_specs_6 = {
71 sizeof(struct CtlFormat__ctlCommands),
72 offsetof(struct CtlFormat__ctlCommands, _asn_ctx),
73 2, /* XER encoding is XMLValueList */
74};
75static /* Use -fall-defs-global to expose */
76asn_TYPE_descriptor_t asn_DEF_ctlCommands_6 = {
77 "ctlCommands",
78 "ctlCommands",
79 &asn_OP_SEQUENCE_OF,
80 asn_DEF_ctlCommands_tags_6,
81 sizeof(asn_DEF_ctlCommands_tags_6)
82 /sizeof(asn_DEF_ctlCommands_tags_6[0]) - 1, /* 1 */
83 asn_DEF_ctlCommands_tags_6, /* Same as above */
84 sizeof(asn_DEF_ctlCommands_tags_6)
85 /sizeof(asn_DEF_ctlCommands_tags_6[0]), /* 2 */
86 {
87#if !defined(ASN_DISABLE_OER_SUPPORT)
88 0,
89#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
90#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
91 0,
92#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
93 SEQUENCE_OF_constraint
94 },
95 asn_MBR_ctlCommands_6,
96 1, /* Single element */
97 &asn_SPC_ctlCommands_specs_6 /* Additional specs */
98};
99
100asn_TYPE_member_t asn_MBR_CtlFormat_1[] = {
101 { ATF_NOFLAGS, 0, offsetof(struct CtlFormat, version),
102 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
103 -1, /* IMPLICIT tag at current level */
104 &asn_DEF_Version,
105 0,
106 {
107#if !defined(ASN_DISABLE_OER_SUPPORT)
108 0,
109#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
110#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
111 0,
112#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
113 0
114 },
115 0, 0, /* No default value */
116 "version"
117 },
118 { ATF_NOFLAGS, 0, offsetof(struct CtlFormat, nextUpdate),
119 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
120 -1, /* IMPLICIT tag at current level */
121 &asn_DEF_Time32,
122 0,
123 {
124#if !defined(ASN_DISABLE_OER_SUPPORT)
125 0,
126#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
127#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
128 0,
129#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
130 0
131 },
132 0, 0, /* No default value */
133 "nextUpdate"
134 },
135 { ATF_NOFLAGS, 0, offsetof(struct CtlFormat, isFullCtl),
136 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
137 -1, /* IMPLICIT tag at current level */
138 &asn_DEF_BOOLEAN,
139 0,
140 {
141#if !defined(ASN_DISABLE_OER_SUPPORT)
142 0,
143#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
144#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
145 0,
146#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
147 0
148 },
149 0, 0, /* No default value */
150 "isFullCtl"
151 },
152 { ATF_NOFLAGS, 0, offsetof(struct CtlFormat, ctlSequence),
153 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
154 -1, /* IMPLICIT tag at current level */
155 &asn_DEF_NativeInteger,
156 0,
157 {
158#if !defined(ASN_DISABLE_OER_SUPPORT)
159 &asn_OER_memb_ctlSequence_constr_5,
160#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
161#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
162 &asn_PER_memb_ctlSequence_constr_5,
163#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
164 memb_ctlSequence_constraint_1
165 },
166 0, 0, /* No default value */
167 "ctlSequence"
168 },
169 { ATF_NOFLAGS, 0, offsetof(struct CtlFormat, ctlCommands),
170 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
171 0,
172 &asn_DEF_ctlCommands_6,
173 0,
174 {
175#if !defined(ASN_DISABLE_OER_SUPPORT)
176 0,
177#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
178#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
179 0,
180#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
181 0
182 },
183 0, 0, /* No default value */
184 "ctlCommands"
185 },
186};
187static const ber_tlv_tag_t asn_DEF_CtlFormat_tags_1[] = {
188 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
189};
190static const asn_TYPE_tag2member_t asn_MAP_CtlFormat_tag2el_1[] = {
191 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */
192 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nextUpdate */
193 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* isFullCtl */
194 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ctlSequence */
195 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* ctlCommands */
196};
197asn_SEQUENCE_specifics_t asn_SPC_CtlFormat_specs_1 = {
198 sizeof(struct CtlFormat),
199 offsetof(struct CtlFormat, _asn_ctx),
200 asn_MAP_CtlFormat_tag2el_1,
201 5, /* Count of tags in the map */
202 0, 0, 0, /* Optional elements (not needed) */
203 5, /* First extension addition */
204};
205asn_TYPE_descriptor_t asn_DEF_CtlFormat = {
206 "CtlFormat",
207 "CtlFormat",
208 &asn_OP_SEQUENCE,
209 asn_DEF_CtlFormat_tags_1,
210 sizeof(asn_DEF_CtlFormat_tags_1)
211 /sizeof(asn_DEF_CtlFormat_tags_1[0]), /* 1 */
212 asn_DEF_CtlFormat_tags_1, /* Same as above */
213 sizeof(asn_DEF_CtlFormat_tags_1)
214 /sizeof(asn_DEF_CtlFormat_tags_1[0]), /* 1 */
215 {
216#if !defined(ASN_DISABLE_OER_SUPPORT)
217 0,
218#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
219#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
220 0,
221#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
222 SEQUENCE_constraint
223 },
224 asn_MBR_CtlFormat_1,
225 5, /* Elements count */
226 &asn_SPC_CtlFormat_specs_1 /* Additional specs */
227};
228