spatem_ts_ItsPduHeader.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=spatem_ts_ -no-gen-BER -no-gen-XER -no-gen-OER -no-gen-example -gen-UPER -gen-JER`
6  */
7 
9 
10 static int
12  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13  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 long *)sptr;
23 
24  if((value >= 0L && value <= 255L)) {
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 static int
37  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
38  long value;
39 
40  if(!sptr) {
41  ASN__CTFAIL(app_key, td, sptr,
42  "%s: value not given (%s:%d)",
43  td->name, __FILE__, __LINE__);
44  return -1;
45  }
46 
47  value = *(const long *)sptr;
48 
49  if((value >= 0L && value <= 255L)) {
50  /* Constraint check succeeded */
51  return 0;
52  } else {
53  ASN__CTFAIL(app_key, td, sptr,
54  "%s: constraint failed (%s:%d)",
55  td->name, __FILE__, __LINE__);
56  return -1;
57  }
58 }
59 
60 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
61 static asn_per_constraints_t asn_PER_memb_spatem_ts_protocolVersion_constr_2 CC_NOTUSED = {
62  { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
63  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
64  0, 0 /* No PER value map */
65 };
66 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
67 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
68 static asn_per_constraints_t asn_PER_memb_spatem_ts_messageID_constr_3 CC_NOTUSED = {
69  { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
70  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
71  0, 0 /* No PER value map */
72 };
73 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
75  { ATF_NOFLAGS, 0, offsetof(struct spatem_ts_ItsPduHeader, protocolVersion),
76  (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
77  -1, /* IMPLICIT tag at current level */
79  0,
80  {
81 #if !defined(ASN_DISABLE_OER_SUPPORT)
82  0,
83 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
84 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
85  &asn_PER_memb_spatem_ts_protocolVersion_constr_2,
86 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
87 #if !defined(ASN_DISABLE_JER_SUPPORT)
88  0,
89 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
91  },
92  0, 0, /* No default value */
93  "protocolVersion"
94  },
95  { ATF_NOFLAGS, 0, offsetof(struct spatem_ts_ItsPduHeader, messageID),
96  (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
97  -1, /* IMPLICIT tag at current level */
99  0,
100  {
101 #if !defined(ASN_DISABLE_OER_SUPPORT)
102  0,
103 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
104 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
105  &asn_PER_memb_spatem_ts_messageID_constr_3,
106 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
107 #if !defined(ASN_DISABLE_JER_SUPPORT)
108  0,
109 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
111  },
112  0, 0, /* No default value */
113  "messageID"
114  },
115  { ATF_NOFLAGS, 0, offsetof(struct spatem_ts_ItsPduHeader, stationID),
116  (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
117  -1, /* IMPLICIT tag at current level */
119  0,
120  {
121 #if !defined(ASN_DISABLE_OER_SUPPORT)
122  0,
123 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
124 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
125  0,
126 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
127 #if !defined(ASN_DISABLE_JER_SUPPORT)
128  0,
129 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
130  0
131  },
132  0, 0, /* No default value */
133  "stationID"
134  },
135 };
137  (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
138 };
140  { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* protocolVersion */
141  { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* messageID */
142  { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* stationID */
143 };
145  sizeof(struct spatem_ts_ItsPduHeader),
148  3, /* Count of tags in the map */
149  0, 0, 0, /* Optional elements (not needed) */
150  -1, /* First extension addition */
151 };
153  "ItsPduHeader",
154  "ItsPduHeader",
158  /sizeof(asn_DEF_spatem_ts_ItsPduHeader_tags_1[0]), /* 1 */
159  asn_DEF_spatem_ts_ItsPduHeader_tags_1, /* Same as above */
161  /sizeof(asn_DEF_spatem_ts_ItsPduHeader_tags_1[0]), /* 1 */
162  {
163 #if !defined(ASN_DISABLE_OER_SUPPORT)
164  0,
165 #endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
166 #if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
167  0,
168 #endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
169 #if !defined(ASN_DISABLE_JER_SUPPORT)
170  0,
171 #endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
173  },
175  3, /* Elements count */
176  &asn_SPC_spatem_ts_ItsPduHeader_specs_1 /* Additional specs */
177 };
178 
asn_OP_SEQUENCE
asn_TYPE_operation_t asn_OP_SEQUENCE
Definition: constr_SEQUENCE.c:9
spatem_ts_ItsPduHeader.h
memb_spatem_ts_protocolVersion_constraint_1
static int memb_spatem_ts_protocolVersion_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: spatem_ts_ItsPduHeader.c:11
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
ASN_TAG_CLASS_CONTEXT
@ ASN_TAG_CLASS_CONTEXT
Definition: ber_tlv_tag.h:15
ber_tlv_tag_t
unsigned ber_tlv_tag_t
Definition: ber_tlv_tag.h:18
asn_DEF_spatem_ts_ItsPduHeader
asn_TYPE_descriptor_t asn_DEF_spatem_ts_ItsPduHeader
Definition: spatem_ts_ItsPduHeader.c:152
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
asn_DEF_spatem_ts_ItsPduHeader_tags_1
static const ber_tlv_tag_t asn_DEF_spatem_ts_ItsPduHeader_tags_1[]
Definition: spatem_ts_ItsPduHeader.c:136
asn_TYPE_tag2member_s
Definition: constr_TYPE.h:289
asn_SPC_spatem_ts_ItsPduHeader_specs_1
asn_SEQUENCE_specifics_t asn_SPC_spatem_ts_ItsPduHeader_specs_1
Definition: spatem_ts_ItsPduHeader.c:144
asn_DEF_spatem_ts_StationID
asn_TYPE_descriptor_t asn_DEF_spatem_ts_StationID
Definition: spatem_ts_StationID.c:45
SEQUENCE_constraint
asn_constr_check_f SEQUENCE_constraint
Definition: constr_SEQUENCE.h:56
asn_TYPE_descriptor_s
Definition: constr_TYPE.h:224
spatem_ts_ItsPduHeader
Definition: spatem_ts_ItsPduHeader.h:41
offsetof
#define offsetof(s, m)
Definition: asn_system.h:132
asn_MAP_spatem_ts_ItsPduHeader_tag2el_1
static const asn_TYPE_tag2member_t asn_MAP_spatem_ts_ItsPduHeader_tag2el_1[]
Definition: spatem_ts_ItsPduHeader.c:139
asn_DEF_NativeInteger
asn_TYPE_descriptor_t asn_DEF_NativeInteger
Definition: NativeInteger.c:80
ATF_NOFLAGS
@ ATF_NOFLAGS
Definition: constr_TYPE.h:267
asn_SEQUENCE_specifics_s
Definition: constr_SEQUENCE.h:14
ASN__CTFAIL
#define ASN__CTFAIL
Definition: constraints.h:57
asn_MBR_spatem_ts_ItsPduHeader_1
asn_TYPE_member_t asn_MBR_spatem_ts_ItsPduHeader_1[]
Definition: spatem_ts_ItsPduHeader.c:74
spatem_ts_ItsPduHeader::_asn_ctx
asn_struct_ctx_t _asn_ctx
Definition: spatem_ts_ItsPduHeader.h:47
asn_per_constraints_s
Definition: per_support.h:30
asn_TYPE_member_s
Definition: constr_TYPE.h:272
CC_NOTUSED
static asn_per_constraints_t asn_PER_memb_spatem_ts_protocolVersion_constr_2 CC_NOTUSED
Definition: spatem_ts_ItsPduHeader.c:61
memb_spatem_ts_messageID_constraint_1
static int memb_spatem_ts_messageID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: spatem_ts_ItsPduHeader.c:36


etsi_its_spatem_ts_coding
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:29:28