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

static int
memb_lifeCycleState_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_processData_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_processData_constr_11 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(1..MAX)) */};
static asn_per_constraints_t asn_PER_type_processData_constr_11 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_lifeCycleState_constr_7 CC_NOTUSED = {
	{ 0, 0 },
	1	/* (SIZE(1..1)) */};
static asn_per_constraints_t asn_PER_memb_lifeCycleState_constr_7 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_processData_constr_11 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(1..MAX)) */};
static asn_per_constraints_t asn_PER_memb_processData_constr_11 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_processData_11[] = {
	{ 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_processData_tags_11[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_processData_specs_11 = {
	sizeof(struct ApplicationInstance__processData),
	offsetof(struct ApplicationInstance__processData, _asn_ctx),
	0,	/* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_processData_11 = {
	"processData",
	"processData",
	&asn_OP_SEQUENCE_OF,
	asn_DEF_processData_tags_11,
	sizeof(asn_DEF_processData_tags_11)
		/sizeof(asn_DEF_processData_tags_11[0]), /* 1 */
	asn_DEF_processData_tags_11,	/* Same as above */
	sizeof(asn_DEF_processData_tags_11)
		/sizeof(asn_DEF_processData_tags_11[0]), /* 1 */
	{ &asn_OER_type_processData_constr_11, &asn_PER_type_processData_constr_11, SEQUENCE_OF_constraint },
	asn_MBR_processData_11,
	1,	/* Single element */
	&asn_SPC_processData_specs_11	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_ApplicationInstance_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ApplicationInstance, applicationLoadPackageAID),
		(ASN_TAG_CLASS_APPLICATION | (15 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ApplicationIdentifier,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"applicationLoadPackageAID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ApplicationInstance, classAID),
		(ASN_TAG_CLASS_APPLICATION | (15 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ApplicationIdentifier,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"classAID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ApplicationInstance, instanceAID),
		(ASN_TAG_CLASS_APPLICATION | (15 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ApplicationIdentifier,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"instanceAID"
		},
	{ ATF_POINTER, 1, offsetof(struct ApplicationInstance, extraditeSecurityDomainAID),
		(ASN_TAG_CLASS_APPLICATION | (15 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ApplicationIdentifier,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"extraditeSecurityDomainAID"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ApplicationInstance, applicationPrivileges),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"applicationPrivileges"
		},
	{ ATF_POINTER, 1, offsetof(struct ApplicationInstance, lifeCycleState),
		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_lifeCycleState_constr_7, &asn_PER_memb_lifeCycleState_constr_7,  memb_lifeCycleState_constraint_1 },
		0, 0, /* No default value */
		"lifeCycleState"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ApplicationInstance, applicationSpecificParametersC9),
		(ASN_TAG_CLASS_PRIVATE | (9 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"applicationSpecificParametersC9"
		},
	{ ATF_POINTER, 4, offsetof(struct ApplicationInstance, systemSpecificParameters),
		(ASN_TAG_CLASS_PRIVATE | (15 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ApplicationSystemParameters,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"systemSpecificParameters"
		},
	{ ATF_POINTER, 3, offsetof(struct ApplicationInstance, applicationParameters),
		(ASN_TAG_CLASS_PRIVATE | (10 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_UICCApplicationParameters,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"applicationParameters"
		},
	{ ATF_POINTER, 2, offsetof(struct ApplicationInstance, processData),
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_processData_11,
		0,
		{ &asn_OER_memb_processData_constr_11, &asn_PER_memb_processData_constr_11,  memb_processData_constraint_1 },
		0, 0, /* No default value */
		"processData"
		},
	{ ATF_POINTER, 1, offsetof(struct ApplicationInstance, controlReferenceTemplate),
		(ASN_TAG_CLASS_CONTEXT | (16 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ControlReferenceTemplate,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"controlReferenceTemplate"
		},
};
static const int asn_MAP_ApplicationInstance_oms_1[] = { 3, 5, 7, 8, 9, 10 };
static const ber_tlv_tag_t asn_DEF_ApplicationInstance_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ApplicationInstance_tag2el_1[] = {
    { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, 0, 0 }, /* processData */
    { (ASN_TAG_CLASS_APPLICATION | (15 << 2)), 0, 0, 3 }, /* applicationLoadPackageAID */
    { (ASN_TAG_CLASS_APPLICATION | (15 << 2)), 1, -1, 2 }, /* classAID */
    { (ASN_TAG_CLASS_APPLICATION | (15 << 2)), 2, -2, 1 }, /* instanceAID */
    { (ASN_TAG_CLASS_APPLICATION | (15 << 2)), 3, -3, 0 }, /* extraditeSecurityDomainAID */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, 0, 0 }, /* applicationPrivileges */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 5, 0, 0 }, /* lifeCycleState */
    { (ASN_TAG_CLASS_CONTEXT | (16 << 2)), 10, 0, 0 }, /* controlReferenceTemplate */
    { (ASN_TAG_CLASS_PRIVATE | (9 << 2)), 6, 0, 0 }, /* applicationSpecificParametersC9 */
    { (ASN_TAG_CLASS_PRIVATE | (10 << 2)), 8, 0, 0 }, /* applicationParameters */
    { (ASN_TAG_CLASS_PRIVATE | (15 << 2)), 7, 0, 0 } /* systemSpecificParameters */
};
asn_SEQUENCE_specifics_t asn_SPC_ApplicationInstance_specs_1 = {
	sizeof(struct ApplicationInstance),
	offsetof(struct ApplicationInstance, _asn_ctx),
	asn_MAP_ApplicationInstance_tag2el_1,
	11,	/* Count of tags in the map */
	asn_MAP_ApplicationInstance_oms_1,	/* Optional members */
	6, 0,	/* Root/Additions */
	11,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ApplicationInstance = {
	"ApplicationInstance",
	"ApplicationInstance",
	&asn_OP_SEQUENCE,
	asn_DEF_ApplicationInstance_tags_1,
	sizeof(asn_DEF_ApplicationInstance_tags_1)
		/sizeof(asn_DEF_ApplicationInstance_tags_1[0]), /* 1 */
	asn_DEF_ApplicationInstance_tags_1,	/* Same as above */
	sizeof(asn_DEF_ApplicationInstance_tags_1)
		/sizeof(asn_DEF_ApplicationInstance_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_ApplicationInstance_1,
	11,	/* Elements count */
	&asn_SPC_ApplicationInstance_specs_1	/* Additional specs */
};

