/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "E2AP-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 "RANfunction-Item.h"

static asn_TYPE_member_t asn_MBR_RANfunction_Item_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunction_Item, ranFunctionID),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_RANfunctionID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"ranFunctionID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RANfunction_Item, ranFunctionDefinition),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_RANfunctionDefinition,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"ranFunctionDefinition"
		},
};
static const ber_tlv_tag_t asn_DEF_RANfunction_Item_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RANfunction_Item_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranFunctionID */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranFunctionDefinition */
};
static asn_SEQUENCE_specifics_t asn_SPC_RANfunction_Item_specs_1 = {
	sizeof(struct RANfunction_Item),
	offsetof(struct RANfunction_Item, _asn_ctx),
	asn_MAP_RANfunction_Item_tag2el_1,
	2,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	2,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_RANfunction_Item = {
	"RANfunction-Item",
	"RANfunction-Item",
	&asn_OP_SEQUENCE,
	asn_DEF_RANfunction_Item_tags_1,
	sizeof(asn_DEF_RANfunction_Item_tags_1)
		/sizeof(asn_DEF_RANfunction_Item_tags_1[0]), /* 1 */
	asn_DEF_RANfunction_Item_tags_1,	/* Same as above */
	sizeof(asn_DEF_RANfunction_Item_tags_1)
		/sizeof(asn_DEF_RANfunction_Item_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RANfunction_Item_1,
	2,	/* Elements count */
	&asn_SPC_RANfunction_Item_specs_1	/* Additional specs */
};

