⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mms_pvar.h

📁 ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包
💻 H
📖 第 1 页 / 共 2 页
字号:
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//*   (c) Copyright Systems Integration Specialists Company, Inc.,	*//*      	  1986 - 1997, All Rights Reserved.		        *//*									*//* MODULE NAME : mms_pvar.h						*//* PRODUCT(S)  : MMSEASE, MMSEASE-LITE					*//*									*//* MODULE DESCRIPTION : 						*//*	This file has the data structures and function definitions	*//*	required to interface with MMS variable access services		*//*	at the primitive level.						*//*									*//*	Parameters : In general, the first parameter is the channel	*//*		     that the request or response is to be sent over.	*//*		     For Responses, the second parameter is the Invoke	*//*		     ID to be used. The last parameter is used to pass	*//*		     operation specific information by pointer. 	*//*									*//*	Return								*//*	    Values : Request functions return a pointer to the pending	*//*		     request tracking structure, of type MMSREQ_PEND.	*//*		     In case of error, the pointer is returned == 0	*//*		     and mms_op_err is written with the err code.	*//*		     Response functions return 0 if OK, else an error	*//*		     code.						*//*									*//* MODIFICATION LOG :							*//*  Date     Who   Rev			Comments			*//* --------  ---  ------   -------------------------------------------	*//* 08/13/97  RKR     01    format changes				*//* 04/02/97  DTL   7.00    MMSEASE 7.0 release. See MODL70.DOC for	*//*			   history.					*//************************************************************************/#ifndef MMS_PVAR_INCLUDED#define MMS_PVAR_INCLUDED#ifdef __cplusplusextern "C" {#endif#include "mms_mp.h"/************************************************************************//************************************************************************//* DEFINES FOR THE VARIABLE ACCESS SERVICES				*//************************************************************************//* defines to be used for addr_tag					*/#define NUM_ADDR	0		/* numeric address		*/#define SYM_ADDR	1		/* symbolic address		*/#define UNCON_ADDR	2		/* unconstrained address	*//* #defines to be used for var_spec_tag					*/#define VA_SPEC_NAMED		0#define VA_SPEC_ADDRESSED	1#define VA_SPEC_DESCRIBED	2#define VA_SPEC_SCATTERED	3#define VA_SPEC_INVALIDATED	4/* #defines to be used for var_acc_tag					*/#define VAR_ACC_VARLIST		0	/* list of variables		*/#define VAR_ACC_NAMEDLIST	1	/* variable list name		*//* defines to be used for 'access result'				*/#define ACC_RSLT_SUCCESS	1#define ACC_RSLT_FAILURE	0/* defines to be used for DataAccessError codes				*/#define	ARE_OBJ_INVALIDATED		0#define	ARE_HW_FAULT			1#define	ARE_TEMP_UNAVAIL		2#define	ARE_OBJ_ACCESS_DENIED		3#define	ARE_OBJ_UNDEFINED		4#define	ARE_INVAL_ADDR			5#define	ARE_TYPE_UNSUPPORTED		6#define	ARE_TYPE_INCONSISTENT		7#define ARE_OBJ_ATTR_INCONSISTENT	8#define ARE_OBJ_ACC_UNSUPPORTED		9#define ARE_OBJ_NONEXISTENT		10/* #defines to be used for 'resp_tag' (write response)			*/#define WR_RSLT_SUCCESS		1#define WR_RSLT_FAILURE		0/* #defines to be used for 'scope' selector (used for delete var, 	*//* varlist, type requests)						*/#define SPECIFIC_SCOPE		0#define ALL_AA_SCOPE		1#define ALL_DOM_SCOPE		2#define ALL_VMD_SCOPE		3/************************************************************************//************************************************************************//* The structures below are used to pass VARIABLE ACCESS information	*//* to/from the MMS primitives.						*//************************************************************************/struct unconst_addr  {  ST_INT   unc_len;			/* unconstrained address length */  ST_UCHAR *unc_ptr;			/* unconstrained address ptr	*/  SD_END_STRUCT  };typedef struct unconst_addr UNCONST_ADDR;struct var_acc_addr  {  ST_INT16 addr_tag;			/* address tag			*/  union    {    ST_UINT32	  num_addr;		/* numeric address		*/    ST_CHAR	  *sym_addr;		/* symbolic address		*/    UNCONST_ADDR  unc_addr;		/* unconstrained address 	*/    } addr;  };typedef struct var_acc_addr VAR_ACC_ADDR;struct var_acc_data  {  ST_INT len;				/* len of variable access data	*/  ST_UCHAR *data; 			/* ptr to variable access data	*/  };typedef struct var_acc_data VAR_ACC_DATA;struct var_acc_tspec  {  ST_INT len;				/* len of type specification	*/  ST_UCHAR *data;			/* ptr to type specification	*/  };typedef struct var_acc_tspec VAR_ACC_TSPEC;struct scattered_access  {  ST_INT   len;				/* len of scattered access descr*/  ST_UCHAR *data; 			/* ptr to scattered access descr*/  };typedef struct scattered_access	SCATTERED_ACCESS;struct alternate_access  {  ST_INT   len;				/* len of alternate access data */  ST_UCHAR *data; 			/* ptr to alternate access data */  };typedef struct alternate_access	ALTERNATE_ACCESS;struct variable_descr  {  VAR_ACC_ADDR	address;		/* variable address		*/  VAR_ACC_TSPEC	type;			/* variable type		*/  };typedef struct variable_descr VARIABLE_DESCR;struct variable_spec  {  ST_INT16 var_spec_tag;		/* variable specification tag	*/  union    {    OBJECT_NAME	     name;		/* name 			*/    VAR_ACC_ADDR     address;		/* address			*/    VARIABLE_DESCR   var_descr;		/* variable description 	*/    SCATTERED_ACCESS sa_descr;		/* scattered access description */    } vs;  };typedef struct variable_spec VARIABLE_SPEC;struct variable_list  {  VARIABLE_SPEC	   var_spec;		/* variable access specification*/  ST_BOOLEAN 	   alt_access_pres;	/* alternate access present	*/  ALTERNATE_ACCESS alt_access;		/* alternate access		*/  };typedef struct variable_list VARIABLE_LIST;struct var_acc_spec  {  ST_INT16    var_acc_tag; 		/* variable access tag		*/  OBJECT_NAME vl_name;			/* variable list name		*/  ST_INT      num_of_variables;		/* number of variables		*//*					   list of variables		*//*  VARIABLE_LIST var_list [num_of_variables];				*/  SD_END_STRUCT  };typedef struct var_acc_spec VAR_ACC_SPEC;struct access_result  {  ST_INT16     acc_rslt_tag; 		/* access result tag		*/  ST_INT16     failure;			/* data access error		*/  VAR_ACC_DATA va_data;			/* success data 		*/  };typedef struct access_result ACCESS_RESULT;struct write_result  {  ST_INT16    resp_tag;			/* response tag 		*/  ST_INT16    failure;			/* data access error		*/  SD_END_STRUCT  };typedef struct write_result WRITE_RESULT;/************************************************************************//************************************************************************//* VARIABLE READ							*//************************************************************************//* REQUEST :								*/struct read_req_info  {  ST_BOOLEAN    spec_in_result;		/* specification with result,	*/					/*  default to false		*/  VAR_ACC_SPEC	va_spec;		/* variable access spec 	*//*					     which "includes"           *//*					     a list of variables	*//*  VARIABLE_LIST var_list [va_spec.num_of_variables];			*//*  SD_END_STRUCT */  };typedef struct read_req_info READ_REQ_INFO;/* RESPONSE :								*/struct read_resp_info  {  ST_BOOLEAN 	va_spec_pres;		/* variable access spec present */  ST_INT 	num_of_acc_result;	/* number of access result	*/  ACCESS_RESULT *acc_rslt_list;		/* ptr to list of access result */  VAR_ACC_SPEC	va_spec;		/* variable access spec 	*//*					     which "includes"           *//*					     a list of variables	*//*  VARIABLE_LIST var_list [va_spec.num_of_variables];			*//*					   list of access result	*//*  ACCESS_RESULT acc_result_list [num_of_acc_result];			*//*  SD_END_STRUCT */  };typedef struct read_resp_info READ_RESP_INFO;#ifndef MMS_LITEMMSREQ_PEND *mp_read (ST_INT chan, READ_REQ_INFO *info);ST_RET mp_read_resp (MMSREQ_IND *ind, READ_RESP_INFO *info);#elseST_RET mpl_read (READ_REQ_INFO *info);ST_RET mpl_read_resp (ST_UINT32 invoke, READ_RESP_INFO *info);#endif/************************************************************************//* VARIABLE WRITE							*//************************************************************************//* REQUEST :								*/struct write_req_info  {  ST_INT 	num_of_data;   		/* number of data		*/  VAR_ACC_DATA  *va_data;		/* ptr to list of variable data */  VAR_ACC_SPEC	va_spec;		/* variable access spec 	*//*					     which "includes"           *//*					     a list of variables	*//*  VARIABLE_LIST var_list [va_spec.num_of_variables];			*//*					   list of variable data	*//*  VAR_ACC_DATA  var_data_list [num_of_data];				*/  };typedef struct write_req_info WRITE_REQ_INFO;/* RESPONSE :								*/struct write_resp_info  {  ST_INT num_of_result;/*	WRITE_RESULT wr_result[num_of_result]				*/  SD_END_STRUCT  };/* Where:								*//*	num_of_result	=  The number of members in wr_result. This	*//*			   number should match the number of		*//*			   variables included in the Write request.	*//*									*//*	wr_result	=  Array of structures of type write_result	*//*			   containing the results of the write		*//*			   (success or failure) for each variable	*//*			   written.  The result array members should	*//*			   align with the var_list members that were	*//*			   included in the Write request.		*/typedef struct write_resp_info WRITE_RESP_INFO;#ifndef MMS_LITEMMSREQ_PEND *mp_write (ST_INT chan, WRITE_REQ_INFO *info);ST_RET mp_write_resp (MMSREQ_IND *ind, WRITE_RESP_INFO *info);#elseST_RET mpl_write (WRITE_REQ_INFO *info);ST_RET mpl_write_resp (ST_UINT32 invoke, WRITE_RESP_INFO *info);#endif/************************************************************************//* INFORMATION REPORT							*//************************************************************************//* REQUEST :								*/struct info_req_info  {  ST_INT 	num_of_acc_result;	/* number of access result	*/  ACCESS_RESULT *acc_rslt_list;		/* ptr to list of access result */  VAR_ACC_SPEC	va_spec;		/* variable access spec 	*//*					     which "includes"           *//*					     a list of variables	*//*  VARIABLE_LIST var_list [va_spec.num_of_variables];			*//*					   list of access result	*//*  ACCESS_RESULT acc_result_list [num_of_acc_result];			*//*  SD_END_STRUCT */  };typedef struct info_req_info INFO_REQ_INFO;/* No Response : (unsolicited)						*/#ifndef MMS_LITEST_RET mp_info (ST_INT chan, INFO_REQ_INFO *info);#elseST_RET mpl_info (INFO_REQ_INFO *info);#endif/************************************************************************//* DEFINE VARIABLE NAME 						*//************************************************************************//* REQUEST :								*/struct defvar_req_info  {  OBJECT_NAME   name;			/* object name			*/  VAR_ACC_ADDR  address; 		/* address			*/  ST_BOOLEAN 	type_spec_pres;		/* type specification present	*/  VAR_ACC_TSPEC type_spec;		/* type specification		*/  };typedef struct defvar_req_info DEFVAR_REQ_INFO;

⌨️ 快捷键说明

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