denm_WMInumber.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 
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
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 >= 1UL && size <= 3UL)
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)
56  { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */,
57  { APC_CONSTRAINED, 2, 2, 1, 3 } /* (SIZE(1..3)) */,
58  0, 0 /* No PER character map necessary */
59 };
60 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
62  (ASN_TAG_CLASS_UNIVERSAL | (22 << 2))
63 };
65  "WMInumber",
66  "WMInumber",
70  /sizeof(asn_DEF_denm_WMInumber_tags_1[0]), /* 1 */
71  asn_DEF_denm_WMInumber_tags_1, /* Same as above */
73  /sizeof(asn_DEF_denm_WMInumber_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)
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) */
85  },
86  0, 0, /* No members */
87  0 /* No specifics */
88 };
89 
asn_DEF_denm_WMInumber
asn_TYPE_descriptor_t asn_DEF_denm_WMInumber
Definition: denm_WMInumber.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
check_permitted_alphabet_1
static int check_permitted_alphabet_1(const void *sptr)
Definition: denm_WMInumber.c:10
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
asn_per_constraints_t asn_PER_type_denm_WMInumber_constr_1 CC_NOTUSED
Definition: denm_WMInumber.c:55
OCTET_STRING::buf
uint8_t * buf
Definition: OCTET_STRING.h:15
asn_TYPE_descriptor_s
Definition: constr_TYPE.h:224
asn_PER_type_denm_WMInumber_constr_1
asn_per_constraints_t asn_PER_type_denm_WMInumber_constr_1
asn_DEF_denm_WMInumber_tags_1
static const ber_tlv_tag_t asn_DEF_denm_WMInumber_tags_1[]
Definition: denm_WMInumber.c:61
OCTET_STRING
Definition: OCTET_STRING.h:14
ASN__CTFAIL
#define ASN__CTFAIL
Definition: constraints.h:57
asn_per_constraints_s
Definition: per_support.h:30
denm_WMInumber_constraint
int denm_WMInumber_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: denm_WMInumber.c:24
asn_OP_IA5String
asn_TYPE_operation_t asn_OP_IA5String
Definition: IA5String.c:22
OCTET_STRING::size
size_t size
Definition: OCTET_STRING.h:16
denm_WMInumber.h


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