/*
 * 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 "PE-SecurityDomain.h"

static int
memb_restrictParameter_constraint_8(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_keyList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	size_t size;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	/* Determine the number of elements */
	size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
	
	if((size >= 1)) {
		/* Perform validation of the inner elements */
		return SEQUENCE_OF_constraint(td, sptr, ctfailcb, app_key);
	} else {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: constraint failed (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
}

static int
memb_sdPersoData_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	size_t size;
	
	if(!sptr) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: value not given (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	/* Determine the number of elements */
	size = _A_CSEQUENCE_FROM_VOID(sptr)->count;
	
	if((size >= 1)) {
		/* Perform validation of the inner elements */
		return SEQUENCE_OF_constraint(td, sptr, ctfailcb, app_key);
	} 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_type_keyList_constr_4 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(1..MAX)) */};
static asn_per_constraints_t asn_PER_type_keyList_constr_4 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_SEMI_CONSTRAINED,	-1, -1,  1,  0 }	/* (SIZE(1..MAX)) */,
	0, 0	/* No PER value map */
};
static asn_oer_constraints_t asn_OER_type_sdPersoData_constr_6 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(1..MAX)) */};
static asn_per_constraints_t asn_PER_type_sdPersoData_constr_6 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_SEMI_CONSTRAINED,	-1, -1,  1,  0 }	/* (SIZE(1..MAX)) */,
	0, 0	/* No PER value map */
};
static asn_oer_constraints_t asn_OER_memb_restrictParameter_constr_9 CC_NOTUSED = {
	{ 0, 0 },
	1	/* (SIZE(1..1)) */};
