servicechangeparm.c

来自「H.248协议编解码协议栈」· C语言 代码 · 共 190 行

C
190
字号
/* * Generated by asn1c-0.9.16 (http://lionet.info/asn1c) * From ASN.1 module "MEDIA-GATEWAY-CONTROL" * 	found in "h248_2.asn" */#include <asn_internal.h>#include "ServiceChangeParm.h"static intmemb_serviceChangeVersion_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,			asn_app_consume_bytes_f *app_errlog, void *app_key) {	const INTEGER_t *st = (const INTEGER_t *)sptr;	long value;		if(!sptr) {		_ASN_ERRLOG(app_errlog, app_key,			"%s: value not given (%s:%d)",			td->name, __FILE__, __LINE__);		return -1;	}		if(asn_INTEGER2long(st, &value)) {		_ASN_ERRLOG(app_errlog, app_key,			"%s: value too large (%s:%d)",			td->name, __FILE__, __LINE__);		return -1;	}		if((value >= 0 && value <= 99)) {		/* Constraint check succeeded */		return 0;	} else {		_ASN_ERRLOG(app_errlog, app_key,			"%s: constraint failed (%s:%d)",			td->name, __FILE__, __LINE__);		return -1;	}}static intmemb_serviceChangeDelay_1_constraint(asn_TYPE_descriptor_t *td, const void *sptr,			asn_app_consume_bytes_f *app_errlog, void *app_key) {	const INTEGER_t *st = (const INTEGER_t *)sptr;	long value;		if(!sptr) {		_ASN_ERRLOG(app_errlog, app_key,			"%s: value not given (%s:%d)",			td->name, __FILE__, __LINE__);		return -1;	}		if(asn_INTEGER2long(st, &value)) {		_ASN_ERRLOG(app_errlog, app_key,			"%s: value too large (%s:%d)",			td->name, __FILE__, __LINE__);		return -1;	}		if((value >= 0 && value <= 4294967295)) {		/* Constraint check succeeded */		return 0;	} else {		_ASN_ERRLOG(app_errlog, app_key,			"%s: constraint failed (%s:%d)",			td->name, __FILE__, __LINE__);		return -1;	}}static asn_TYPE_member_t asn_MBR_ServiceChangeParm_1[] = {	{ ATF_NOFLAGS, 0, offsetof(struct ServiceChangeParm, serviceChangeMethod),		(ASN_TAG_CLASS_CONTEXT | (0 << 2)),		-1,	/* IMPLICIT tag at current level */		(void *)&asn_DEF_ServiceChangeMethod,		0,	/* Defer constraints checking to the member type */		"serviceChangeMethod"		},	{ ATF_POINTER, 3, offsetof(struct ServiceChangeParm, serviceChangeAddress),		(ASN_TAG_CLASS_CONTEXT | (1 << 2)),		+1,	/* EXPLICIT tag at current level */		(void *)&asn_DEF_ServiceChangeAddress,		0,	/* Defer constraints checking to the member type */		"serviceChangeAddress"		},	{ ATF_POINTER, 2, offsetof(struct ServiceChangeParm, serviceChangeVersion),		(ASN_TAG_CLASS_CONTEXT | (2 << 2)),		-1,	/* IMPLICIT tag at current level */		(void *)&asn_DEF_INTEGER,		memb_serviceChangeVersion_1_constraint,		"serviceChangeVersion"		},	{ ATF_POINTER, 1, offsetof(struct ServiceChangeParm, serviceChangeProfile),		(ASN_TAG_CLASS_CONTEXT | (3 << 2)),		-1,	/* IMPLICIT tag at current level */		(void *)&asn_DEF_ServiceChangeProfile,		0,	/* Defer constraints checking to the member type */		"serviceChangeProfile"		},	{ ATF_NOFLAGS, 0, offsetof(struct ServiceChangeParm, serviceChangeReason),		(ASN_TAG_CLASS_CONTEXT | (4 << 2)),		-1,	/* IMPLICIT tag at current level */		(void *)&asn_DEF_Value,		0,	/* Defer constraints checking to the member type */		"serviceChangeReason"		},	{ ATF_POINTER, 5, offsetof(struct ServiceChangeParm, serviceChangeDelay),		(ASN_TAG_CLASS_CONTEXT | (5 << 2)),		-1,	/* IMPLICIT tag at current level */		(void *)&asn_DEF_INTEGER,		memb_serviceChangeDelay_1_constraint,		"serviceChangeDelay"		},	{ ATF_POINTER, 4, offsetof(struct ServiceChangeParm, serviceChangeMgcId),		(ASN_TAG_CLASS_CONTEXT | (6 << 2)),		+1,	/* EXPLICIT tag at current level */		(void *)&asn_DEF_MId,		0,	/* Defer constraints checking to the member type */		"serviceChangeMgcId"		},	{ ATF_POINTER, 3, offsetof(struct ServiceChangeParm, timeStamp),		(ASN_TAG_CLASS_CONTEXT | (7 << 2)),		-1,	/* IMPLICIT tag at current level */		(void *)&asn_DEF_TimeNotation,		0,	/* Defer constraints checking to the member type */		"timeStamp"		},	{ ATF_POINTER, 2, offsetof(struct ServiceChangeParm, nonStandardData),		(ASN_TAG_CLASS_CONTEXT | (8 << 2)),		-1,	/* IMPLICIT tag at current level */		(void *)&asn_DEF_NonStandardData,		0,	/* Defer constraints checking to the member type */		"nonStandardData"		},	{ ATF_POINTER, 1, offsetof(struct ServiceChangeParm, serviceChangeInfo),		(ASN_TAG_CLASS_CONTEXT | (9 << 2)),		-1,	/* IMPLICIT tag at current level */		(void *)&asn_DEF_AuditDescriptor,		0,	/* Defer constraints checking to the member type */		"serviceChangeInfo"		},};static ber_tlv_tag_t asn_DEF_ServiceChangeParm_1_tags[] = {	(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))};static asn_TYPE_tag2member_t asn_MAP_ServiceChangeParm_1_tag2el[] = {    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* serviceChangeMethod at 850 */    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* serviceChangeAddress at 851 */    { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* serviceChangeVersion at 852 */    { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* serviceChangeProfile at 853 */    { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* serviceChangeReason at 854 */    { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* serviceChangeDelay at 865 */    { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* serviceChangeMgcId at 867 */    { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* timeStamp at 868 */    { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* nonStandardData at 869 */    { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 } /* serviceChangeInfo at 871 */};static asn_SEQUENCE_specifics_t asn_SPC_ServiceChangeParm_1_specs = {	sizeof(struct ServiceChangeParm),	offsetof(struct ServiceChangeParm, _asn_ctx),	asn_MAP_ServiceChangeParm_1_tag2el,	10,	/* Count of tags in the map */	8,	/* Start extensions */	11	/* Stop extensions */};asn_TYPE_descriptor_t asn_DEF_ServiceChangeParm = {	"ServiceChangeParm",	"ServiceChangeParm",	SEQUENCE_free,	SEQUENCE_print,	SEQUENCE_constraint,	SEQUENCE_decode_ber,	SEQUENCE_encode_der,	SEQUENCE_decode_xer,	SEQUENCE_encode_xer,	0,	/* Use generic outmost tag fetcher */	asn_DEF_ServiceChangeParm_1_tags,	sizeof(asn_DEF_ServiceChangeParm_1_tags)		/sizeof(asn_DEF_ServiceChangeParm_1_tags[0]), /* 1 */	asn_DEF_ServiceChangeParm_1_tags,	/* Same as above */	sizeof(asn_DEF_ServiceChangeParm_1_tags)		/sizeof(asn_DEF_ServiceChangeParm_1_tags[0]), /* 1 */	asn_MBR_ServiceChangeParm_1,	10,	/* Elements count */	&asn_SPC_ServiceChangeParm_1_specs	/* Additional specs */};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?