spatem_ts_DataParameters.c
Go to the documentation of this file.
1 /*
2  * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3  * From ASN.1 module "DSRC"
4  * found in "/input/ISO-TS-19091-addgrp-C-2018-patched.asn"
5  * `asn1c -fcompound-names -fprefix=spatem_ts_ -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-example -gen-UPER -gen-JER`
6  */
7 
9 
10 static int check_permitted_alphabet_2(const void *sptr) {
11  /* The underlying type is IA5String */
12  const IA5String_t *st = (const IA5String_t *)sptr;
13  const uint8_t *ch = st->buf;
14  const uint8_t *end = ch + st->size;
15 
16  for(; ch < end; ch++) {
17  uint8_t cv = *ch;
18  if(!(cv <= 127UL)) return -1;
19  }
20  return 0;
21 }
22 
23 static int check_permitted_alphabet_3(const void *sptr) {
24  /* The underlying type is IA5String */
25  const IA5String_t *st = (const IA5String_t *)sptr;
26  const uint8_t *ch = st->buf;
27  const uint8_t *end = ch + st->size;
28 
29  for(; ch < end; ch++) {
30  uint8_t cv = *ch;
31  if(!(cv <= 127UL)) return -1;
32  }
33  return 0;
34 }
35 
36 static int check_permitted_alphabet_4(const void *sptr) {
37  /* The underlying type is IA5String */
38  const IA5String_t *st = (const IA5String_t *)sptr;
39  const uint8_t *ch = st->buf;
40  const uint8_t *end = ch + st->size;
41 
42  for(; ch < end; ch++) {
43  uint8_t cv = *ch;
44  if(!(cv <= 127UL)) return -1;
45  }
46  return 0;
47 }
48 
49 static int check_permitted_alphabet_5(const void *sptr) {
50  /* The underlying type is IA5String */
51  const IA5String_t *st = (const IA5String_t *)sptr;
52  const uint8_t *ch = st->buf;
53  const uint8_t *end = ch + st->size;
54 
55  for(; ch < end; ch++) {
56  uint8_t cv = *ch;
57  if(!(cv <= 127UL)) return -1;
58  }
59  return 0;
60 }
61 
62 static int
64  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
65  const IA5String_t *st = (const IA5String_t *)sptr;
66  size_t size;
67 
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;
73  }
74 
75  size = st->size;
76 
77  if((size >= 1UL && size <= 255UL)
79  /* Constraint check succeeded */
80  return 0;
81  } else {
82  ASN__CTFAIL(app_key, td, sptr,
83  "%s: constraint failed (%s:%d)",
84  td->name, __FILE__, __LINE__);
85  return -1;
86  }
87 }
88 
89 static int
91  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
92  const IA5String_t *st = (const IA5String_t *)sptr;
93  size_t size;
94 
95  if(!sptr) {
96  ASN__CTFAIL(app_key, td, sptr,
97  "%s: value not given (%s:%d)",
98  td->name, __FILE__, __LINE__);
99  return -1;
100  }
101 
102  size = st->size;
103 
104  if((size >= 1UL && size <= 255UL)
105  && !check_permitted_alphabet_3(st)) {
106  /* Constraint check succeeded */
107  return 0;
108  } else {
109  ASN__CTFAIL(app_key, td, sptr,
110  "%s: constraint failed (%s:%d)",
111  td->name, __FILE__, __LINE__);
112  return -1;
113  }
114 }
115 
116 static int
118  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
119  const IA5String_t *st = (const IA5String_t *)sptr;
120  size_t size;
121 
122  if(!sptr) {
123  ASN__CTFAIL(app_key, td, sptr,
124  "%s: value not given (%s:%d)",
125  td->name, __FILE__, __LINE__);
126  return -1;
127  }
128 
129  size = st->size;
130 
131  if((size >= 1UL && size <= 255UL)
132  && !check_permitted_alphabet_4(st)) {
133  /* Constraint check succeeded */
134  return 0;
135  } else {
136  ASN__CTFAIL(app_key, td, sptr,
137  "%s: constraint failed (%s:%d)",
138  td->name, __FILE__, __LINE__);
139  return -1;
140  }
141 }
142 
143 static int
145  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
146  const IA5String_t *st = (const IA5String_t *)sptr;
147  size_t size;
148 
149  if(!sptr) {
150  ASN__CTFAIL(app_key, td, sptr,
151  "%s: value not given (%s:%d)",
152  td->name, __FILE__, __LINE__);
153  return -1;
154  }
155 
156  size = st->size;
157 
158  if((size >= 1UL && size <= 255UL)
159  && !check_permitted_alphabet_5(st)) {
160  /* Constraint check succeeded */
161  return 0;
162  } else {
163  ASN__CTFAIL(app_key, td, sptr,
164  "%s: constraint failed (%s:%d)",
165  td->name, __FILE__, __LINE__);
166  return -1;
167  }
168 }
169 
170 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
171 static asn_per_constraints_t asn_PER_memb_spatem_ts_processMethod_constr_2 CC_NOTUSED = {
172  { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
173  { APC_CONSTRAINED, 8, 8, 1, 255 } /* (SIZE(1..255)) */,
174  0, 0 /* No PER character map necessary */
175 };
176 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
177 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
178 static asn_per_constraints_t asn_PER_memb_spatem_ts_processAgency_constr_3 CC_NOTUSED = {
179  { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
180  { APC_CONSTRAINED, 8, 8, 1, 255 } /* (SIZE(1..255)) */,
181  0, 0 /* No PER character map necessary */
182 };
183 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
184 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
185 static asn_per_constraints_t asn_PER_memb_spatem_ts_lastCheckedDate_constr_4 CC_NOTUSED = {
186  { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
187  { APC_CONSTRAINED, 8, 8, 1, 255 } /* (SIZE(1..255)) */,
188  0, 0 /* No PER character map necessary */
189 };
190 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
191 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
192 static asn_per_constraints_t asn_PER_memb_spatem_ts_geoidUsed_constr_5 CC_NOTUSED = {
193  { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
194  { APC_CONSTRAINED, 8, 8, 1, 255 } /* (SIZE(1..255)) */,
195  0, 0 /* No PER character map necessary */
196 };
197 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
199  { ATF_POINTER, 4, offsetof(struct spatem_ts_DataParameters, processMethod),
200  (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
201  -1, /* IMPLICIT tag at current level */
203  0,
204  {
205 #if !defined(ASN_DISABLE_OER_SUPPORT)
206  0,
207 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
208 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
209  &asn_PER_memb_spatem_ts_processMethod_constr_2,
210 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
211 #if !defined(ASN_DISABLE_JER_SUPPORT)
212  0,
213 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
215  },
216  0, 0, /* No default value */
217  "processMethod"
218  },
219  { ATF_POINTER, 3, offsetof(struct spatem_ts_DataParameters, processAgency),
220  (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
221  -1, /* IMPLICIT tag at current level */
223  0,
224  {
225 #if !defined(ASN_DISABLE_OER_SUPPORT)
226  0,
227 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
228 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
229  &asn_PER_memb_spatem_ts_processAgency_constr_3,
230 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
231 #if !defined(ASN_DISABLE_JER_SUPPORT)
232  0,
233 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
235  },
236  0, 0, /* No default value */
237  "processAgency"
238  },
239  { ATF_POINTER, 2, offsetof(struct spatem_ts_DataParameters, lastCheckedDate),
240  (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
241  -1, /* IMPLICIT tag at current level */
243  0,
244  {
245 #if !defined(ASN_DISABLE_OER_SUPPORT)
246  0,
247 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
248 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
249  &asn_PER_memb_spatem_ts_lastCheckedDate_constr_4,
250 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
251 #if !defined(ASN_DISABLE_JER_SUPPORT)
252  0,
253 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
255  },
256  0, 0, /* No default value */
257  "lastCheckedDate"
258  },
259  { ATF_POINTER, 1, offsetof(struct spatem_ts_DataParameters, geoidUsed),
260  (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
261  -1, /* IMPLICIT tag at current level */
263  0,
264  {
265 #if !defined(ASN_DISABLE_OER_SUPPORT)
266  0,
267 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
268 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
269  &asn_PER_memb_spatem_ts_geoidUsed_constr_5,
270 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
271 #if !defined(ASN_DISABLE_JER_SUPPORT)
272  0,
273 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
275  },
276  0, 0, /* No default value */
277  "geoidUsed"
278  },
279 };
280 static const int asn_MAP_spatem_ts_DataParameters_oms_1[] = { 0, 1, 2, 3 };
282  (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
283 };
285  { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* processMethod */
286  { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* processAgency */
287  { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* lastCheckedDate */
288  { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* geoidUsed */
289 };
291  sizeof(struct spatem_ts_DataParameters),
294  4, /* Count of tags in the map */
295  asn_MAP_spatem_ts_DataParameters_oms_1, /* Optional members */
296  4, 0, /* Root/Additions */
297  4, /* First extension addition */
298 };
300  "DataParameters",
301  "DataParameters",
305  /sizeof(asn_DEF_spatem_ts_DataParameters_tags_1[0]), /* 1 */
306  asn_DEF_spatem_ts_DataParameters_tags_1, /* Same as above */
308  /sizeof(asn_DEF_spatem_ts_DataParameters_tags_1[0]), /* 1 */
309  {
310 #if !defined(ASN_DISABLE_OER_SUPPORT)
311  0,
312 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
313 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
314  0,
315 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
316 #if !defined(ASN_DISABLE_JER_SUPPORT)
317  0,
318 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
320  },
322  4, /* Elements count */
323  &asn_SPC_spatem_ts_DataParameters_specs_1 /* Additional specs */
324 };
325 
asn_OP_SEQUENCE
asn_TYPE_operation_t asn_OP_SEQUENCE
Definition: constr_SEQUENCE.c:9
asn_MBR_spatem_ts_DataParameters_1
asn_TYPE_member_t asn_MBR_spatem_ts_DataParameters_1[]
Definition: spatem_ts_DataParameters.c:198
asn_app_constraint_failed_f
void() asn_app_constraint_failed_f(void *application_specific_key, const struct asn_TYPE_descriptor_s *type_descriptor_which_failed, const void *structure_which_failed_ptr, const char *error_message_format,...) CC_PRINTFLIKE(4
Definition: asn_application.h:167
ASN_TAG_CLASS_CONTEXT
@ ASN_TAG_CLASS_CONTEXT
Definition: ber_tlv_tag.h:15
ber_tlv_tag_t
unsigned ber_tlv_tag_t
Definition: ber_tlv_tag.h:18
memb_spatem_ts_processMethod_constraint_1
static int memb_spatem_ts_processMethod_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: spatem_ts_DataParameters.c:63
ASN_TAG_CLASS_UNIVERSAL
@ ASN_TAG_CLASS_UNIVERSAL
Definition: ber_tlv_tag.h:13
asn_TYPE_descriptor_s::name
const char * name
Definition: constr_TYPE.h:225
check_permitted_alphabet_3
static int check_permitted_alphabet_3(const void *sptr)
Definition: spatem_ts_DataParameters.c:23
memb_spatem_ts_geoidUsed_constraint_1
static int memb_spatem_ts_geoidUsed_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: spatem_ts_DataParameters.c:144
check_permitted_alphabet_4
static int check_permitted_alphabet_4(const void *sptr)
Definition: spatem_ts_DataParameters.c:36
OCTET_STRING::buf
uint8_t * buf
Definition: OCTET_STRING.h:15
asn_DEF_spatem_ts_DataParameters_tags_1
static const ber_tlv_tag_t asn_DEF_spatem_ts_DataParameters_tags_1[]
Definition: spatem_ts_DataParameters.c:281
spatem_ts_DataParameters::_asn_ctx
asn_struct_ctx_t _asn_ctx
Definition: spatem_ts_DataParameters.h:34
asn_TYPE_tag2member_s
Definition: constr_TYPE.h:289
ATF_POINTER
@ ATF_POINTER
Definition: constr_TYPE.h:268
SEQUENCE_constraint
asn_constr_check_f SEQUENCE_constraint
Definition: constr_SEQUENCE.h:56
spatem_ts_DataParameters
Definition: spatem_ts_DataParameters.h:23
asn_TYPE_descriptor_s
Definition: constr_TYPE.h:224
offsetof
#define offsetof(s, m)
Definition: asn_system.h:132
asn_SPC_spatem_ts_DataParameters_specs_1
asn_SEQUENCE_specifics_t asn_SPC_spatem_ts_DataParameters_specs_1
Definition: spatem_ts_DataParameters.c:290
asn_DEF_IA5String
asn_TYPE_descriptor_t asn_DEF_IA5String
Definition: IA5String.c:80
asn_DEF_spatem_ts_DataParameters
asn_TYPE_descriptor_t asn_DEF_spatem_ts_DataParameters
Definition: spatem_ts_DataParameters.c:299
OCTET_STRING
Definition: OCTET_STRING.h:14
memb_spatem_ts_processAgency_constraint_1
static int memb_spatem_ts_processAgency_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: spatem_ts_DataParameters.c:90
asn_SEQUENCE_specifics_s
Definition: constr_SEQUENCE.h:14
ASN__CTFAIL
#define ASN__CTFAIL
Definition: constraints.h:57
asn_MAP_spatem_ts_DataParameters_tag2el_1
static const asn_TYPE_tag2member_t asn_MAP_spatem_ts_DataParameters_tag2el_1[]
Definition: spatem_ts_DataParameters.c:284
spatem_ts_DataParameters.h
check_permitted_alphabet_2
static int check_permitted_alphabet_2(const void *sptr)
Definition: spatem_ts_DataParameters.c:10
asn_per_constraints_s
Definition: per_support.h:30
check_permitted_alphabet_5
static int check_permitted_alphabet_5(const void *sptr)
Definition: spatem_ts_DataParameters.c:49
asn_TYPE_member_s
Definition: constr_TYPE.h:272
asn_MAP_spatem_ts_DataParameters_oms_1
static const int asn_MAP_spatem_ts_DataParameters_oms_1[]
Definition: spatem_ts_DataParameters.c:280
memb_spatem_ts_lastCheckedDate_constraint_1
static int memb_spatem_ts_lastCheckedDate_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: spatem_ts_DataParameters.c:117
CC_NOTUSED
static asn_per_constraints_t asn_PER_memb_spatem_ts_processMethod_constr_2 CC_NOTUSED
Definition: spatem_ts_DataParameters.c:171
OCTET_STRING::size
size_t size
Definition: OCTET_STRING.h:16


etsi_its_spatem_ts_coding
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:29:28