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

static int
memb_version_constraint_12(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_profileType_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
			asn_app_constraint_failed_f *ctfailcb, void *app_key) {
	const UTF8String_t *st = (const UTF8String_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 = UTF8String_length(st);
	if((ssize_t)size < 0) {
		ASN__CTFAIL(app_key, td, sptr,
			"%s: UTF-8: broken encoding (%s:%d)",
			td->name, __FILE__, __LINE__);
		return -1;
	}
	
	if((size >= 1 && size <= 100)) {
		/* 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_iccid_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 == 10)) {
		/* 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_version_constr_14 CC_NOTUSED = {
	{ 0, 0 },
	2	/* (SIZE(2..2)) */};
static asn_per_constraints_t asn_PER_memb_version_constr_14 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_profileType_constr_4 CC_NOTUSED = {
	{ 0, 0 },
	-1	/* (SIZE(0..MAX)) */};
static asn_per_constraints_t asn_PER_memb_profileType_constr_4 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_oer_constraints_t asn_OER_memb_iccid_constr_5 CC_NOTUSED = {
	{ 0, 0 },
	10	/* (SIZE(10..10)) */};
static asn_per_constraints_t asn_PER_memb_iccid_constr_5 CC_NOTUSED = {
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	{ APC_CONSTRAINED,	 0,  0,  10,  10 }	/* (SIZE(10..10)) */,
	0, 0	/* No PER value map */
};
static asn_TYPE_member_t asn_MBR_eUICC_Mandatory_GFSTEList_8[] = {
	{ ATF_POINTER, 0, 0,
		(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
		0,
		&asn_DEF_OBJECT_IDENTIFIER,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		""
		},
};
static const ber_tlv_tag_t asn_DEF_eUICC_Mandatory_GFSTEList_tags_8[] = {
	(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_eUICC_Mandatory_GFSTEList_specs_8 = {
	sizeof(struct ProfileHeader__eUICC_Mandatory_GFSTEList),
	offsetof(struct ProfileHeader__eUICC_Mandatory_GFSTEList, _asn_ctx),
	0,	/* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_eUICC_Mandatory_GFSTEList_8 = {
	"eUICC-Mandatory-GFSTEList",
	"eUICC-Mandatory-GFSTEList",
	&asn_OP_SEQUENCE_OF,
	asn_DEF_eUICC_Mandatory_GFSTEList_tags_8,
	sizeof(asn_DEF_eUICC_Mandatory_GFSTEList_tags_8)
		/sizeof(asn_DEF_eUICC_Mandatory_GFSTEList_tags_8[0]) - 1, /* 1 */
	asn_DEF_eUICC_Mandatory_GFSTEList_tags_8,	/* Same as above */
	sizeof(asn_DEF_eUICC_Mandatory_GFSTEList_tags_8)
		/sizeof(asn_DEF_eUICC_Mandatory_GFSTEList_tags_8[0]), /* 2 */
	{ 0, 0, SEQUENCE_OF_constraint },
	asn_MBR_eUICC_Mandatory_GFSTEList_8,
	1,	/* Single element */
	&asn_SPC_eUICC_Mandatory_GFSTEList_specs_8	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_Member_12[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ProfileHeader__eUICC_Mandatory_AIDs__Member, aid),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ApplicationIdentifier,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"aid"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ProfileHeader__eUICC_Mandatory_AIDs__Member, version),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_version_constr_14, &asn_PER_memb_version_constr_14,  memb_version_constraint_12 },
		0, 0, /* No default value */
		"version"
		},
};
static const ber_tlv_tag_t asn_DEF_Member_tags_12[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_Member_tag2el_12[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* aid */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* version */
};
static asn_SEQUENCE_specifics_t asn_SPC_Member_specs_12 = {
	sizeof(struct ProfileHeader__eUICC_Mandatory_AIDs__Member),
	offsetof(struct ProfileHeader__eUICC_Mandatory_AIDs__Member, _asn_ctx),
	asn_MAP_Member_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_Member_12 = {
	"SEQUENCE",
	"SEQUENCE",
	&asn_OP_SEQUENCE,
	asn_DEF_Member_tags_12,
	sizeof(asn_DEF_Member_tags_12)
		/sizeof(asn_DEF_Member_tags_12[0]), /* 1 */
	asn_DEF_Member_tags_12,	/* Same as above */
	sizeof(asn_DEF_Member_tags_12)
		/sizeof(asn_DEF_Member_tags_12[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_Member_12,
	2,	/* Elements count */
	&asn_SPC_Member_specs_12	/* Additional specs */
};

static asn_TYPE_member_t asn_MBR_eUICC_Mandatory_AIDs_11[] = {
	{ ATF_POINTER, 0, 0,
		(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
		0,
		&asn_DEF_Member_12,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		""
		},
};
static const ber_tlv_tag_t asn_DEF_eUICC_Mandatory_AIDs_tags_11[] = {
	(ASN_TAG_CLASS_CONTEXT | (8 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static asn_SET_OF_specifics_t asn_SPC_eUICC_Mandatory_AIDs_specs_11 = {
	sizeof(struct ProfileHeader__eUICC_Mandatory_AIDs),
	offsetof(struct ProfileHeader__eUICC_Mandatory_AIDs, _asn_ctx),
	0,	/* XER encoding is XMLDelimitedItemList */
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_eUICC_Mandatory_AIDs_11 = {
	"eUICC-Mandatory-AIDs",
	"eUICC-Mandatory-AIDs",
	&asn_OP_SEQUENCE_OF,
	asn_DEF_eUICC_Mandatory_AIDs_tags_11,
	sizeof(asn_DEF_eUICC_Mandatory_AIDs_tags_11)
		/sizeof(asn_DEF_eUICC_Mandatory_AIDs_tags_11[0]) - 1, /* 1 */
	asn_DEF_eUICC_Mandatory_AIDs_tags_11,	/* Same as above */
	sizeof(asn_DEF_eUICC_Mandatory_AIDs_tags_11)
		/sizeof(asn_DEF_eUICC_Mandatory_AIDs_tags_11[0]), /* 2 */
	{ 0, 0, SEQUENCE_OF_constraint },
	asn_MBR_eUICC_Mandatory_AIDs_11,
	1,	/* Single element */
	&asn_SPC_eUICC_Mandatory_AIDs_specs_11	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_ProfileHeader_1[] = {
	{ ATF_NOFLAGS, 0, offsetof(struct ProfileHeader, major_version),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_UInt8,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"major-version"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ProfileHeader, minor_version),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_UInt8,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"minor-version"
		},
	{ ATF_POINTER, 1, offsetof(struct ProfileHeader, profileType),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_UTF8String,
		0,
		{ &asn_OER_memb_profileType_constr_4, &asn_PER_memb_profileType_constr_4,  memb_profileType_constraint_1 },
		0, 0, /* No default value */
		"profileType"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ProfileHeader, iccid),
		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ &asn_OER_memb_iccid_constr_5, &asn_PER_memb_iccid_constr_5,  memb_iccid_constraint_1 },
		0, 0, /* No default value */
		"iccid"
		},
	{ ATF_POINTER, 1, offsetof(struct ProfileHeader, pol),
		(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"pol"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ProfileHeader, eUICC_Mandatory_services),
		(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ServicesList,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"eUICC-Mandatory-services"
		},
	{ ATF_NOFLAGS, 0, offsetof(struct ProfileHeader, eUICC_Mandatory_GFSTEList),
		(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
		0,
		&asn_DEF_eUICC_Mandatory_GFSTEList_8,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"eUICC-Mandatory-GFSTEList"
		},
	{ ATF_POINTER, 3, offsetof(struct ProfileHeader, connectivityParameters),
		(ASN_TAG_CLASS_CONTEXT | (7 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_OCTET_STRING,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"connectivityParameters"
		},
	{ ATF_POINTER, 2, offsetof(struct ProfileHeader, eUICC_Mandatory_AIDs),
		(ASN_TAG_CLASS_CONTEXT | (8 << 2)),
		0,
		&asn_DEF_eUICC_Mandatory_AIDs_11,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"eUICC-Mandatory-AIDs"
		},
	{ ATF_POINTER, 1, offsetof(struct ProfileHeader, iotOptions),
		(ASN_TAG_CLASS_CONTEXT | (9 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_IotOptions,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"iotOptions"
		},
};
static const int asn_MAP_ProfileHeader_oms_1[] = { 2, 4, 7, 8, 9 };
static const ber_tlv_tag_t asn_DEF_ProfileHeader_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ProfileHeader_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* major-version */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* minor-version */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* profileType */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* iccid */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* pol */
    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* eUICC-Mandatory-services */
    { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* eUICC-Mandatory-GFSTEList */
    { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* connectivityParameters */
    { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* eUICC-Mandatory-AIDs */
    { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* iotOptions */
};
asn_SEQUENCE_specifics_t asn_SPC_ProfileHeader_specs_1 = {
	sizeof(struct ProfileHeader),
	offsetof(struct ProfileHeader, _asn_ctx),
	asn_MAP_ProfileHeader_tag2el_1,
	10,	/* Count of tags in the map */
	asn_MAP_ProfileHeader_oms_1,	/* Optional members */
	5, 0,	/* Root/Additions */
	10,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ProfileHeader = {
	"ProfileHeader",
	"ProfileHeader",
	&asn_OP_SEQUENCE,
	asn_DEF_ProfileHeader_tags_1,
	sizeof(asn_DEF_ProfileHeader_tags_1)
		/sizeof(asn_DEF_ProfileHeader_tags_1[0]), /* 1 */
	asn_DEF_ProfileHeader_tags_1,	/* Same as above */
	sizeof(asn_DEF_ProfileHeader_tags_1)
		/sizeof(asn_DEF_ProfileHeader_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_ProfileHeader_1,
	10,	/* Elements count */
	&asn_SPC_ProfileHeader_specs_1	/* Additional specs */
};

