/*
 * 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 "RICcontrolRequest.h"

asn_TYPE_member_t asn_MBR_RICcontrolRequest_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICcontrolRequest, protocolIEs),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_Container_8807P7,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"protocolIEs"
		},
};
static const ber_tlv_tag_t asn_DEF_RICcontrolRequest_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICcontrolRequest_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_RICcontrolRequest_specs_1 = {
	sizeof(struct RICcontrolRequest),
	offsetof(struct RICcontrolRequest, _asn_ctx),
	asn_MAP_RICcontrolRequest_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_RICcontrolRequest = {
	"RICcontrolRequest",
	"RICcontrolRequest",
	&asn_OP_SEQUENCE,
	asn_DEF_RICcontrolRequest_tags_1,
	sizeof(asn_DEF_RICcontrolRequest_tags_1)
		/sizeof(asn_DEF_RICcontrolRequest_tags_1[0]), /* 1 */
	asn_DEF_RICcontrolRequest_tags_1,	/* Same as above */
	sizeof(asn_DEF_RICcontrolRequest_tags_1)
		/sizeof(asn_DEF_RICcontrolRequest_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICcontrolRequest_1,
	1,	/* Elements count */
	&asn_SPC_RICcontrolRequest_specs_1	/* Additional specs */
};

