/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "E2SM-RC-IEs"
 * 	found in "e2sm_rc.asn"
 * 	`asn1c -fcompound-names -fno-include-deps -findirect-choice -pdu=auto -gen-PER -gen-OER -no-gen-example`
 */

#include "EventTrigger-UE-Info-Item-Choice-Group.h"

asn_TYPE_member_t asn_MBR_EventTrigger_UE_Info_Item_Choice_Group_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct EventTrigger_UE_Info_Item_Choice_Group, ranParameterTesting),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_RANParameter_Testing,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"ranParameterTesting"
		},
};
static const ber_tlv_tag_t asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_EventTrigger_UE_Info_Item_Choice_Group_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* ranParameterTesting */
};
asn_SEQUENCE_specifics_t asn_SPC_EventTrigger_UE_Info_Item_Choice_Group_specs_1 = {
	sizeof(struct EventTrigger_UE_Info_Item_Choice_Group),
	offsetof(struct EventTrigger_UE_Info_Item_Choice_Group, _asn_ctx),
	asn_MAP_EventTrigger_UE_Info_Item_Choice_Group_tag2el_1,
	1,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_EventTrigger_UE_Info_Item_Choice_Group = {
	"EventTrigger-UE-Info-Item-Choice-Group",
	"EventTrigger-UE-Info-Item-Choice-Group",
	&asn_OP_SEQUENCE,
	asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1,
	sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1)
		/sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1[0]), /* 1 */
	asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1,	/* Same as above */
	sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1)
		/sizeof(asn_DEF_EventTrigger_UE_Info_Item_Choice_Group_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_EventTrigger_UE_Info_Item_Choice_Group_1,
	1,	/* Elements count */
	&asn_SPC_EventTrigger_UE_Info_Item_Choice_Group_specs_1	/* Additional specs */
};

