/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "X2AP-PDU-Contents"
 * 	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 "ENDCConfigurationUpdateFailure.h"

asn_TYPE_member_t asn_MBR_ENDCConfigurationUpdateFailure_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ENDCConfigurationUpdateFailure, protocolIEs),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_Container_8807P42,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"protocolIEs"
		},
};
static const ber_tlv_tag_t asn_DEF_ENDCConfigurationUpdateFailure_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ENDCConfigurationUpdateFailure_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_ENDCConfigurationUpdateFailure_specs_1 = {
	sizeof(struct ENDCConfigurationUpdateFailure),
	offsetof(struct ENDCConfigurationUpdateFailure, _asn_ctx),
	asn_MAP_ENDCConfigurationUpdateFailure_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_ENDCConfigurationUpdateFailure = {
	"ENDCConfigurationUpdateFailure",
	"ENDCConfigurationUpdateFailure",
	&asn_OP_SEQUENCE,
	asn_DEF_ENDCConfigurationUpdateFailure_tags_1,
	sizeof(asn_DEF_ENDCConfigurationUpdateFailure_tags_1)
		/sizeof(asn_DEF_ENDCConfigurationUpdateFailure_tags_1[0]), /* 1 */
	asn_DEF_ENDCConfigurationUpdateFailure_tags_1,	/* Same as above */
	sizeof(asn_DEF_ENDCConfigurationUpdateFailure_tags_1)
		/sizeof(asn_DEF_ENDCConfigurationUpdateFailure_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_ENDCConfigurationUpdateFailure_1,
	1,	/* Elements count */
	&asn_SPC_ENDCConfigurationUpdateFailure_specs_1	/* Additional specs */
};

