/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "PEDefinitions"
 * 	found in "../../../asn1/PEDefinitions.asn"
 * 	`asn1c -fcompound-names -no-gen-example`
 */

#include "Fcp.h"

static int
memb_fileDescriptor_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
	size_t size;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size >= 2 && size <= 4)) {
		/* 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_fileID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
	size_t size;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size == 2)) {
		/* 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_lcsi_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
	size_t size;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size == 1)) {
		/* 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_securityAttributesReferenced_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
	size_t size;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size >= 1 && size <= 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_shortEFID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
	size_t size;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size <= 1)) {
		/* 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_linkPath_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
	size_t size;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	size = st->size;
	
	if((size <= 8)) {
		/* 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_oer_constraints_t asn_OER_memb_fileDescriptor_constr_2 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(2..4)) */};
static asn_per_constraints_t asn_PER_memb_fileDescriptor_constr_2 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_CONSTRAINED,	 2,  2,  2,  4 }	/* (SIZE(2..4)) */,
	0, 0	/* No PER value map */
};
static asn_oer_constraints_t asn_OER_memb_fileID_constr_3 CC_NOTUSED = {
	{ 0, 0 },
	2	/* (SIZE(2..2)) */};
static asn_per_constraints_t asn_PER_memb_fileID_constr_3 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_CONSTRAINED,	 0,  0,  2,  2 }	/* (SIZE(2..2)) */,
	0, 0	/* No PER value map */
};
static asn_oer_constraints_t asn_OER_memb_lcsi_constr_5 CC_NOTUSED = {
	{ 0, 0 },
	1	/* (SIZE(1..1)) */};
static asn_per_constraints_t asn_PER_memb_lcsi_constr_5 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_CONSTRAINED,	 0,  0,  1,  1 }	/* (SIZE(1..1)) */,
	0, 0	/* No PER value map */
};
static asn_oer_constraints_t asn_OER_memb_securityAttributesReferenced_constr_6 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(1..3)) */};
static asn_per_constraints_t asn_PER_memb_securityAttributesReferenced_constr_6 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_CONSTRAINED,	 2,  2,  1,  3 }	/* (SIZE(1..3)) */,
	0, 0	/* No PER value map */
};
static asn_oer_constraints_t asn_OER_memb_shortEFID_constr_9 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(0..1)) */};
static asn_per_constraints_t asn_PER_memb_shortEFID_constr_9 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_CONSTRAINED,	 1,  1,  0,  1 }	/* (SIZE(0..1)) */,
	0, 0	/* No PER value map */
};
static asn_oer_constraints_t asn_OER_memb_linkPath_constr_11 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(0..8)) */};
static asn_per_constraints_t asn_PER_memb_linkPath_constr_11 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_CONSTRAINED,	 4,  4,  0,  8 }	/* (SIZE(0..8)) */,
	0, 0	/* No PER value map */
};
asn_TYPE_member_t asn_MBR_Fcp_1[] = {
	{ ATF_POINTER, 10, offsetof(struct Fcp, fileDescriptor),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_fileDescriptor_constr_2, &asn_PER_memb_fileDescriptor_constr_2,  memb_fileDescriptor_constraint_1 },
		0, 0, /* No default value */
		"fileDescriptor"
		},
	{ ATF_POINTER, 9, offsetof(struct Fcp, fileID),
		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_fileID_constr_3, &asn_PER_memb_fileID_constr_3,  memb_fileID_constraint_1 },
		0, 0, /* No default value */
		"fileID"
		},
	{ ATF_POINTER, 8, offsetof(struct Fcp, dfName),
		(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ApplicationIdentifier,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"dfName"
		},
	{ ATF_POINTER, 7, offsetof(struct Fcp, lcsi),
		(ASN_TAG_CLASS_CONTEXT | (10 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_lcsi_constr_5, &asn_PER_memb_lcsi_constr_5,  memb_lcsi_constraint_1 },
		0, 0, /* No default value */
		"lcsi"
		},
	{ ATF_POINTER, 6, offsetof(struct Fcp, securityAttributesReferenced),
		(ASN_TAG_CLASS_CONTEXT | (11 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_securityAttributesReferenced_constr_6, &asn_PER_memb_securityAttributesReferenced_constr_6,  memb_securityAttributesReferenced_constraint_1 },
		0, 0, /* No default value */
		"securityAttributesReferenced"
		},
	{ ATF_POINTER, 5, offsetof(struct Fcp, efFileSize),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"efFileSize"
		},
	{ ATF_POINTER, 4, offsetof(struct Fcp, pinStatusTemplateDO),
		(ASN_TAG_CLASS_PRIVATE | (6 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"pinStatusTemplateDO"
		},
	{ ATF_POINTER, 3, offsetof(struct Fcp, shortEFID),
		(ASN_TAG_CLASS_CONTEXT | (8 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_shortEFID_constr_9, &asn_PER_memb_shortEFID_constr_9,  memb_shortEFID_constraint_1 },
		0, 0, /* No default value */
		"shortEFID"
		},
	{ ATF_POINTER, 2, offsetof(struct Fcp, proprietaryEFInfo),
		(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProprietaryInfo,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"proprietaryEFInfo"
		},
	{ ATF_POINTER, 1, offsetof(struct Fcp, linkPath),
		(ASN_TAG_CLASS_PRIVATE | (7 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_linkPath_constr_11, &asn_PER_memb_linkPath_constr_11,  memb_linkPath_constraint_1 },
		0, 0, /* No default value */
		"linkPath"
		},
};
static const int asn_MAP_Fcp_oms_1[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
static const ber_tlv_tag_t asn_DEF_Fcp_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_Fcp_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 5, 0, 0 }, /* efFileSize */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* fileDescriptor */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* fileID */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 }, /* dfName */
    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 8, 0, 0 }, /* proprietaryEFInfo */
    { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 7, 0, 0 }, /* shortEFID */
    { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 3, 0, 0 }, /* lcsi */
    { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 4, 0, 0 }, /* securityAttributesReferenced */
    { (ASN_TAG_CLASS_PRIVATE | (6 << 2)), 6, 0, 0 }, /* pinStatusTemplateDO */
    { (ASN_TAG_CLASS_PRIVATE | (7 << 2)), 9, 0, 0 } /* linkPath */
};
asn_SEQUENCE_specifics_t asn_SPC_Fcp_specs_1 = {
	sizeof(struct Fcp),
	offsetof(struct Fcp, _asn_ctx),
	asn_MAP_Fcp_tag2el_1,
	10,	/* Count of tags in the map */
	asn_MAP_Fcp_oms_1,	/* Optional members */
	10, 0,	/* Root/Additions */
	10,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_Fcp = {
	"Fcp",
	"Fcp",
	&asn_OP_SEQUENCE,
	asn_DEF_Fcp_tags_1,
	sizeof(asn_DEF_Fcp_tags_1)
		/sizeof(asn_DEF_Fcp_tags_1[0]), /* 1 */
	asn_DEF_Fcp_tags_1,	/* Same as above */
	sizeof(asn_DEF_Fcp_tags_1)
		/sizeof(asn_DEF_Fcp_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_Fcp_1,
	10,	/* Elements count */
	&asn_SPC_Fcp_specs_1	/* Additional specs */
};

