Vanetza
Loading...
Searching...
No Matches
GroupLinkageValue.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
9
10static int
11memb_Vanetza_Security_jValue_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
14 size_t size;
15
16 if(!sptr) {
17 ASN__CTFAIL(app_key, td, sptr,
18 "%s: value not given (%s:%d)",
19 td->name, __FILE__, __LINE__);
20 return -1;
21 }
22
23 size = st->size;
24
25 if((size == 4UL)) {
26 /* Constraint check succeeded */
27 return 0;
28 } else {
29 ASN__CTFAIL(app_key, td, sptr,
30 "%s: constraint failed (%s:%d)",
31 td->name, __FILE__, __LINE__);
32 return -1;
33 }
34}
35
36static int
37memb_Vanetza_Security_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
38 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
40 size_t size;
41
42 if(!sptr) {
43 ASN__CTFAIL(app_key, td, sptr,
44 "%s: value not given (%s:%d)",
45 td->name, __FILE__, __LINE__);
46 return -1;
47 }
48
49 size = st->size;
50
51 if((size == 9UL)) {
52 /* Constraint check succeeded */
53 return 0;
54 } else {
55 ASN__CTFAIL(app_key, td, sptr,
56 "%s: constraint failed (%s:%d)",
57 td->name, __FILE__, __LINE__);
58 return -1;
59 }
60}
61
62#if !defined(ASN_DISABLE_OER_SUPPORT)
63static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_jValue_constr_2 CC_NOTUSED = {
64 { 0, 0 },
65 4 /* (SIZE(4..4)) */};
66#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
67#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
68static asn_per_constraints_t asn_PER_memb_Vanetza_Security_jValue_constr_2 CC_NOTUSED = {
69 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
70 { APC_CONSTRAINED, 0, 0, 4, 4 } /* (SIZE(4..4)) */,
71 0, 0 /* No PER value map */
72};
73#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
74#if !defined(ASN_DISABLE_OER_SUPPORT)
75static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_value_constr_3 CC_NOTUSED = {
76 { 0, 0 },
77 9 /* (SIZE(9..9)) */};
78#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
79#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
80static asn_per_constraints_t asn_PER_memb_Vanetza_Security_value_constr_3 CC_NOTUSED = {
81 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
82 { APC_CONSTRAINED, 0, 0, 9, 9 } /* (SIZE(9..9)) */,
83 0, 0 /* No PER value map */
84};
85#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
86asn_TYPE_member_t asn_MBR_Vanetza_Security_GroupLinkageValue_1[] = {
87 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_GroupLinkageValue, jValue),
88 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
89 -1, /* IMPLICIT tag at current level */
90 &asn_DEF_OCTET_STRING,
91 0,
92 {
93#if !defined(ASN_DISABLE_OER_SUPPORT)
94 &asn_OER_memb_Vanetza_Security_jValue_constr_2,
95#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
96#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
97 &asn_PER_memb_Vanetza_Security_jValue_constr_2,
98#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
99#if !defined(ASN_DISABLE_JER_SUPPORT)
100 0,
101#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
102 memb_Vanetza_Security_jValue_constraint_1
103 },
104 0, 0, /* No default value */
105 "jValue"
106 },
107 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_GroupLinkageValue, value),
108 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
109 -1, /* IMPLICIT tag at current level */
110 &asn_DEF_OCTET_STRING,
111 0,
112 {
113#if !defined(ASN_DISABLE_OER_SUPPORT)
114 &asn_OER_memb_Vanetza_Security_value_constr_3,
115#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
116#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
117 &asn_PER_memb_Vanetza_Security_value_constr_3,
118#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
119#if !defined(ASN_DISABLE_JER_SUPPORT)
120 0,
121#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
122 memb_Vanetza_Security_value_constraint_1
123 },
124 0, 0, /* No default value */
125 "value"
126 },
127};
128static const ber_tlv_tag_t asn_DEF_Vanetza_Security_GroupLinkageValue_tags_1[] = {
129 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
130};
131static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security_GroupLinkageValue_tag2el_1[] = {
132 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* jValue */
133 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* value */
134};
135asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security_GroupLinkageValue_specs_1 = {
136 sizeof(struct Vanetza_Security_GroupLinkageValue),
137 offsetof(struct Vanetza_Security_GroupLinkageValue, _asn_ctx),
138 asn_MAP_Vanetza_Security_GroupLinkageValue_tag2el_1,
139 2, /* Count of tags in the map */
140 0, 0, 0, /* Optional elements (not needed) */
141 -1, /* First extension addition */
142};
143asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_GroupLinkageValue = {
144 "GroupLinkageValue",
145 "GroupLinkageValue",
146 &asn_OP_SEQUENCE,
147 asn_DEF_Vanetza_Security_GroupLinkageValue_tags_1,
148 sizeof(asn_DEF_Vanetza_Security_GroupLinkageValue_tags_1)
149 /sizeof(asn_DEF_Vanetza_Security_GroupLinkageValue_tags_1[0]), /* 1 */
150 asn_DEF_Vanetza_Security_GroupLinkageValue_tags_1, /* Same as above */
151 sizeof(asn_DEF_Vanetza_Security_GroupLinkageValue_tags_1)
152 /sizeof(asn_DEF_Vanetza_Security_GroupLinkageValue_tags_1[0]), /* 1 */
153 {
154#if !defined(ASN_DISABLE_OER_SUPPORT)
155 0,
156#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
157#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
158 0,
159#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
160#if !defined(ASN_DISABLE_JER_SUPPORT)
161 0,
162#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
163 SEQUENCE_constraint
164 },
165 asn_MBR_Vanetza_Security_GroupLinkageValue_1,
166 2, /* Elements count */
167 &asn_SPC_Vanetza_Security_GroupLinkageValue_specs_1 /* Additional specs */
168};