ITS
DriveDirection.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 "DriveDirection.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 DriveDirection_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_DriveDirection_constr_1 GCC_NOTUSED = {
99  { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */,
100  { APC_UNCONSTRAINED, -1, -1, 0, 0 },
101  0, 0 /* No PER value map */
102 };
104  { 0, 7, "forward" },
105  { 1, 8, "backward" },
106  { 2, 11, "unavailable" }
107 };
108 static unsigned int asn_MAP_DriveDirection_enum2value_1[] = {
109  1, /* backward(1) */
110  0, /* forward(0) */
111  2 /* unavailable(2) */
112 };
114  asn_MAP_DriveDirection_value2enum_1, /* "tag" => N; sorted by tag */
115  asn_MAP_DriveDirection_enum2value_1, /* N => "tag"; sorted by N */
116  3, /* Number of elements in the maps */
117  0, /* Enumeration is not extensible */
118  1, /* Strict enumeration */
119  0, /* Native long size */
120  0
121 };
123  (ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
124 };
126  "DriveDirection",
127  "DriveDirection",
137  0, /* Use generic outmost tag fetcher */
140  /sizeof(asn_DEF_DriveDirection_tags_1[0]), /* 1 */
141  asn_DEF_DriveDirection_tags_1, /* Same as above */
143  /sizeof(asn_DEF_DriveDirection_tags_1[0]), /* 1 */
144  &asn_PER_type_DriveDirection_constr_1,
145  0, 0, /* Defined elsewhere */
146  &asn_SPC_DriveDirection_specs_1 /* Additional specs */
147 };
148 
asn_dec_rval_t DriveDirection_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)
asn_dec_rval_t DriveDirection_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)
static asn_INTEGER_enum_map_t asn_MAP_DriveDirection_value2enum_1[]
asn_enc_rval_t DriveDirection_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)
static asn_per_constraints_t asn_PER_type_DriveDirection_constr_1 GCC_NOTUSED
void DriveDirection_free(asn_TYPE_descriptor_t *td, void *struct_ptr, int contents_only)
int DriveDirection_print(asn_TYPE_descriptor_t *td, const void *struct_ptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key)
xer_encoder_flags_e
Definition: xer_encoder.h:17
static unsigned int asn_MAP_DriveDirection_enum2value_1[]
asn_struct_free_f * free_struct
Definition: constr_TYPE.h:93
static ber_tlv_tag_t asn_DEF_DriveDirection_tags_1[]
static void DriveDirection_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td)
asn_enc_rval_t DriveDirection_encode_uper(asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void *structure, asn_per_outp_t *per_out)
int DriveDirection_constraint(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key)
asn_constr_check_f * check_constraints
Definition: constr_TYPE.h:95
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)
xer_type_decoder_f * xer_decoder
Definition: constr_TYPE.h:98
asn_TYPE_descriptor_t asn_DEF_NativeEnumerated
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
per_type_encoder_f * uper_encoder
Definition: constr_TYPE.h:101
asn_enc_rval_t DriveDirection_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)
per_type_decoder_f * uper_decoder
Definition: constr_TYPE.h:100
asn_per_constraints_t * per_constraints
Definition: constr_TYPE.h:116
asn_TYPE_descriptor_t asn_DEF_DriveDirection
ber_type_decoder_f * ber_decoder
Definition: constr_TYPE.h:96
static asn_INTEGER_specifics_t asn_SPC_DriveDirection_specs_1
asn_dec_rval_t DriveDirection_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)
unsigned ber_tlv_tag_t
Definition: ber_tlv_tag.h:18
xer_type_encoder_f * xer_encoder
Definition: constr_TYPE.h:99