/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "X2AP-IEs"
 * 	found in "Spec/e2ap-v031ex.asn"
 * 	`asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER`
 */

#include "PLMNAreaBasedQMC.h"

#include "ProtocolExtensionContainer.h"
asn_TYPE_member_t asn_MBR_PLMNAreaBasedQMC_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct PLMNAreaBasedQMC, plmnListforQMC),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_PLMNListforQMC,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"plmnListforQMC"
		},
	{ ATF_POINTER, 1, offsetof(struct PLMNAreaBasedQMC, iE_Extensions),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolExtensionContainer_9566P178,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"iE-Extensions"
		},
};
static const int asn_MAP_PLMNAreaBasedQMC_oms_1[] = { 1 };
static const ber_tlv_tag_t asn_DEF_PLMNAreaBasedQMC_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_PLMNAreaBasedQMC_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plmnListforQMC */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */
};
asn_SEQUENCE_specifics_t asn_SPC_PLMNAreaBasedQMC_specs_1 = {
	sizeof(struct PLMNAreaBasedQMC),
	offsetof(struct PLMNAreaBasedQMC, _asn_ctx),
	asn_MAP_PLMNAreaBasedQMC_tag2el_1,
	2,	/* Count of tags in the map */
	asn_MAP_PLMNAreaBasedQMC_oms_1,	/* Optional members */
	1, 0,	/* Root/Additions */
	2,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_PLMNAreaBasedQMC = {
	"PLMNAreaBasedQMC",
	"PLMNAreaBasedQMC",
	&asn_OP_SEQUENCE,
	asn_DEF_PLMNAreaBasedQMC_tags_1,
	sizeof(asn_DEF_PLMNAreaBasedQMC_tags_1)
		/sizeof(asn_DEF_PLMNAreaBasedQMC_tags_1[0]), /* 1 */
	asn_DEF_PLMNAreaBasedQMC_tags_1,	/* Same as above */
	sizeof(asn_DEF_PLMNAreaBasedQMC_tags_1)
		/sizeof(asn_DEF_PLMNAreaBasedQMC_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_PLMNAreaBasedQMC_1,
	2,	/* Elements count */
	&asn_SPC_PLMNAreaBasedQMC_specs_1	/* Additional specs */
};

