/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "E2AP-PDU-Contents"
 * 	found in "spec/e2ap-v02.00.00.asn"
 * 	`asn1c -pdu=auto -fincludes-quoted -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example`
 */

#include "RICsubscriptionResponse.h"

asn_TYPE_member_t asn_MBR_RICsubscriptionResponse_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubscriptionResponse, protocolIEs),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolIE_Container_1923P1,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"protocolIEs"
		},
};
static const ber_tlv_tag_t asn_DEF_RICsubscriptionResponse_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICsubscriptionResponse_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */
};
asn_SEQUENCE_specifics_t asn_SPC_RICsubscriptionResponse_specs_1 = {
	sizeof(struct RICsubscriptionResponse),
	offsetof(struct RICsubscriptionResponse, _asn_ctx),
	asn_MAP_RICsubscriptionResponse_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_RICsubscriptionResponse = {
	"RICsubscriptionResponse",
	"RICsubscriptionResponse",
	&asn_OP_SEQUENCE,
	asn_DEF_RICsubscriptionResponse_tags_1,
	sizeof(asn_DEF_RICsubscriptionResponse_tags_1)
		/sizeof(asn_DEF_RICsubscriptionResponse_tags_1[0]), /* 1 */
	asn_DEF_RICsubscriptionResponse_tags_1,	/* Same as above */
	sizeof(asn_DEF_RICsubscriptionResponse_tags_1)
		/sizeof(asn_DEF_RICsubscriptionResponse_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICsubscriptionResponse_1,
	1,	/* Elements count */
	&asn_SPC_RICsubscriptionResponse_specs_1	/* Additional specs */
};

