/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "NR-RRC-Definitions"
 * 	found in "asn/nr-rrc-15.6.0.asn1"
 * 	`asn1c -fcompound-names -pdu=all -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D rrc`
 */

#include "ASN_RRC_CarrierFreqEUTRA.h"

#include "ASN_RRC_EUTRA-MultiBandInfoList.h"
#include "ASN_RRC_EUTRA-FreqNeighCellList.h"
#include "ASN_RRC_EUTRA-FreqBlackCellList.h"
static int
memb_ASN_RRC_q_RxLevMin_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= -70 && value <= -22)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_ASN_RRC_q_QualMin_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= -34 && value <= -3)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_ASN_RRC_p_MaxEUTRA_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	long value;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	value = *(const long *)sptr;
	
	if((value >= -30 && value <= 33)) {
		/* Constraint check succeeded */
		return 0;
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static asn_per_constraints_t asn_PER_memb_ASN_RRC_q_RxLevMin_constr_12 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 6,  6, -70, -22 }	/* (-70..-22) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_ASN_RRC_q_QualMin_constr_13 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 5,  5, -34, -3 }	/* (-34..-3) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_ASN_RRC_p_MaxEUTRA_constr_14 CC_NOTUSED = {
	{ APC_CONSTRAINED,	 6,  6, -30,  33 }	/* (-30..33) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_TYPE_member_t asn_MBR_ASN_RRC_threshX_Q_15[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA__threshX_Q, threshX_HighQ),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_ReselectionThresholdQ,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"threshX-HighQ"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA__threshX_Q, threshX_LowQ),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_ReselectionThresholdQ,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"threshX-LowQ"
		},
};
static const ber_tlv_tag_t asn_DEF_ASN_RRC_threshX_Q_tags_15[] = {
	(ASN_TAG_CLASS_CONTEXT | (13 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ASN_RRC_threshX_Q_tag2el_15[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* threshX-HighQ */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* threshX-LowQ */
};
static asn_SEQUENCE_specifics_t asn_SPC_ASN_RRC_threshX_Q_specs_15 = {
	sizeof(struct ASN_RRC_CarrierFreqEUTRA__threshX_Q),
	offsetof(struct ASN_RRC_CarrierFreqEUTRA__threshX_Q, _asn_ctx),
	asn_MAP_ASN_RRC_threshX_Q_tag2el_15,
	2,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	-1,	/* First extension addition */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_ASN_RRC_threshX_Q_15 = {
	"threshX-Q",
	"threshX-Q",
	&asn_OP_SEQUENCE,
	asn_DEF_ASN_RRC_threshX_Q_tags_15,
	sizeof(asn_DEF_ASN_RRC_threshX_Q_tags_15)
		/sizeof(asn_DEF_ASN_RRC_threshX_Q_tags_15[0]) - 1, /* 1 */
	asn_DEF_ASN_RRC_threshX_Q_tags_15,	/* Same as above */
	sizeof(asn_DEF_ASN_RRC_threshX_Q_tags_15)
		/sizeof(asn_DEF_ASN_RRC_threshX_Q_tags_15[0]), /* 2 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_ASN_RRC_threshX_Q_15,
	2,	/* Elements count */
	&asn_SPC_ASN_RRC_threshX_Q_specs_15	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_ASN_RRC_CarrierFreqEUTRA_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA, carrierFreq),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_ARFCN_ValueEUTRA,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"carrierFreq"
		},
	{ ATF_POINTER, 3, offsetof(struct ASN_RRC_CarrierFreqEUTRA, eutra_multiBandInfoList),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_EUTRA_MultiBandInfoList,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"eutra-multiBandInfoList"
		},
	{ ATF_POINTER, 2, offsetof(struct ASN_RRC_CarrierFreqEUTRA, eutra_FreqNeighCellList),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_EUTRA_FreqNeighCellList,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"eutra-FreqNeighCellList"
		},
	{ ATF_POINTER, 1, offsetof(struct ASN_RRC_CarrierFreqEUTRA, eutra_BlackCellList),
		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_EUTRA_FreqBlackCellList,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"eutra-BlackCellList"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA, allowedMeasBandwidth),
		(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_EUTRA_AllowedMeasBandwidth,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"allowedMeasBandwidth"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA, presenceAntennaPort1),
		(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_EUTRA_PresenceAntennaPort1,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"presenceAntennaPort1"
		},
	{ ATF_POINTER, 2, offsetof(struct ASN_RRC_CarrierFreqEUTRA, cellReselectionPriority),
		(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_CellReselectionPriority,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"cellReselectionPriority"
		},
	{ ATF_POINTER, 1, offsetof(struct ASN_RRC_CarrierFreqEUTRA, cellReselectionSubPriority),
		(ASN_TAG_CLASS_CONTEXT | (7 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_CellReselectionSubPriority,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"cellReselectionSubPriority"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA, threshX_High),
		(ASN_TAG_CLASS_CONTEXT | (8 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_ReselectionThreshold,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"threshX-High"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA, threshX_Low),
		(ASN_TAG_CLASS_CONTEXT | (9 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ASN_RRC_ReselectionThreshold,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"threshX-Low"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA, q_RxLevMin),
		(ASN_TAG_CLASS_CONTEXT | (10 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		0,
		{ 0, &asn_PER_memb_ASN_RRC_q_RxLevMin_constr_12,  memb_ASN_RRC_q_RxLevMin_constraint_1 },
		0, 0, /* No default value */
		"q-RxLevMin"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA, q_QualMin),
		(ASN_TAG_CLASS_CONTEXT | (11 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		0,
		{ 0, &asn_PER_memb_ASN_RRC_q_QualMin_constr_13,  memb_ASN_RRC_q_QualMin_constraint_1 },
		0, 0, /* No default value */
		"q-QualMin"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_CarrierFreqEUTRA, p_MaxEUTRA),
		(ASN_TAG_CLASS_CONTEXT | (12 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		0,
		{ 0, &asn_PER_memb_ASN_RRC_p_MaxEUTRA_constr_14,  memb_ASN_RRC_p_MaxEUTRA_constraint_1 },
		0, 0, /* No default value */
		"p-MaxEUTRA"
		},
	{ ATF_POINTER, 1, offsetof(struct ASN_RRC_CarrierFreqEUTRA, threshX_Q),
		(ASN_TAG_CLASS_CONTEXT | (13 << 2)),
		0,
		&asn_DEF_ASN_RRC_threshX_Q_15,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"threshX-Q"
		},
};
static const int asn_MAP_ASN_RRC_CarrierFreqEUTRA_oms_1[] = { 1, 2, 3, 6, 7, 13 };
static const ber_tlv_tag_t asn_DEF_ASN_RRC_CarrierFreqEUTRA_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ASN_RRC_CarrierFreqEUTRA_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* carrierFreq */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eutra-multiBandInfoList */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* eutra-FreqNeighCellList */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* eutra-BlackCellList */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* allowedMeasBandwidth */
    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* presenceAntennaPort1 */
    { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* cellReselectionPriority */
    { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* cellReselectionSubPriority */
    { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* threshX-High */
    { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* threshX-Low */
    { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* q-RxLevMin */
    { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* q-QualMin */
    { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* p-MaxEUTRA */
    { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 } /* threshX-Q */
};
asn_SEQUENCE_specifics_t asn_SPC_ASN_RRC_CarrierFreqEUTRA_specs_1 = {
	sizeof(struct ASN_RRC_CarrierFreqEUTRA),
	offsetof(struct ASN_RRC_CarrierFreqEUTRA, _asn_ctx),
	asn_MAP_ASN_RRC_CarrierFreqEUTRA_tag2el_1,
	14,	/* Count of tags in the map */
	asn_MAP_ASN_RRC_CarrierFreqEUTRA_oms_1,	/* Optional members */
	6, 0,	/* Root/Additions */
	-1,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ASN_RRC_CarrierFreqEUTRA = {
	"CarrierFreqEUTRA",
	"CarrierFreqEUTRA",
	&asn_OP_SEQUENCE,
	asn_DEF_ASN_RRC_CarrierFreqEUTRA_tags_1,
	sizeof(asn_DEF_ASN_RRC_CarrierFreqEUTRA_tags_1)
		/sizeof(asn_DEF_ASN_RRC_CarrierFreqEUTRA_tags_1[0]), /* 1 */
	asn_DEF_ASN_RRC_CarrierFreqEUTRA_tags_1,	/* Same as above */
	sizeof(asn_DEF_ASN_RRC_CarrierFreqEUTRA_tags_1)
		/sizeof(asn_DEF_ASN_RRC_CarrierFreqEUTRA_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_ASN_RRC_CarrierFreqEUTRA_1,
	14,	/* Elements count */
	&asn_SPC_ASN_RRC_CarrierFreqEUTRA_specs_1	/* Additional specs */
};

