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

#include "RANParameter-Definition-Choice.h"

#include "RANParameter-Definition-Choice-LIST.h"
#include "RANParameter-Definition-Choice-STRUCTURE.h"
static asn_oer_constraints_t asn_OER_type_RANParameter_Definition_Choice_constr_1 CC_NOTUSED = {
	{ 0, 0 },
	-1};
asn_per_constraints_t asn_PER_type_RANParameter_Definition_Choice_constr_1 CC_NOTUSED = {
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }	/* (0..1,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
asn_TYPE_member_t asn_MBR_RANParameter_Definition_Choice_1[] = {
	{ ATF_POINTER, 0, offsetof(struct RANParameter_Definition_Choice, choice.choiceLIST),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_RANParameter_Definition_Choice_LIST,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"choiceLIST"
		},
	{ ATF_POINTER, 0, offsetof(struct RANParameter_Definition_Choice, choice.choiceSTRUCTURE),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_RANParameter_Definition_Choice_STRUCTURE,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"choiceSTRUCTURE"
		},
};
static const asn_TYPE_tag2member_t asn_MAP_RANParameter_Definition_Choice_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* choiceLIST */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* choiceSTRUCTURE */
};
asn_CHOICE_specifics_t asn_SPC_RANParameter_Definition_Choice_specs_1 = {
	sizeof(struct RANParameter_Definition_Choice),
	offsetof(struct RANParameter_Definition_Choice, _asn_ctx),
	offsetof(struct RANParameter_Definition_Choice, present),
	sizeof(((struct RANParameter_Definition_Choice *)0)->present),
	asn_MAP_RANParameter_Definition_Choice_tag2el_1,
	2,	/* Count of tags in the map */
	0, 0,
	2	/* Extensions start */
};
asn_TYPE_descriptor_t asn_DEF_RANParameter_Definition_Choice = {
	"RANParameter-Definition-Choice",
	"RANParameter-Definition-Choice",
	&asn_OP_CHOICE,
	0,	/* No effective tags (pointer) */
	0,	/* No effective tags (count) */
	0,	/* No tags (pointer) */
	0,	/* No tags (count) */
	{ &asn_OER_type_RANParameter_Definition_Choice_constr_1, &asn_PER_type_RANParameter_Definition_Choice_constr_1, CHOICE_constraint },
	asn_MBR_RANParameter_Definition_Choice_1,
	2,	/* Elements count */
	&asn_SPC_RANParameter_Definition_Choice_specs_1	/* Additional specs */
};

