//********************************************************************************************************
//
// © 2016 Regents of the University of California on behalf of the University of California at Berkeley
//       with rights granted for USDOT OSADP distribution with the ECL-2.0 open source license.
//
//*********************************************************************************************************
/*
 * Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
 * From ASN.1 module "ITIS"
 * 	found in "../j2735_asn/J2735_201601_ASN_mmitss.asn"
 * 	`asn1c -fcompound-names -gen-PER`
 */

#include "VehicleGroupAffected.h"

int
VehicleGroupAffected_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	/* Replace with underlying type checker */
	td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
	return td->check_constraints(td, sptr, ctfailcb, app_key);
}

/*
 * This type is implemented using NativeEnumerated,
 * so here we adjust the DEF accordingly.
 */
static void
VehicleGroupAffected_1_inherit_TYPE_descriptor(asn_TYPE_descriptor_t *td) {
	td->free_struct    = asn_DEF_NativeEnumerated.free_struct;
	td->print_struct   = asn_DEF_NativeEnumerated.print_struct;
	td->check_constraints = asn_DEF_NativeEnumerated.check_constraints;
	td->ber_decoder    = asn_DEF_NativeEnumerated.ber_decoder;
	td->der_encoder    = asn_DEF_NativeEnumerated.der_encoder;
	td->xer_decoder    = asn_DEF_NativeEnumerated.xer_decoder;
	td->xer_encoder    = asn_DEF_NativeEnumerated.xer_encoder;
	td->uper_decoder   = asn_DEF_NativeEnumerated.uper_decoder;
	td->uper_encoder   = asn_DEF_NativeEnumerated.uper_encoder;
	td->aper_decoder   = asn_DEF_NativeEnumerated.aper_decoder;
	td->aper_encoder   = asn_DEF_NativeEnumerated.aper_encoder;
	if(!td->per_constraints)
		td->per_constraints = asn_DEF_NativeEnumerated.per_constraints;
	td->elements       = asn_DEF_NativeEnumerated.elements;
	td->elements_count = asn_DEF_NativeEnumerated.elements_count;
     /* td->specifics      = asn_DEF_NativeEnumerated.specifics;	// Defined explicitly */
}

void
VehicleGroupAffected_free(asn_TYPE_descriptor_t *td,
		void *struct_ptr, int contents_only) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	td->free_struct(td, struct_ptr, contents_only);
}

int
VehicleGroupAffected_print(asn_TYPE_descriptor_t *td, const void *struct_ptr,
		int ilevel, asn_app_consume_bytes_f *cb, void *app_key) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	return td->print_struct(td, struct_ptr, ilevel, cb, app_key);
}

asn_dec_rval_t
VehicleGroupAffected_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) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	return td->ber_decoder(opt_codec_ctx, td, structure, bufptr, size, tag_mode);
}

asn_enc_rval_t
VehicleGroupAffected_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) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	return td->der_encoder(td, structure, tag_mode, tag, cb, app_key);
}

asn_dec_rval_t
VehicleGroupAffected_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) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	return td->xer_decoder(opt_codec_ctx, td, structure, opt_mname, bufptr, size);
}

asn_enc_rval_t
VehicleGroupAffected_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) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	return td->xer_encoder(td, structure, ilevel, flags, cb, app_key);
}

asn_dec_rval_t
VehicleGroupAffected_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) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	return td->uper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}

asn_enc_rval_t
VehicleGroupAffected_encode_uper(asn_TYPE_descriptor_t *td,
		asn_per_constraints_t *constraints,
		void *structure, asn_per_outp_t *per_out) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	return td->uper_encoder(td, constraints, structure, per_out);
}

asn_enc_rval_t
VehicleGroupAffected_encode_aper(asn_TYPE_descriptor_t *td,
		asn_per_constraints_t *constraints,
		void *structure, asn_per_outp_t *per_out) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	return td->aper_encoder(td, constraints, structure, per_out);
}

asn_dec_rval_t
VehicleGroupAffected_decode_aper(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) {
	VehicleGroupAffected_1_inherit_TYPE_descriptor(td);
	return td->aper_decoder(opt_codec_ctx, td, constraints, structure, per_data);
}

