ITS
VehicleRole.c
Go to the documentation of this file.
1 /*
2  * Generated by asn1c-0.9.27 (http://lionet.info/asn1c)
3  * From ASN.1 module "ITS-Container"
4  * found in "ITS-Container.asn"
5  */
6 
7 #include "VehicleRole.h"
8 
9 int
11  asn_app_constraint_failed_f *ctfailcb, void *app_key) {
12  /* Replace with underlying type checker */
14  return td->check_constraints(td, sptr, ctfailcb, app_key);
15 }
16 
17 /*
18  * This type is implemented using NativeEnumerated,
19  * so here we adjust the DEF accordingly.
20  */
21 static void
32  if(!td->per_constraints)
36  /* td->specifics = asn_DEF_NativeEnumerated.specifics; // Defined explicitly */
37 }
38 
39 void
41  void *struct_ptr, int contents_only) {
43  td->free_struct(td, struct_ptr, contents_only);
44 }
45 
46 int
47 VehicleRole_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
48  int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
50  return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
51 }
52 
55  void **structure, const void *bufptr, size_t size, int tag_mode) {
57  return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
58 }
59 
62  void *structure, int tag_mode, ber_tlv_tag_t tag,
63  asn_app_consume_bytes_f *cb, void *app_key) {
65  return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
66 }
67 
70  void **structure, const char *opt_mname, const void *bufptr, size_t size) {
72  return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
73 }
74 
77  int ilevel, enum xer_encoder_flags_e flags,
78  asn_app_consume_bytes_f *cb, void *app_key) {
80  return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
81 }
82 
85  asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data) {
87  return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
88 }
89 
92  asn_per_constraints_t *constraints,
93  void *structure, asn_per_outp_t *per_out) {
95  return td->uper_encoder(td, constraints, structure, per_out);
96 }
97 
98 static asn_per_constraints_t asn_PER_type_VehicleRole_constr_1 GCC_NOTUSED = {
99  { APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */,
100  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
101  0, 0 /* No PER value map */
102 };
104  { 0, 7, "default" },
105  { 1, 15, "publicTransport" },
106  { 2, 16, "specialTransport" },
107  { 3, 14, "dangerousGoods" },
108  { 4, 8, "roadWork" },
109  { 5, 6, "rescue" },
110  { 6, 9, "emergency" },
111  { 7, 9, "safetyCar" },
112  { 8, 11, "agriculture" },
113  { 9, 10, "commercial" },
114  { 10, 8, "military" },
115  { 11, 12, "roadOperator" },
116  { 12, 4, "taxi" },
117  { 13, 9, "reserved1" },
118  { 14, 9, "reserved2" },
119  { 15, 9, "reserved3" }
120 };
121 static unsigned int asn_MAP_VehicleRole_enum2value_1[] = {
122  8, /* agriculture(8) */
123  9, /* commercial(9) */
124  3, /* dangerousGoods(3) */
125  0, /* default(0) */
126  6, /* emergency(6) */
127  10, /* military(10) */
128  1, /* publicTransport(1) */
129  5, /* rescue(5) */
130  13, /* reserved1(13) */
131  14, /* reserved2(14) */
132  15, /* reserved3(15) */
133  11, /* roadOperator(11) */
134  4, /* roadWork(4) */
135  7, /* safetyCar(7) */
136  2, /* specialTransport(2) */
137  12 /* taxi(12) */
138 };
140  asn_MAP_VehicleRole_value2enum_1, /* "tag" => N; sorted by tag */
141  asn_MAP_VehicleRole_enum2value_1, /* N => "tag"; sorted by N */
142  16, /* Number of elements in the maps */
143  0, /* Enumeration is not extensible */
144  1, /* Strict enumeration */
145  0, /* Native long size */
146  0
147 };
149  (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
150 };
152  "VehicleRole",
153  "VehicleRole",
163  0, /* Use generic outmost tag fetcher */
166  /sizeof(asn_DEF_VehicleRole_tags_1[0]), /* 1 */
167  asn_DEF_VehicleRole_tags_1, /* Same as above */
169  /sizeof(asn_DEF_VehicleRole_tags_1[0]), /* 1 */
170  &asn_PER_type_VehicleRole_constr_1,
171  0, 0, /* Defined elsewhere */
172  &asn_SPC_VehicleRole_specs_1 /* Additional specs */
173 };
174 
asn_enc_rval_t VehicleRole_encode_xer(asn_TYPE_descriptor_t *td, void *structure, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key)
Definition: VehicleRole.c:76
static unsigned int asn_MAP_VehicleRole_enum2value_1[]
Definition: VehicleRole.c:121
void VehicleRole_free(asn_TYPE_descriptor_t *td, void *struct_ptr, int contents_only)
Definition: VehicleRole.c:40
asn_TYPE_descriptor_t asn_DEF_VehicleRole
Definition: VehicleRole.c:151
xer_encoder_flags_e
Definition: xer_encoder.h:17
asn_struct_free_f * free_struct
Definition: constr_TYPE.h:93
asn_dec_rval_t VehicleRole_decode_ber(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **structure, const void *bufptr, size_t size, int tag_mode)
Definition: VehicleRole.c:54
static asn_per_constraints_t asn_PER_type_VehicleRole_constr_1 GCC_NOTUSED
Definition: VehicleRole.c:98
asn_dec_rval_t VehicleRole_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **structure, const char *opt_mname, const void *bufptr, size_t size)
Definition: VehicleRole.c:69
asn_constr_check_f * check_constraints
Definition: constr_TYPE.h:95
static asn_INTEGER_enum_map_t asn_MAP_VehicleRole_value2enum_1[]
Definition: VehicleRole.c:103
asn_struct_print_f * print_struct
Definition: constr_TYPE.h:94
struct asn_TYPE_member_s * elements
Definition: constr_TYPE.h:121
int() asn_app_consume_bytes_f(const void *buffer, size_t size, void *application_specific_key)
static asn_INTEGER_specifics_t asn_SPC_VehicleRole_specs_1
Definition: VehicleRole.c:139
xer_type_decoder_f * xer_decoder
Definition: constr_TYPE.h:98
asn_TYPE_descriptor_t asn_DEF_NativeEnumerated
asn_enc_rval_t VehicleRole_encode_uper(asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void *structure, asn_per_outp_t *per_out)
Definition: VehicleRole.c:91
der_type_encoder_f * der_encoder
Definition: constr_TYPE.h:97
void() asn_app_constraint_failed_f(void *application_specific_key, struct asn_TYPE_descriptor_s *type_descriptor_which_failed, const void *structure_which_failed_ptr, const char *error_message_format,...) GCC_PRINTFLIKE(4
asn_enc_rval_t VehicleRole_encode_der(asn_TYPE_descriptor_t *td, void *structure, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key)
Definition: VehicleRole.c:61
asn_dec_rval_t VehicleRole_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void **structure, asn_per_data_t *per_data)
Definition: VehicleRole.c:84
per_type_encoder_f * uper_encoder
Definition: constr_TYPE.h:101
per_type_decoder_f * uper_decoder
Definition: constr_TYPE.h:100
int VehicleRole_constraint(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
Definition: VehicleRole.c:10
asn_per_constraints_t * per_constraints
Definition: constr_TYPE.h:116
static void VehicleRole_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td)
Definition: VehicleRole.c:22
ber_type_decoder_f * ber_decoder
Definition: constr_TYPE.h:96
int VehicleRole_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key)
Definition: VehicleRole.c:47
unsigned ber_tlv_tag_t
Definition: ber_tlv_tag.h:18
xer_type_encoder_f * xer_encoder
Definition: constr_TYPE.h:99
static ber_tlv_tag_t asn_DEF_VehicleRole_tags_1[]
Definition: VehicleRole.c:148