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

#include "RANParameter-Item.h"

#include "RANParameter-ValueType.h"
asn_TYPE_member_t asn_MBR_RANParameter_Item_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RANParameter_Item, ranParameterItem_ID),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_RANParameter_ID,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"ranParameterItem-ID"
		},
	{ ATF_POINTER, 0, offsetof(struct RANParameter_Item, ranParameterItem_valueType),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		+1,	/* EXPLICIT tag at current level */
		&asn_DEF_RANParameter_ValueType,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"ranParameterItem-valueType"
		},
};
static const ber_tlv_tag_t asn_DEF_RANParameter_Item_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Item_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ranParameterItem-ID */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ranParameterItem-valueType */
};
asn_SEQUENCE_specifics_t asn_SPC_RANParameter_Item_specs_1 = {
	sizeof(struct RANParameter_Item),
	offsetof(struct RANParameter_Item, _asn_ctx),
	asn_MAP_RANParameter_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_RANParameter_Item = {
	"RANParameter-Item",
	"RANParameter-Item",
	&asn_OP_SEQUENCE,
	asn_DEF_RANParameter_Item_tags_1,
	sizeof(asn_DEF_RANParameter_Item_tags_1)
		/sizeof(asn_DEF_RANParameter_Item_tags_1[0]), /* 1 */
	asn_DEF_RANParameter_Item_tags_1,	/* Same as above */
	sizeof(asn_DEF_RANParameter_Item_tags_1)
		/sizeof(asn_DEF_RANParameter_Item_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RANParameter_Item_1,
	2,	/* Elements count */
	&asn_SPC_RANParameter_Item_specs_1	/* Additional specs */
};

