/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "E2SM-KPM-IEs"
 * 	found in "E2SM-KPM-Prespec.asn"
 * 	`asn1c -D ./e2sm-kpm -gen-PER`
 */

#include "GlobalKPMnode-eNB-ID.h"

asn_TYPE_member_t asn_MBR_GlobalKPMnode_eNB_ID_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct GlobalKPMnode_eNB_ID, global_eNB_ID),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_GlobalENB_ID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"global-eNB-ID"
		},
};
static const ber_tlv_tag_t asn_DEF_GlobalKPMnode_eNB_ID_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_GlobalKPMnode_eNB_ID_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* global-eNB-ID */
};
asn_SEQUENCE_specifics_t asn_SPC_GlobalKPMnode_eNB_ID_specs_1 = {
	sizeof(struct GlobalKPMnode_eNB_ID),
	offsetof(struct GlobalKPMnode_eNB_ID, _asn_ctx),
	asn_MAP_GlobalKPMnode_eNB_ID_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_GlobalKPMnode_eNB_ID = {
	"GlobalKPMnode-eNB-ID",
	"GlobalKPMnode-eNB-ID",
	&asn_OP_SEQUENCE,
	asn_DEF_GlobalKPMnode_eNB_ID_tags_1,
	sizeof(asn_DEF_GlobalKPMnode_eNB_ID_tags_1)
		/sizeof(asn_DEF_GlobalKPMnode_eNB_ID_tags_1[0]), /* 1 */
	asn_DEF_GlobalKPMnode_eNB_ID_tags_1,	/* Same as above */
	sizeof(asn_DEF_GlobalKPMnode_eNB_ID_tags_1)
		/sizeof(asn_DEF_GlobalKPMnode_eNB_ID_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_GlobalKPMnode_eNB_ID_1,
	1,	/* Elements count */
	&asn_SPC_GlobalKPMnode_eNB_ID_specs_1	/* Additional specs */
};