static asn_per_constraints_t asn_PER_type_VehicleGroupAffected_constr_1 GCC_NOTUSED = {
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  6,  6,  0l,  34l }	/* (0..34,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_VehicleGroupAffected_value2enum_1[] = {
	{ 9217,	12,	"all-vehicles" },
	{ 9218,	8,	"bicycles" },
	{ 9219,	11,	"motorcycles" },
	{ 9220,	4,	"cars" },
	{ 9221,	14,	"light-vehicles" },
	{ 9222,	23,	"cars-and-light-vehicles" },
	{ 9223,	18,	"cars-with-trailers" },
	{ 9224,	31,	"cars-with-recreational-trailers" },
	{ 9225,	22,	"vehicles-with-trailers" },
	{ 9226,	14,	"heavy-vehicles" },
	{ 9227,	6,	"trucks" },
	{ 9228,	5,	"buses" },
	{ 9229,	17,	"articulated-buses" },
	{ 9230,	12,	"school-buses" },
	{ 9231,	27,	"vehicles-with-semi-trailers" },
	{ 9232,	29,	"vehicles-with-double-trailers" },
	{ 9233,	21,	"high-profile-vehicles" },
	{ 9234,	13,	"wide-vehicles" },
	{ 9235,	13,	"long-vehicles" },
	{ 9236,	15,	"hazardous-loads" },
	{ 9237,	17,	"exceptional-loads" },
	{ 9238,	14,	"abnormal-loads" },
	{ 9239,	7,	"convoys" },
	{ 9240,	20,	"maintenance-vehicles" },
	{ 9241,	17,	"delivery-vehicles" },
	{ 9242,	42,	"vehicles-with-even-numbered-license-plates" },
	{ 9243,	41,	"vehicles-with-odd-numbered-license-plates" },
	{ 9244,	29,	"vehicles-with-parking-permits" },
	{ 9245,	34,	"vehicles-with-catalytic-converters" },
	{ 9246,	37,	"vehicles-without-catalytic-converters" },
	{ 9247,	20,	"gas-powered-vehicles" },
	{ 9248,	23,	"diesel-powered-vehicles" },
	{ 9249,	12,	"lPG-vehicles" },
	{ 9250,	16,	"military-convoys" },
	{ 9251,	17,	"military-vehicles" }
	/* This list is extensible */
};
static const unsigned int asn_MAP_VehicleGroupAffected_enum2value_1[] = {
	21,	/* abnormal-loads(9238) */
	0,	/* all-vehicles(9217) */
	12,	/* articulated-buses(9229) */
	1,	/* bicycles(9218) */
	11,	/* buses(9228) */
	3,	/* cars(9220) */
	5,	/* cars-and-light-vehicles(9222) */
	7,	/* cars-with-recreational-trailers(9224) */
	6,	/* cars-with-trailers(9223) */
	22,	/* convoys(9239) */
	24,	/* delivery-vehicles(9241) */
	31,	/* diesel-powered-vehicles(9248) */
	20,	/* exceptional-loads(9237) */
	30,	/* gas-powered-vehicles(9247) */
	19,	/* hazardous-loads(9236) */
	9,	/* heavy-vehicles(9226) */
	16,	/* high-profile-vehicles(9233) */
	32,	/* lPG-vehicles(9249) */
	4,	/* light-vehicles(9221) */
	18,	/* long-vehicles(9235) */
	23,	/* maintenance-vehicles(9240) */
	33,	/* military-convoys(9250) */
	34,	/* military-vehicles(9251) */
	2,	/* motorcycles(9219) */
	13,	/* school-buses(9230) */
	10,	/* trucks(9227) */
	28,	/* vehicles-with-catalytic-converters(9245) */
	15,	/* vehicles-with-double-trailers(9232) */
	25,	/* vehicles-with-even-numbered-license-plates(9242) */
	26,	/* vehicles-with-odd-numbered-license-plates(9243) */
	27,	/* vehicles-with-parking-permits(9244) */
	14,	/* vehicles-with-semi-trailers(9231) */
	8,	/* vehicles-with-trailers(9225) */
	29,	/* vehicles-without-catalytic-converters(9246) */
	17	/* wide-vehicles(9234) */
	/* This list is extensible */
};
static const asn_INTEGER_specifics_t asn_SPC_VehicleGroupAffected_specs_1 = {
	asn_MAP_VehicleGroupAffected_value2enum_1,	/* "tag" => N; sorted by tag */
	asn_MAP_VehicleGroupAffected_enum2value_1,	/* N => "tag"; sorted by N */
	35,	/* Number of elements in the maps */
	36,	/* Extensions before this member */
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
};
static const ber_tlv_tag_t asn_DEF_VehicleGroupAffected_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_VehicleGroupAffected = {
	"VehicleGroupAffected",
	"VehicleGroupAffected",
	VehicleGroupAffected_free,
	VehicleGroupAffected_print,
	VehicleGroupAffected_constraint,
	VehicleGroupAffected_decode_ber,
	VehicleGroupAffected_encode_der,
	VehicleGroupAffected_decode_xer,
	VehicleGroupAffected_encode_xer,
	VehicleGroupAffected_decode_uper,
	VehicleGroupAffected_encode_uper,
	VehicleGroupAffected_decode_aper,
	VehicleGroupAffected_encode_aper,
	0,	/* Use generic outmost tag fetcher */
	asn_DEF_VehicleGroupAffected_tags_1,
	sizeof(asn_DEF_VehicleGroupAffected_tags_1)
		/sizeof(asn_DEF_VehicleGroupAffected_tags_1[0]), /* 1 */
	asn_DEF_VehicleGroupAffected_tags_1,	/* Same as above */
	sizeof(asn_DEF_VehicleGroupAffected_tags_1)
		/sizeof(asn_DEF_VehicleGroupAffected_tags_1[0]), /* 1 */
	&asn_PER_type_VehicleGroupAffected_constr_1,
	0, 0,	/* Defined elsewhere */
	&asn_SPC_VehicleGroupAffected_specs_1	/* Additional specs */
};

