/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "X2AP-IEs"
 * 	found in "Spec/e2_and_x2-combined-and-minimized.asn1"
 * 	`asn1c -pdu=auto -fincludes-quoted -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example`
 */

#include "UL-InterferenceOverloadIndication-Item.h"

/*
 * This type is implemented using NativeEnumerated,
 * so here we adjust the DEF accordingly.
 */
asn_per_constraints_t asn_PER_type_UL_InterferenceOverloadIndication_Item_constr_1 CC_NOTUSED = {
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }	/* (0..2,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_UL_InterferenceOverloadIndication_Item_value2enum_1[] = {
	{ 0,	17,	"high-interference" },
	{ 1,	19,	"medium-interference" },
	{ 2,	16,	"low-interference" }
	/* This list is extensible */
};
static const unsigned int asn_MAP_UL_InterferenceOverloadIndication_Item_enum2value_1[] = {
	0,	/* high-interference(0) */
	2,	/* low-interference(2) */
	1	/* medium-interference(1) */
	/* This list is extensible */
};
const asn_INTEGER_specifics_t asn_SPC_UL_InterferenceOverloadIndication_Item_specs_1 = {
	asn_MAP_UL_InterferenceOverloadIndication_Item_value2enum_1,	/* "tag" => N; sorted by tag */
	asn_MAP_UL_InterferenceOverloadIndication_Item_enum2value_1,	/* N => "tag"; sorted by N */
	3,	/* Number of elements in the maps */
	4,	/* Extensions before this member */
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
};
static const ber_tlv_tag_t asn_DEF_UL_InterferenceOverloadIndication_Item_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
asn_TYPE_descriptor_t asn_DEF_UL_InterferenceOverloadIndication_Item = {
	"UL-InterferenceOverloadIndication-Item",
	"UL-InterferenceOverloadIndication-Item",
	&asn_OP_NativeEnumerated,
	asn_DEF_UL_InterferenceOverloadIndication_Item_tags_1,
	sizeof(asn_DEF_UL_InterferenceOverloadIndication_Item_tags_1)
		/sizeof(asn_DEF_UL_InterferenceOverloadIndication_Item_tags_1[0]), /* 1 */
	asn_DEF_UL_InterferenceOverloadIndication_Item_tags_1,	/* Same as above */
	sizeof(asn_DEF_UL_InterferenceOverloadIndication_Item_tags_1)
		/sizeof(asn_DEF_UL_InterferenceOverloadIndication_Item_tags_1[0]), /* 1 */
	{ 0, &asn_PER_type_UL_InterferenceOverloadIndication_Item_constr_1, NativeEnumerated_constraint },
	0, 0,	/* Defined elsewhere */
	&asn_SPC_UL_InterferenceOverloadIndication_Item_specs_1	/* Additional specs */
};

