/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "E2AP-IEs"
 * 	found in "/home/sjana/ASN-Defns/e2ap-oran-wg3-v01.00.asn"
 * 	`asn1c -fno-include-deps -fcompound-names -findirect-choice -gen-PER -no-gen-OER`
 */

#include "RICsubsequentAction.h"

asn_TYPE_member_t asn_MBR_RICsubsequentAction_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubsequentAction, ricSubsequentActionType),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_RICsubsequentActionType,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"ricSubsequentActionType"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct RICsubsequentAction, ricTimeToWait),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_RICtimeToWait,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"ricTimeToWait"
		},
};
static const ber_tlv_tag_t asn_DEF_RICsubsequentAction_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_RICsubsequentAction_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ricSubsequentActionType */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ricTimeToWait */
};
asn_SEQUENCE_specifics_t asn_SPC_RICsubsequentAction_specs_1 = {
	sizeof(struct RICsubsequentAction),
	offsetof(struct RICsubsequentAction, _asn_ctx),
	asn_MAP_RICsubsequentAction_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_RICsubsequentAction = {
	"RICsubsequentAction",
	"RICsubsequentAction",
	&asn_OP_SEQUENCE,
	asn_DEF_RICsubsequentAction_tags_1,
	sizeof(asn_DEF_RICsubsequentAction_tags_1)
		/sizeof(asn_DEF_RICsubsequentAction_tags_1[0]), /* 1 */
	asn_DEF_RICsubsequentAction_tags_1,	/* Same as above */
	sizeof(asn_DEF_RICsubsequentAction_tags_1)
		/sizeof(asn_DEF_RICsubsequentAction_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_RICsubsequentAction_1,
	2,	/* Elements count */
	&asn_SPC_RICsubsequentAction_specs_1	/* Additional specs */
};

