src
denm_VDS.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 "ITS-Container"
4
* found in "/input/ITS-Container.asn"
5
* `asn1c -fcompound-names -fprefix=denm_ -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-example -gen-UPER -gen-JER`
6
*/
7
8
#include "
etsi_its_denm_coding/denm_VDS.h
"
9
10
static
int
check_permitted_alphabet_1
(
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
int
24
denm_VDS_constraint
(
const
asn_TYPE_descriptor_t
*td,
const
void
*sptr,
25
asn_app_constraint_failed_f
*ctfailcb,
void
*app_key) {
26
const
IA5String_t
*st = (
const
IA5String_t
*)sptr;
27
size_t
size;
28
29
if
(!sptr) {
30
ASN__CTFAIL
(app_key, td, sptr,
31
"%s: value not given (%s:%d)"
,
32
td->
name
, __FILE__, __LINE__);
33
return
-1;
34
}
35
36
size = st->
size
;
37
38
if
((size == 6UL)
39
&& !
check_permitted_alphabet_1
(st)) {
40
/* Constraint check succeeded */
41
return
0;
42
}
else
{
43
ASN__CTFAIL
(app_key, td, sptr,
44
"%s: constraint failed (%s:%d)"
,
45
td->
name
, __FILE__, __LINE__);
46
return
-1;
47
}
48
}
49
50
/*
51
* This type is implemented using IA5String,
52
* so here we adjust the DEF accordingly.
53
*/
54
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
55
asn_per_constraints_t
asn_PER_type_denm_VDS_constr_1
CC_NOTUSED
= {
56
{ APC_CONSTRAINED, 7, 7, 0, 127 }
/* (0..127) */
,
57
{ APC_CONSTRAINED, 0, 0, 6, 6 }
/* (SIZE(6..6)) */
,
58
0, 0
/* No PER character map necessary */
59
};
60
#endif
/* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
61
static
const
ber_tlv_tag_t
asn_DEF_denm_VDS_tags_1
[] = {
62
(
ASN_TAG_CLASS_UNIVERSAL
| (22 << 2))
63
};
64
asn_TYPE_descriptor_t
asn_DEF_denm_VDS
= {
65
"VDS"
,
66
"VDS"
,
67
&
asn_OP_IA5String
,
68
asn_DEF_denm_VDS_tags_1
,
69
sizeof
(
asn_DEF_denm_VDS_tags_1
)
70
/
sizeof
(
asn_DEF_denm_VDS_tags_1
[0]),
/* 1 */
71
asn_DEF_denm_VDS_tags_1
,
/* Same as above */
72
sizeof
(
asn_DEF_denm_VDS_tags_1
)
73
/
sizeof
(
asn_DEF_denm_VDS_tags_1
[0]),
/* 1 */
74
{
75
#if !defined(ASN_DISABLE_OER_SUPPORT)
76
0,
77
#endif
/* !defined(ASN_DISABLE_OER_SUPPORT) */
78
#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
79
&
asn_PER_type_denm_VDS_constr_1
,
80
#endif
/* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
81
#if !defined(ASN_DISABLE_JER_SUPPORT)
82
0,
83
#endif
/* !defined(ASN_DISABLE_JER_SUPPORT) */
84
denm_VDS_constraint
85
},
86
0, 0,
/* No members */
87
0
/* No specifics */
88
};
89
asn_DEF_denm_VDS
asn_TYPE_descriptor_t asn_DEF_denm_VDS
Definition:
denm_VDS.c:64
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
OCTET_STRING::buf
uint8_t * buf
Definition:
OCTET_STRING.h:15
asn_TYPE_descriptor_s
Definition:
constr_TYPE.h:224
CC_NOTUSED
asn_per_constraints_t asn_PER_type_denm_VDS_constr_1 CC_NOTUSED
Definition:
denm_VDS.c:55
denm_VDS_constraint
int denm_VDS_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition:
denm_VDS.c:24
OCTET_STRING
Definition:
OCTET_STRING.h:14
ASN__CTFAIL
#define ASN__CTFAIL
Definition:
constraints.h:57
check_permitted_alphabet_1
static int check_permitted_alphabet_1(const void *sptr)
Definition:
denm_VDS.c:10
asn_per_constraints_s
Definition:
per_support.h:30
denm_VDS.h
asn_PER_type_denm_VDS_constr_1
asn_per_constraints_t asn_PER_type_denm_VDS_constr_1
asn_OP_IA5String
asn_TYPE_operation_t asn_OP_IA5String
Definition:
IA5String.c:22
asn_DEF_denm_VDS_tags_1
static const ber_tlv_tag_t asn_DEF_denm_VDS_tags_1[]
Definition:
denm_VDS.c:61
OCTET_STRING::size
size_t size
Definition:
OCTET_STRING.h:16
etsi_its_denm_coding
Author(s): Jean-Pierre Busch
, Guido Küppers
, Lennart Reiher
autogenerated on Sun May 18 2025 02:23:47