Vanetza
Loading...
Searching...
No Matches
Uint32.c
1/*
2 * Generated by asn1c
3 * From ASN.1 module "Ieee1609Dot2BaseTypes"
4 * found in "Ieee1609Dot2BaseTypes.asn"
5 * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security_ -R`
6 */
7
8#include "Uint32.h"
9
10int
11Vanetza_Security_Uint32_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 unsigned 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 unsigned long *)sptr;
23
24 if((value <= 4294967295UL)) {
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/*
36 * This type is implemented using NativeInteger,
37 * so here we adjust the DEF accordingly.
38 */
39#if !defined(ASN_DISABLE_OER_SUPPORT)
40asn_oer_constraints_t asn_OER_type_Vanetza_Security_Uint32_constr_1 CC_NOTUSED = {
41 { 4, 1 } /* (0..4294967295) */,
42 -1};
43#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
44#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
45asn_per_constraints_t asn_PER_type_Vanetza_Security_Uint32_constr_1 CC_NOTUSED = {
46 { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */,
47 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
48 0, 0 /* No PER value map */
49};
50#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
51const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security_Uint32_specs_1 = {
52 0, 0, 0, 0, 0,
53 0, /* Native long size */
54 1 /* Unsigned representation */
55};
56static const ber_tlv_tag_t asn_DEF_Vanetza_Security_Uint32_tags_1[] = {
57 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
58};
59asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_Uint32 = {
60 "Uint32",
61 "Uint32",
62 &asn_OP_NativeInteger,
63 asn_DEF_Vanetza_Security_Uint32_tags_1,
64 sizeof(asn_DEF_Vanetza_Security_Uint32_tags_1)
65 /sizeof(asn_DEF_Vanetza_Security_Uint32_tags_1[0]), /* 1 */
66 asn_DEF_Vanetza_Security_Uint32_tags_1, /* Same as above */
67 sizeof(asn_DEF_Vanetza_Security_Uint32_tags_1)
68 /sizeof(asn_DEF_Vanetza_Security_Uint32_tags_1[0]), /* 1 */
69 {
70#if !defined(ASN_DISABLE_OER_SUPPORT)
71 &asn_OER_type_Vanetza_Security_Uint32_constr_1,
72#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
73#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
74 &asn_PER_type_Vanetza_Security_Uint32_constr_1,
75#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
76#if !defined(ASN_DISABLE_JER_SUPPORT)
77 0,
78#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
79 Vanetza_Security_Uint32_constraint
80 },
81 0, 0, /* No members */
82 &asn_SPC_Vanetza_Security_Uint32_specs_1 /* Additional specs */
83};