cam_ts_EventZone.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 "ETSI-ITS-CDD"
4  * found in "/input/ETSI-ITS-CDD.asn"
5  * `asn1c -fcompound-names -fprefix=cam_ts_ -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-example -gen-UPER -gen-JER`
6  */
7 
9 
10 int
12  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13  size_t size;
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  /* Determine the number of elements */
23  size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
24 
25  if((size >= 1UL && size <= 23UL)) {
26  /* Perform validation of the inner elements */
27  return SEQUENCE_OF_constraint(td, sptr, ctfailcb, app_key);
28  } else {
29  ASN__CTFAIL(app_key, td, sptr,
30  "%s: constraint failed (%s:%d)",
31  td->name, __FILE__, __LINE__);
32  return -1;
33  }
34 }
35 
36 /*
37  * This type is implemented using cam_ts_EventHistory,
38  * so here we adjust the DEF accordingly.
39  */
40 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
41 static asn_per_constraints_t asn_PER_type_cam_ts_EventZone_constr_1 CC_NOTUSED = {
42  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
43  { APC_CONSTRAINED, 5, 5, 1, 23 } /* (SIZE(1..23)) */,
44  0, 0 /* No PER value map */
45 };
46 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
48  (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
49 };
51  "EventZone",
52  "EventZone",
56  /sizeof(asn_DEF_cam_ts_EventZone_tags_1[0]), /* 1 */
57  asn_DEF_cam_ts_EventZone_tags_1, /* Same as above */
59  /sizeof(asn_DEF_cam_ts_EventZone_tags_1[0]), /* 1 */
60  {
61 #if !defined(ASN_DISABLE_OER_SUPPORT)
62  0,
63 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
64 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
65  &asn_PER_type_cam_ts_EventZone_constr_1,
66 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
67 #if !defined(ASN_DISABLE_JER_SUPPORT)
68  0,
69 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
71  },
73  1, /* Single element */
74  &asn_SPC_cam_ts_EventHistory_specs_1 /* Additional specs */
75 };
76 
_A_CSEQUENCE_FROM_VOID
#define _A_CSEQUENCE_FROM_VOID(ptr)
Definition: asn_SEQUENCE_OF.h:46
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
ber_tlv_tag_t
unsigned ber_tlv_tag_t
Definition: ber_tlv_tag.h:18
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
SEQUENCE_OF_constraint
#define SEQUENCE_OF_constraint
Definition: constr_SEQUENCE_OF.h:28
asn_DEF_cam_ts_EventZone
asn_TYPE_descriptor_t asn_DEF_cam_ts_EventZone
Definition: cam_ts_EventZone.c:50
asn_OP_SEQUENCE_OF
asn_TYPE_operation_t asn_OP_SEQUENCE_OF
Definition: constr_SEQUENCE_OF.c:10
asn_TYPE_descriptor_s
Definition: constr_TYPE.h:224
asn_SPC_cam_ts_EventHistory_specs_1
asn_SET_OF_specifics_t asn_SPC_cam_ts_EventHistory_specs_1
Definition: cam_ts_EventHistory.c:42
ASN__CTFAIL
#define ASN__CTFAIL
Definition: constraints.h:57
cam_ts_EventZone.h
asn_DEF_cam_ts_EventZone_tags_1
static const ber_tlv_tag_t asn_DEF_cam_ts_EventZone_tags_1[]
Definition: cam_ts_EventZone.c:47
cam_ts_EventZone_constraint
int cam_ts_EventZone_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: cam_ts_EventZone.c:11
asn_MBR_cam_ts_EventHistory_1
asn_TYPE_member_t asn_MBR_cam_ts_EventHistory_1[1]
Definition: cam_ts_EventHistory.c:17
asn_per_constraints_s
Definition: per_support.h:30
CC_NOTUSED
static asn_per_constraints_t asn_PER_type_cam_ts_EventZone_constr_1 CC_NOTUSED
Definition: cam_ts_EventZone.c:41


etsi_its_cam_ts_coding
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:21:22