static asn_per_constraints_t asn_PER_memb_restrictParameter_constr_9 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_keyList_constr_4 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(1..MAX)) */};
static asn_per_constraints_t asn_PER_memb_keyList_constr_4 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_SEMI_CONSTRAINED,	-1, -1,  1,  0 }	/* (SIZE(1..MAX)) */,
	0, 0	/* No PER value map */
};
static asn_oer_constraints_t asn_OER_memb_sdPersoData_constr_6 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(1..MAX)) */};
static asn_per_constraints_t asn_PER_memb_sdPersoData_constr_6 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_SEMI_CONSTRAINED,	-1, -1,  1,  0 }	/* (SIZE(1..MAX)) */,
	0, 0	/* No PER value map */
};
static asn_TYPE_member_t asn_MBR_keyList_4[] = {
	{ ATF_POINTER, 0, 0,
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_KeyObject,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		""
		},
};
static const ber_tlv_tag_t asn_DEF_keyList_tags_4[] = {
	(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_keyList_specs_4 = {
	sizeof(struct PE_SecurityDomain__keyList),
	offsetof(struct PE_SecurityDomain__keyList, _asn_ctx),
	0,	/* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_keyList_4 = {
	"keyList",
	"keyList",
	&asn_OP_SEQUENCE_OF,
	asn_DEF_keyList_tags_4,
	sizeof(asn_DEF_keyList_tags_4)
		/sizeof(asn_DEF_keyList_tags_4[0]) - 1, /* 1 */
	asn_DEF_keyList_tags_4,	/* Same as above */
	sizeof(asn_DEF_keyList_tags_4)
		/sizeof(asn_DEF_keyList_tags_4[0]), /* 2 */
	{ &asn_OER_type_keyList_constr_4, &asn_PER_type_keyList_constr_4, SEQUENCE_OF_constraint },
	asn_MBR_keyList_4,
	1,	/* Single element */
	&asn_SPC_keyList_specs_4	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_sdPersoData_6[] = {
	{ ATF_POINTER, 0, 0,
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_OCTET_STRING,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		""
		},
};
static const ber_tlv_tag_t asn_DEF_sdPersoData_tags_6[] = {
	(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_sdPersoData_specs_6 = {
	sizeof(struct PE_SecurityDomain__sdPersoData),
	offsetof(struct PE_SecurityDomain__sdPersoData, _asn_ctx),
	0,	/* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_sdPersoData_6 = {
	"sdPersoData",
	"sdPersoData",
	&asn_OP_SEQUENCE_OF,
	asn_DEF_sdPersoData_tags_6,
	sizeof(asn_DEF_sdPersoData_tags_6)
		/sizeof(asn_DEF_sdPersoData_tags_6[0]) - 1, /* 1 */
	asn_DEF_sdPersoData_tags_6,	/* Same as above */
	sizeof(asn_DEF_sdPersoData_tags_6)
		/sizeof(asn_DEF_sdPersoData_tags_6[0]), /* 2 */
	{ &asn_OER_type_sdPersoData_constr_6, &asn_PER_type_sdPersoData_constr_6, SEQUENCE_OF_constraint },
	asn_MBR_sdPersoData_6,
	1,	/* Single element */
	&asn_SPC_sdPersoData_specs_6	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_openPersoData_8[] = {
	{ ATF_POINTER, 2, offsetof(struct PE_SecurityDomain__openPersoData, restrictParameter),
		(ASN_TAG_CLASS_PRIVATE | (25 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_restrictParameter_constr_9, &asn_PER_memb_restrictParameter_constr_9,  memb_restrictParameter_constraint_8 },
		0, 0, /* No default value */
		"restrictParameter"
		},
	{ ATF_POINTER, 1, offsetof(struct PE_SecurityDomain__openPersoData, contactlessProtocolParameters),
		(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
		0,
		&asn_DEF_OCTET_STRING,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"contactlessProtocolParameters"
		},
};
static const int asn_MAP_openPersoData_oms_8[] = { 0, 1 };
static const ber_tlv_tag_t asn_DEF_openPersoData_tags_8[] = {
	(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_openPersoData_tag2el_8[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 }, /* contactlessProtocolParameters */
    { (ASN_TAG_CLASS_PRIVATE | (25 << 2)), 0, 0, 0 } /* restrictParameter */
};
static asn_SEQUENCE_specifics_t asn_SPC_openPersoData_specs_8 = {
	sizeof(struct PE_SecurityDomain__openPersoData),
	offsetof(struct PE_SecurityDomain__openPersoData, _asn_ctx),
	asn_MAP_openPersoData_tag2el_8,
	2,	/* Count of tags in the map */
	asn_MAP_openPersoData_oms_8,	/* Optional members */
	2, 0,	/* Root/Additions */
	2,	/* First extension addition */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_openPersoData_8 = {
	"openPersoData",
	"openPersoData",
	&asn_OP_SEQUENCE,
	asn_DEF_openPersoData_tags_8,
	sizeof(asn_DEF_openPersoData_tags_8)
		/sizeof(asn_DEF_openPersoData_tags_8[0]) - 1, /* 1 */
	asn_DEF_openPersoData_tags_8,	/* Same as above */
	sizeof(asn_DEF_openPersoData_tags_8)
		/sizeof(asn_DEF_openPersoData_tags_8[0]), /* 2 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_openPersoData_8,
	2,	/* Elements count */
	&asn_SPC_openPersoData_specs_8	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_catTpParameters_12[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct PE_SecurityDomain__catTpParameters, catTpMaxSduSize),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_UInt16,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"catTpMaxSduSize"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct PE_SecurityDomain__catTpParameters, catTpMaxPduSize),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_UInt16,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"catTpMaxPduSize"
		},
};
static const ber_tlv_tag_t asn_DEF_catTpParameters_tags_12[] = {
	(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_catTpParameters_tag2el_12[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* catTpMaxSduSize */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* catTpMaxPduSize */
};
static asn_SEQUENCE_specifics_t asn_SPC_catTpParameters_specs_12 = {
	sizeof(struct PE_SecurityDomain__catTpParameters),
	offsetof(struct PE_SecurityDomain__catTpParameters, _asn_ctx),
	asn_MAP_catTpParameters_tag2el_12,
	2,	/* Count of tags in the map */
	0, 0, 0,	/* Optional elements (not needed) */
	2,	/* First extension addition */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_catTpParameters_12 = {
	"catTpParameters",
	"catTpParameters",
	&asn_OP_SEQUENCE,
	asn_DEF_catTpParameters_tags_12,
	sizeof(asn_DEF_catTpParameters_tags_12)
		/sizeof(asn_DEF_catTpParameters_tags_12[0]) - 1, /* 1 */
	asn_DEF_catTpParameters_tags_12,	/* Same as above */
	sizeof(asn_DEF_catTpParameters_tags_12)
		/sizeof(asn_DEF_catTpParameters_tags_12[0]), /* 2 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_catTpParameters_12,
	2,	/* Elements count */
	&asn_SPC_catTpParameters_specs_12	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_PE_SecurityDomain_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct PE_SecurityDomain, sd_Header),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_PEHeader,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"sd-Header"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct PE_SecurityDomain, instance),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ApplicationInstance,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"instance"
		},
	{ ATF_POINTER, 4, offsetof(struct PE_SecurityDomain, keyList),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		0,
		&asn_DEF_keyList_4,
		0,
		{ &asn_OER_memb_keyList_constr_4, &asn_PER_memb_keyList_constr_4,  memb_keyList_constraint_1 },
		0, 0, /* No default value */
		"keyList"
		},
	{ ATF_POINTER, 3, offsetof(struct PE_SecurityDomain, sdPersoData),
		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
		0,
		&asn_DEF_sdPersoData_6,
		0,
		{ &asn_OER_memb_sdPersoData_constr_6, &asn_PER_memb_sdPersoData_constr_6,  memb_sdPersoData_constraint_1 },
		0, 0, /* No default value */
		"sdPersoData"
		},
	{ ATF_POINTER, 2, offsetof(struct PE_SecurityDomain, openPersoData),
		(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
		0,
		&asn_DEF_openPersoData_8,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"openPersoData"
		},
	{ ATF_POINTER, 1, offsetof(struct PE_SecurityDomain, catTpParameters),
		(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
		0,
		&asn_DEF_catTpParameters_12,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"catTpParameters"
		},
};
static const int asn_MAP_PE_SecurityDomain_oms_1[] = { 2, 3, 4, 5 };
static const ber_tlv_tag_t asn_DEF_PE_SecurityDomain_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_PE_SecurityDomain_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sd-Header */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* instance */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* keyList */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* sdPersoData */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* openPersoData */
    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* catTpParameters */
};
asn_SEQUENCE_specifics_t asn_SPC_PE_SecurityDomain_specs_1 = {
	sizeof(struct PE_SecurityDomain),
	offsetof(struct PE_SecurityDomain, _asn_ctx),
	asn_MAP_PE_SecurityDomain_tag2el_1,
	6,	/* Count of tags in the map */
	asn_MAP_PE_SecurityDomain_oms_1,	/* Optional members */
	4, 0,	/* Root/Additions */
	6,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_PE_SecurityDomain = {
	"PE-SecurityDomain",
	"PE-SecurityDomain",
	&asn_OP_SEQUENCE,
	asn_DEF_PE_SecurityDomain_tags_1,
	sizeof(asn_DEF_PE_SecurityDomain_tags_1)
		/sizeof(asn_DEF_PE_SecurityDomain_tags_1[0]), /* 1 */
	asn_DEF_PE_SecurityDomain_tags_1,	/* Same as above */
	sizeof(asn_DEF_PE_SecurityDomain_tags_1)
		/sizeof(asn_DEF_PE_SecurityDomain_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_PE_SecurityDomain_1,
	6,	/* Elements count */
	&asn_SPC_PE_SecurityDomain_specs_1	/* Additional specs */
};

