Vanetza
Loading...
Searching...
No Matches
Psid.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 "Psid.h"
9
10int
11Vanetza_Security_Psid_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(1 /* No applicable constraints whatsoever */) {
25 (void)value; /* Unused variable */
26 /* Nothing is here. See below */
27 }
28
29 /* prevent infinite recursion */
30 if(td->encoding_constraints.general_constraints != Vanetza_Security_Psid_constraint) {
31 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
32 } else {
33 return 0;
34 }
35}
36
37/*
38 * This type is implemented using NativeInteger,
39 * so here we adjust the DEF accordingly.
40 */
41#if !defined(ASN_DISABLE_OER_SUPPORT)
42asn_oer_constraints_t asn_OER_type_Vanetza_Security_Psid_constr_1 CC_NOTUSED = {
43 { 0, 1 } /* (0..MAX) */,
44 -1};
45#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
46#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
47asn_per_constraints_t asn_PER_type_Vanetza_Security_Psid_constr_1 CC_NOTUSED = {
48 { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (0..MAX) */,
49 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
50 0, 0 /* No PER value map */
51};
52#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
53const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security_Psid_specs_1 = {
54 0, 0, 0, 0, 0,
55 0, /* Native long size */
56 1 /* Unsigned representation */
57};
58static const ber_tlv_tag_t asn_DEF_Vanetza_Security_Psid_tags_1[] = {
59 (ASN_TAG_CLASS_UNIVERSAL | (2 << 2))
60};
61asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_Psid = {
62 "Psid",
63 "Psid",
64 &asn_OP_NativeInteger,
65 asn_DEF_Vanetza_Security_Psid_tags_1,
66 sizeof(asn_DEF_Vanetza_Security_Psid_tags_1)
67 /sizeof(asn_DEF_Vanetza_Security_Psid_tags_1[0]), /* 1 */
68 asn_DEF_Vanetza_Security_Psid_tags_1, /* Same as above */
69 sizeof(asn_DEF_Vanetza_Security_Psid_tags_1)
70 /sizeof(asn_DEF_Vanetza_Security_Psid_tags_1[0]), /* 1 */
71 {
72#if !defined(ASN_DISABLE_OER_SUPPORT)
73 &asn_OER_type_Vanetza_Security_Psid_constr_1,
74#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
75#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
76 &asn_PER_type_Vanetza_Security_Psid_constr_1,
77#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
78#if !defined(ASN_DISABLE_JER_SUPPORT)
79 0,
80#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
81 Vanetza_Security_Psid_constraint
82 },
83 0, 0, /* No members */
84 &asn_SPC_Vanetza_Security_Psid_specs_1 /* Additional specs */
85};