cam_ts_ObjectClass.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 static int
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 >= 5L && value <= 11L) || (value == 14L))) {
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 static int
37  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38 
39  if(!sptr) {
40  ASN__CTFAIL(app_key, td, sptr,
41  "%s: value not given (%s:%d)",
42  td->name, __FILE__, __LINE__);
43  return -1;
44  }
45 
46 
47  if(1 /* No applicable constraints whatsoever */) {
48  /* Nothing is here. See below */
49  }
50 
51  return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
52 }
53 
54 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
55 static asn_per_constraints_t asn_PER_memb_cam_ts_vehicleSubClass_constr_2 CC_NOTUSED = {
56  { APC_CONSTRAINED, 4, 4, 0, 14 } /* (0..14) */,
57  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
58  0, 0 /* No PER value map */
59 };
60 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
61 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
62 static asn_per_constraints_t asn_PER_memb_cam_ts_groupSubClass_constr_4 CC_NOTUSED = {
63  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
64  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
65  0, 0 /* No PER value map */
66 };
67 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
68 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
70  { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */,
71  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
72  0, 0 /* No PER value map */
73 };
74 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
76  { ATF_NOFLAGS, 0, offsetof(struct cam_ts_ObjectClass, choice.vehicleSubClass),
77  (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
78  -1, /* IMPLICIT tag at current level */
80  0,
81  {
82 #if !defined(ASN_DISABLE_OER_SUPPORT)
83  0,
84 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
85 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
86  &asn_PER_memb_cam_ts_vehicleSubClass_constr_2,
87 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
88 #if !defined(ASN_DISABLE_JER_SUPPORT)
89  0,
90 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
92  },
93  0, 0, /* No default value */
94  "vehicleSubClass"
95  },
96  { ATF_NOFLAGS, 0, offsetof(struct cam_ts_ObjectClass, choice.vruSubClass),
97  (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
98  +1, /* EXPLICIT tag at current level */
100  0,
101  {
102 #if !defined(ASN_DISABLE_OER_SUPPORT)
103  0,
104 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
105 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
106  0,
107 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
108 #if !defined(ASN_DISABLE_JER_SUPPORT)
109  0,
110 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
111  0
112  },
113  0, 0, /* No default value */
114  "vruSubClass"
115  },
116  { ATF_NOFLAGS, 0, offsetof(struct cam_ts_ObjectClass, choice.groupSubClass),
117  (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
118  -1, /* IMPLICIT tag at current level */
120  0,
121  {
122 #if !defined(ASN_DISABLE_OER_SUPPORT)
123  0,
124 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
125 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
126  &asn_PER_memb_cam_ts_groupSubClass_constr_4,
127 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
128 #if !defined(ASN_DISABLE_JER_SUPPORT)
129  0,
130 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
132  },
133  0, 0, /* No default value */
134  "groupSubClass"
135  },
136  { ATF_NOFLAGS, 0, offsetof(struct cam_ts_ObjectClass, choice.otherSubClass),
137  (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
138  -1, /* IMPLICIT tag at current level */
140  0,
141  {
142 #if !defined(ASN_DISABLE_OER_SUPPORT)
143  0,
144 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
145 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
146  0,
147 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
148 #if !defined(ASN_DISABLE_JER_SUPPORT)
149  0,
150 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
151  0
152  },
153  0, 0, /* No default value */
154  "otherSubClass"
155  },
156 };
158  { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* vehicleSubClass */
159  { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* vruSubClass */
160  { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* groupSubClass */
161  { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* otherSubClass */
162 };
164  sizeof(struct cam_ts_ObjectClass),
167  sizeof(((struct cam_ts_ObjectClass *)0)->present),
169  4, /* Count of tags in the map */
170  0, 0,
171  4 /* Extensions start */
172 };
174  "ObjectClass",
175  "ObjectClass",
176  &asn_OP_CHOICE,
177  0, /* No effective tags (pointer) */
178  0, /* No effective tags (count) */
179  0, /* No tags (pointer) */
180  0, /* No tags (count) */
181  {
182 #if !defined(ASN_DISABLE_OER_SUPPORT)
183  0,
184 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
185 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
187 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
188 #if !defined(ASN_DISABLE_JER_SUPPORT)
189  0,
190 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
192  },
194  4, /* Elements count */
195  &asn_SPC_cam_ts_ObjectClass_specs_1 /* Additional specs */
196 };
197 
asn_OP_CHOICE
asn_TYPE_operation_t asn_OP_CHOICE
Definition: constr_CHOICE.c:8
cam_ts_ObjectClass.h
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
asn_DEF_cam_ts_VruProfileAndSubprofile
asn_TYPE_descriptor_t asn_DEF_cam_ts_VruProfileAndSubprofile
Definition: cam_ts_VruProfileAndSubprofile.c:115
asn_TYPE_descriptor_s::name
const char * name
Definition: constr_TYPE.h:225
asn_CHOICE_specifics_s
Definition: constr_CHOICE.h:14
asn_TYPE_tag2member_s
Definition: constr_TYPE.h:289
asn_DEF_cam_ts_ObjectClass
asn_TYPE_descriptor_t asn_DEF_cam_ts_ObjectClass
Definition: cam_ts_ObjectClass.c:173
cam_ts_ObjectClass::_asn_ctx
asn_struct_ctx_t _asn_ctx
Definition: cam_ts_ObjectClass.h:51
asn_DEF_cam_ts_OtherSubClass
asn_TYPE_descriptor_t asn_DEF_cam_ts_OtherSubClass
Definition: cam_ts_OtherSubClass.c:49
asn_PER_type_cam_ts_ObjectClass_constr_1
asn_per_constraints_t asn_PER_type_cam_ts_ObjectClass_constr_1
asn_TYPE_descriptor_s
Definition: constr_TYPE.h:224
cam_ts_ObjectClass
Definition: cam_ts_ObjectClass.h:37
offsetof
#define offsetof(s, m)
Definition: asn_system.h:132
cam_ts_ObjectClass::present
cam_ts_ObjectClass_PR present
Definition: cam_ts_ObjectClass.h:38
asn_SPC_cam_ts_ObjectClass_specs_1
asn_CHOICE_specifics_t asn_SPC_cam_ts_ObjectClass_specs_1
Definition: cam_ts_ObjectClass.c:163
asn_DEF_cam_ts_TrafficParticipantType
asn_TYPE_descriptor_t asn_DEF_cam_ts_TrafficParticipantType
Definition: cam_ts_TrafficParticipantType.c:49
asn_MBR_cam_ts_ObjectClass_1
asn_TYPE_member_t asn_MBR_cam_ts_ObjectClass_1[]
Definition: cam_ts_ObjectClass.c:75
memb_cam_ts_groupSubClass_constraint_1
static int memb_cam_ts_groupSubClass_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: cam_ts_ObjectClass.c:36
CHOICE_constraint
asn_constr_check_f CHOICE_constraint
Definition: constr_CHOICE.h:51
ATF_NOFLAGS
@ ATF_NOFLAGS
Definition: constr_TYPE.h:267
ASN__CTFAIL
#define ASN__CTFAIL
Definition: constraints.h:57
asn_encoding_constraints_s::general_constraints
asn_constr_check_f * general_constraints
Definition: constr_TYPE.h:218
memb_cam_ts_vehicleSubClass_constraint_1
static int memb_cam_ts_vehicleSubClass_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: cam_ts_ObjectClass.c:11
asn_MAP_cam_ts_ObjectClass_tag2el_1
static const asn_TYPE_tag2member_t asn_MAP_cam_ts_ObjectClass_tag2el_1[]
Definition: cam_ts_ObjectClass.c:157
asn_per_constraints_s
Definition: per_support.h:30
asn_TYPE_member_s
Definition: constr_TYPE.h:272
asn_TYPE_descriptor_s::encoding_constraints
asn_encoding_constraints_t encoding_constraints
Definition: constr_TYPE.h:247
asn_DEF_cam_ts_VruClusterInformation
asn_TYPE_descriptor_t asn_DEF_cam_ts_VruClusterInformation
Definition: cam_ts_VruClusterInformation.c:137
CC_NOTUSED
static asn_per_constraints_t asn_PER_memb_cam_ts_vehicleSubClass_constr_2 CC_NOTUSED
Definition: cam_ts_ObjectClass.c:55


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