vam_ts_MitigationPerTechnologyClass.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=vam_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 <= 10000L)) {
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  long value;
39 
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;
45  }
46 
47  value = *(const long *)sptr;
48 
49  if((value >= 0L && value <= 30L)) {
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;
57  }
58 }
59 
60 static int
62  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
63  long value;
64 
65  if(!sptr) {
66  ASN__CTFAIL(app_key, td, sptr,
67  "%s: value not given (%s:%d)",
68  td->name, __FILE__, __LINE__);
69  return -1;
70  }
71 
72  value = *(const long *)sptr;
73 
74  if((value >= 0L && value <= 1200L)) {
75  /* Constraint check succeeded */
76  return 0;
77  } else {
78  ASN__CTFAIL(app_key, td, sptr,
79  "%s: constraint failed (%s:%d)",
80  td->name, __FILE__, __LINE__);
81  return -1;
82  }
83 }
84 
85 static int
87  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
88  long value;
89 
90  if(!sptr) {
91  ASN__CTFAIL(app_key, td, sptr,
92  "%s: value not given (%s:%d)",
93  td->name, __FILE__, __LINE__);
94  return -1;
95  }
96 
97  value = *(const long *)sptr;
98 
99  if((value >= 0L && value <= 20L)) {
100  /* Constraint check succeeded */
101  return 0;
102  } else {
103  ASN__CTFAIL(app_key, td, sptr,
104  "%s: constraint failed (%s:%d)",
105  td->name, __FILE__, __LINE__);
106  return -1;
107  }
108 }
109 
110 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
111 static asn_per_constraints_t asn_PER_memb_vam_ts_lowDutyCycle_constr_3 CC_NOTUSED = {
112  { APC_CONSTRAINED, 14, 14, 0, 10000 } /* (0..10000) */,
113  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
114  0, 0 /* No PER value map */
115 };
116 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
117 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
118 static asn_per_constraints_t asn_PER_memb_vam_ts_powerReduction_constr_4 CC_NOTUSED = {
119  { APC_CONSTRAINED, 5, 5, 0, 30 } /* (0..30) */,
120  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
121  0, 0 /* No PER value map */
122 };
123 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
124 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
125 static asn_per_constraints_t asn_PER_memb_vam_ts_dmcToffLimit_constr_5 CC_NOTUSED = {
126  { APC_CONSTRAINED, 11, 11, 0, 1200 } /* (0..1200) */,
127  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
128  0, 0 /* No PER value map */
129 };
130 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
131 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
132 static asn_per_constraints_t asn_PER_memb_vam_ts_dmcTonLimit_constr_6 CC_NOTUSED = {
133  { APC_CONSTRAINED, 5, 5, 0, 20 } /* (0..20) */,
134  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
135  0, 0 /* No PER value map */
136 };
137 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
139  { ATF_NOFLAGS, 0, offsetof(struct vam_ts_MitigationPerTechnologyClass, accessTechnologyClass),
140  (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
141  -1, /* IMPLICIT tag at current level */
143  0,
144  {
145 #if !defined(ASN_DISABLE_OER_SUPPORT)
146  0,
147 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
148 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
149  0,
150 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
151 #if !defined(ASN_DISABLE_JER_SUPPORT)
152  0,
153 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
154  0
155  },
156  0, 0, /* No default value */
157  "accessTechnologyClass"
158  },
159  { ATF_POINTER, 4, offsetof(struct vam_ts_MitigationPerTechnologyClass, lowDutyCycle),
160  (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
161  -1, /* IMPLICIT tag at current level */
163  0,
164  {
165 #if !defined(ASN_DISABLE_OER_SUPPORT)
166  0,
167 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
168 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
169  &asn_PER_memb_vam_ts_lowDutyCycle_constr_3,
170 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
171 #if !defined(ASN_DISABLE_JER_SUPPORT)
172  0,
173 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
175  },
176  0, 0, /* No default value */
177  "lowDutyCycle"
178  },
179  { ATF_POINTER, 3, offsetof(struct vam_ts_MitigationPerTechnologyClass, powerReduction),
180  (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
181  -1, /* IMPLICIT tag at current level */
183  0,
184  {
185 #if !defined(ASN_DISABLE_OER_SUPPORT)
186  0,
187 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
188 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
189  &asn_PER_memb_vam_ts_powerReduction_constr_4,
190 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
191 #if !defined(ASN_DISABLE_JER_SUPPORT)
192  0,
193 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
195  },
196  0, 0, /* No default value */
197  "powerReduction"
198  },
199  { ATF_POINTER, 2, offsetof(struct vam_ts_MitigationPerTechnologyClass, dmcToffLimit),
200  (ASN_TAG_CLASS_CONTEXT | (3 << 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_vam_ts_dmcToffLimit_constr_5,
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  "dmcToffLimit"
218  },
219  { ATF_POINTER, 1, offsetof(struct vam_ts_MitigationPerTechnologyClass, dmcTonLimit),
220  (ASN_TAG_CLASS_CONTEXT | (4 << 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_vam_ts_dmcTonLimit_constr_6,
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  "dmcTonLimit"
238  },
239 };
240 static const int asn_MAP_vam_ts_MitigationPerTechnologyClass_oms_1[] = { 1, 2, 3, 4 };
242  (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
243 };
245  { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* accessTechnologyClass */
246  { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* lowDutyCycle */
247  { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* powerReduction */
248  { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* dmcToffLimit */
249  { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* dmcTonLimit */
250 };
255  5, /* Count of tags in the map */
257  4, 0, /* Root/Additions */
258  5, /* First extension addition */
259 };
261  "MitigationPerTechnologyClass",
262  "MitigationPerTechnologyClass",
270  {
271 #if !defined(ASN_DISABLE_OER_SUPPORT)
272  0,
273 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
274 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
275  0,
276 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
277 #if !defined(ASN_DISABLE_JER_SUPPORT)
278  0,
279 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
281  },
283  5, /* Elements count */
285 };
286 
asn_OP_SEQUENCE
asn_TYPE_operation_t asn_OP_SEQUENCE
Definition: constr_SEQUENCE.c:9
vam_ts_MitigationPerTechnologyClass::_asn_ctx
asn_struct_ctx_t _asn_ctx
Definition: vam_ts_MitigationPerTechnologyClass.h:36
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_MBR_vam_ts_MitigationPerTechnologyClass_1
asn_TYPE_member_t asn_MBR_vam_ts_MitigationPerTechnologyClass_1[]
Definition: vam_ts_MitigationPerTechnologyClass.c:138
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
CC_NOTUSED
static asn_per_constraints_t asn_PER_memb_vam_ts_lowDutyCycle_constr_3 CC_NOTUSED
Definition: vam_ts_MitigationPerTechnologyClass.c:111
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
asn_TYPE_descriptor_s
Definition: constr_TYPE.h:224
offsetof
#define offsetof(s, m)
Definition: asn_system.h:132
vam_ts_MitigationPerTechnologyClass.h
asn_DEF_vam_ts_MitigationPerTechnologyClass_tags_1
static const ber_tlv_tag_t asn_DEF_vam_ts_MitigationPerTechnologyClass_tags_1[]
Definition: vam_ts_MitigationPerTechnologyClass.c:241
memb_vam_ts_dmcToffLimit_constraint_1
static int memb_vam_ts_dmcToffLimit_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: vam_ts_MitigationPerTechnologyClass.c:61
memb_vam_ts_lowDutyCycle_constraint_1
static int memb_vam_ts_lowDutyCycle_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: vam_ts_MitigationPerTechnologyClass.c:11
asn_SPC_vam_ts_MitigationPerTechnologyClass_specs_1
asn_SEQUENCE_specifics_t asn_SPC_vam_ts_MitigationPerTechnologyClass_specs_1
Definition: vam_ts_MitigationPerTechnologyClass.c:251
asn_MAP_vam_ts_MitigationPerTechnologyClass_oms_1
static const int asn_MAP_vam_ts_MitigationPerTechnologyClass_oms_1[]
Definition: vam_ts_MitigationPerTechnologyClass.c:240
memb_vam_ts_powerReduction_constraint_1
static int memb_vam_ts_powerReduction_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: vam_ts_MitigationPerTechnologyClass.c:36
asn_DEF_NativeInteger
asn_TYPE_descriptor_t asn_DEF_NativeInteger
Definition: NativeInteger.c:80
asn_DEF_vam_ts_MitigationPerTechnologyClass
asn_TYPE_descriptor_t asn_DEF_vam_ts_MitigationPerTechnologyClass
Definition: vam_ts_MitigationPerTechnologyClass.c:260
ATF_NOFLAGS
@ ATF_NOFLAGS
Definition: constr_TYPE.h:267
memb_vam_ts_dmcTonLimit_constraint_1
static int memb_vam_ts_dmcTonLimit_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: vam_ts_MitigationPerTechnologyClass.c:86
vam_ts_MitigationPerTechnologyClass
Definition: vam_ts_MitigationPerTechnologyClass.h:24
asn_DEF_vam_ts_AccessTechnologyClass
asn_TYPE_descriptor_t asn_DEF_vam_ts_AccessTechnologyClass
Definition: vam_ts_AccessTechnologyClass.c:47
asn_SEQUENCE_specifics_s
Definition: constr_SEQUENCE.h:14
ASN__CTFAIL
#define ASN__CTFAIL
Definition: constraints.h:57
asn_MAP_vam_ts_MitigationPerTechnologyClass_tag2el_1
static const asn_TYPE_tag2member_t asn_MAP_vam_ts_MitigationPerTechnologyClass_tag2el_1[]
Definition: vam_ts_MitigationPerTechnologyClass.c:244
asn_per_constraints_s
Definition: per_support.h:30
asn_TYPE_member_s
Definition: constr_TYPE.h:272


etsi_its_vam_ts_coding
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:30:55