/*****************************************************************************
#                                                                            *
# Copyright 2019 AT&T Intellectual Property                                  *
#                                                                            *
# Licensed under the Apache License, Version 2.0 (the "License");            *
# you may not use this file except in compliance with the License.           *
# You may obtain a copy of the License at                                    *
#                                                                            *
#      http://www.apache.org/licenses/LICENSE-2.0                            *
#                                                                            *
# Unless required by applicable law or agreed to in writing, software        *
# distributed under the License is distributed on an "AS IS" BASIS,          *
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
# See the License for the specific language governing permissions and        *
# limitations under the License.                                             *
#                                                                            *
******************************************************************************/

/*
 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
 * From ASN.1 module "X2AP-IEs"
 * 	found in "../../asnFiles/X2AP-IEs.asn"
 * 	`asn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.`
 */

#include "Subscription-Based-UE-DifferentiationInfo.h"

#include "ScheduledCommunicationTime.h"
#include "ProtocolExtensionContainer.h"
/*
 * This type is implemented using NativeEnumerated,
 * so here we adjust the DEF accordingly.
 */
/*
 * This type is implemented using NativeEnumerated,
 * so here we adjust the DEF accordingly.
 */
/*
 * This type is implemented using NativeEnumerated,
 * so here we adjust the DEF accordingly.
 */
/*
 * This type is implemented using NativeEnumerated,
 * so here we adjust the DEF accordingly.
 */
static int
memb_periodicTime_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 >= 1 && value <= 3600)) {
		/* 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_type_periodicCommunicationIndicator_constr_2 CC_NOTUSED = {
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }	/* (0..1,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_type_stationaryIndication_constr_8 CC_NOTUSED = {
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  1,  1,  0,  1 }	/* (0..1,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_type_trafficProfile_constr_12 CC_NOTUSED = {
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }	/* (0..2,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_type_batteryIndication_constr_17 CC_NOTUSED = {
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  2,  2,  0,  2 }	/* (0..2,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static asn_per_constraints_t asn_PER_memb_periodicTime_constr_6 CC_NOTUSED = {
	{ APC_CONSTRAINED | APC_EXTENSIBLE,  12,  12,  1,  3600 }	/* (1..3600,...) */,
	{ APC_UNCONSTRAINED,	-1, -1,  0,  0 },
	0, 0	/* No PER value map */
};
static const asn_INTEGER_enum_map_t asn_MAP_periodicCommunicationIndicator_value2enum_2[] = {
	{ 0,	12,	"periodically" },
	{ 1,	8,	"ondemand" }
	/* This list is extensible */
};
static const unsigned int asn_MAP_periodicCommunicationIndicator_enum2value_2[] = {
	1,	/* ondemand(1) */
	0	/* periodically(0) */
	/* This list is extensible */
};
static const asn_INTEGER_specifics_t asn_SPC_periodicCommunicationIndicator_specs_2 = {
	asn_MAP_periodicCommunicationIndicator_value2enum_2,	/* "tag" => N; sorted by tag */
	asn_MAP_periodicCommunicationIndicator_enum2value_2,	/* N => "tag"; sorted by N */
	2,	/* Number of elements in the maps */
	3,	/* Extensions before this member */
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
};
static const ber_tlv_tag_t asn_DEF_periodicCommunicationIndicator_tags_2[] = {
	(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_periodicCommunicationIndicator_2 = {
	"periodicCommunicationIndicator",
	"periodicCommunicationIndicator",
	&asn_OP_NativeEnumerated,
	asn_DEF_periodicCommunicationIndicator_tags_2,
	sizeof(asn_DEF_periodicCommunicationIndicator_tags_2)
		/sizeof(asn_DEF_periodicCommunicationIndicator_tags_2[0]) - 1, /* 1 */
	asn_DEF_periodicCommunicationIndicator_tags_2,	/* Same as above */
	sizeof(asn_DEF_periodicCommunicationIndicator_tags_2)
		/sizeof(asn_DEF_periodicCommunicationIndicator_tags_2[0]), /* 2 */
	{ 0, &asn_PER_type_periodicCommunicationIndicator_constr_2, NativeEnumerated_constraint },
	0, 0,	/* Defined elsewhere */
	&asn_SPC_periodicCommunicationIndicator_specs_2	/* Additional specs */
};

static const asn_INTEGER_enum_map_t asn_MAP_stationaryIndication_value2enum_8[] = {
	{ 0,	10,	"stationary" },
	{ 1,	6,	"mobile" }
	/* This list is extensible */
};
static const unsigned int asn_MAP_stationaryIndication_enum2value_8[] = {
	1,	/* mobile(1) */
	0	/* stationary(0) */
	/* This list is extensible */
};
static const asn_INTEGER_specifics_t asn_SPC_stationaryIndication_specs_8 = {
	asn_MAP_stationaryIndication_value2enum_8,	/* "tag" => N; sorted by tag */
	asn_MAP_stationaryIndication_enum2value_8,	/* N => "tag"; sorted by N */
	2,	/* Number of elements in the maps */
	3,	/* Extensions before this member */
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
};
static const ber_tlv_tag_t asn_DEF_stationaryIndication_tags_8[] = {
	(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_stationaryIndication_8 = {
	"stationaryIndication",
	"stationaryIndication",
	&asn_OP_NativeEnumerated,
	asn_DEF_stationaryIndication_tags_8,
	sizeof(asn_DEF_stationaryIndication_tags_8)
		/sizeof(asn_DEF_stationaryIndication_tags_8[0]) - 1, /* 1 */
	asn_DEF_stationaryIndication_tags_8,	/* Same as above */
	sizeof(asn_DEF_stationaryIndication_tags_8)
		/sizeof(asn_DEF_stationaryIndication_tags_8[0]), /* 2 */
	{ 0, &asn_PER_type_stationaryIndication_constr_8, NativeEnumerated_constraint },
	0, 0,	/* Defined elsewhere */
	&asn_SPC_stationaryIndication_specs_8	/* Additional specs */
};

static const asn_INTEGER_enum_map_t asn_MAP_trafficProfile_value2enum_12[] = {
	{ 0,	13,	"single-packet" },
	{ 1,	12,	"dual-packets" },
	{ 2,	16,	"multiple-packets" }
	/* This list is extensible */
};
static const unsigned int asn_MAP_trafficProfile_enum2value_12[] = {
	1,	/* dual-packets(1) */
	2,	/* multiple-packets(2) */
	0	/* single-packet(0) */
	/* This list is extensible */
};
static const asn_INTEGER_specifics_t asn_SPC_trafficProfile_specs_12 = {
	asn_MAP_trafficProfile_value2enum_12,	/* "tag" => N; sorted by tag */
	asn_MAP_trafficProfile_enum2value_12,	/* N => "tag"; sorted by N */
	3,	/* Number of elements in the maps */
	4,	/* Extensions before this member */
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
};
static const ber_tlv_tag_t asn_DEF_trafficProfile_tags_12[] = {
	(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_trafficProfile_12 = {
	"trafficProfile",
	"trafficProfile",
	&asn_OP_NativeEnumerated,
	asn_DEF_trafficProfile_tags_12,
	sizeof(asn_DEF_trafficProfile_tags_12)
		/sizeof(asn_DEF_trafficProfile_tags_12[0]) - 1, /* 1 */
	asn_DEF_trafficProfile_tags_12,	/* Same as above */
	sizeof(asn_DEF_trafficProfile_tags_12)
		/sizeof(asn_DEF_trafficProfile_tags_12[0]), /* 2 */
	{ 0, &asn_PER_type_trafficProfile_constr_12, NativeEnumerated_constraint },
	0, 0,	/* Defined elsewhere */
	&asn_SPC_trafficProfile_specs_12	/* Additional specs */
};

static const asn_INTEGER_enum_map_t asn_MAP_batteryIndication_value2enum_17[] = {
	{ 0,	15,	"battery-powered" },
	{ 1,	47,	"battery-powered-not-rechargeable-or-replaceable" },
	{ 2,	19,	"not-battery-powered" }
	/* This list is extensible */
};
static const unsigned int asn_MAP_batteryIndication_enum2value_17[] = {
	0,	/* battery-powered(0) */
	1,	/* battery-powered-not-rechargeable-or-replaceable(1) */
	2	/* not-battery-powered(2) */
	/* This list is extensible */
};
static const asn_INTEGER_specifics_t asn_SPC_batteryIndication_specs_17 = {
	asn_MAP_batteryIndication_value2enum_17,	/* "tag" => N; sorted by tag */
	asn_MAP_batteryIndication_enum2value_17,	/* N => "tag"; sorted by N */
	3,	/* Number of elements in the maps */
	4,	/* Extensions before this member */
	1,	/* Strict enumeration */
	0,	/* Native long size */
	0
};
static const ber_tlv_tag_t asn_DEF_batteryIndication_tags_17[] = {
	(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
	(ASN_TAG_CLASS_UNIVERSAL | (10 << 2))
};
static /* Use -fall-defs-global to expose */
asn_TYPE_descriptor_t asn_DEF_batteryIndication_17 = {
	"batteryIndication",
	"batteryIndication",
	&asn_OP_NativeEnumerated,
	asn_DEF_batteryIndication_tags_17,
	sizeof(asn_DEF_batteryIndication_tags_17)
		/sizeof(asn_DEF_batteryIndication_tags_17[0]) - 1, /* 1 */
	asn_DEF_batteryIndication_tags_17,	/* Same as above */
	sizeof(asn_DEF_batteryIndication_tags_17)
		/sizeof(asn_DEF_batteryIndication_tags_17[0]), /* 2 */
	{ 0, &asn_PER_type_batteryIndication_constr_17, NativeEnumerated_constraint },
	0, 0,	/* Defined elsewhere */
	&asn_SPC_batteryIndication_specs_17	/* Additional specs */
};

asn_TYPE_member_t asn_MBR_Subscription_Based_UE_DifferentiationInfo_1[] = {
	{ ATF_POINTER, 7, offsetof(struct Subscription_Based_UE_DifferentiationInfo, periodicCommunicationIndicator),
		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_periodicCommunicationIndicator_2,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"periodicCommunicationIndicator"
		},
	{ ATF_POINTER, 6, offsetof(struct Subscription_Based_UE_DifferentiationInfo, periodicTime),
		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_NativeInteger,
		0,
		{ 0, &asn_PER_memb_periodicTime_constr_6,  memb_periodicTime_constraint_1 },
		0, 0, /* No default value */
		"periodicTime"
		},
	{ ATF_POINTER, 5, offsetof(struct Subscription_Based_UE_DifferentiationInfo, scheduledCommunicationTime),
		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ScheduledCommunicationTime,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"scheduledCommunicationTime"
		},
	{ ATF_POINTER, 4, offsetof(struct Subscription_Based_UE_DifferentiationInfo, stationaryIndication),
		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_stationaryIndication_8,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"stationaryIndication"
		},
	{ ATF_POINTER, 3, offsetof(struct Subscription_Based_UE_DifferentiationInfo, trafficProfile),
		(ASN_TAG_CLASS_CONTEXT | (4 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_trafficProfile_12,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"trafficProfile"
		},
	{ ATF_POINTER, 2, offsetof(struct Subscription_Based_UE_DifferentiationInfo, batteryIndication),
		(ASN_TAG_CLASS_CONTEXT | (5 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_batteryIndication_17,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"batteryIndication"
		},
	{ ATF_POINTER, 1, offsetof(struct Subscription_Based_UE_DifferentiationInfo, iE_Extensions),
		(ASN_TAG_CLASS_CONTEXT | (6 << 2)),
		-1,	/* IMPLICIT tag at current level */
		&asn_DEF_ProtocolExtensionContainer_170P196,
		0,
		{ 0, 0, 0 },
		0, 0, /* No default value */
		"iE-Extensions"
		},
};
static const int asn_MAP_Subscription_Based_UE_DifferentiationInfo_oms_1[] = { 0, 1, 2, 3, 4, 5, 6 };
static const ber_tlv_tag_t asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1[] = {
	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_Subscription_Based_UE_DifferentiationInfo_tag2el_1[] = {
    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* periodicCommunicationIndicator */
    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* periodicTime */
    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* scheduledCommunicationTime */
    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* stationaryIndication */
    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* trafficProfile */
    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* batteryIndication */
    { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* iE-Extensions */
};
asn_SEQUENCE_specifics_t asn_SPC_Subscription_Based_UE_DifferentiationInfo_specs_1 = {
	sizeof(struct Subscription_Based_UE_DifferentiationInfo),
	offsetof(struct Subscription_Based_UE_DifferentiationInfo, _asn_ctx),
	asn_MAP_Subscription_Based_UE_DifferentiationInfo_tag2el_1,
	7,	/* Count of tags in the map */
	asn_MAP_Subscription_Based_UE_DifferentiationInfo_oms_1,	/* Optional members */
	7, 0,	/* Root/Additions */
	7,	/* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_Subscription_Based_UE_DifferentiationInfo = {
	"Subscription-Based-UE-DifferentiationInfo",
	"Subscription-Based-UE-DifferentiationInfo",
	&asn_OP_SEQUENCE,
	asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1,
	sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1)
		/sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1[0]), /* 1 */
	asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1,	/* Same as above */
	sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1)
		/sizeof(asn_DEF_Subscription_Based_UE_DifferentiationInfo_tags_1[0]), /* 1 */
	{ 0, 0, SEQUENCE_constraint },
	asn_MBR_Subscription_Based_UE_DifferentiationInfo_1,
	7,	/* Elements count */
	&asn_SPC_Subscription_Based_UE_DifferentiationInfo_specs_1	/* Additional specs */
};

