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

📄 mms_vvar.h

📁 ICCP Toolkit 是在 Tru64下开发Tase.2通信协议的开发包
💻 H
📖 第 1 页 / 共 3 页
字号:
/************************************************************************//* SISCO SOFTWARE MODULE HEADER *****************************************//************************************************************************//*   (c) Copyright Systems Integration Specialists Company, Inc.,	*//*      	  1986 - 2002, All Rights Reserved.		        *//*									*//* MODULE NAME : mms_vvar.h						*//* PRODUCT(S)  : MMSEASE						*//*									*//* MODULE DESCRIPTION : 						*//*	This module contains data and function definitions associated	*//*	with the MMS virtual machine variable access operations.	*//*									*//* MODIFICATION LOG :							*//*  Date     Who   Rev			Comments			*//* --------  ---  ------   -------------------------------------------	*//* 03/01/02  JRB     34    Add SD_CONST to (RUNTIME_TYPE *) in RT_AA_CTRL.*//* 02/06/02  JRB     33    Deleted unused MMS_ALTA_DATA			*//* 12/20/01  JRB     32    Convert to use ASN1R.			*//*			   Add ASN1_ENC_CTXT arg to ms_*_to_asn1*.	*//*			   Add new function ms_local_to_asn1_easy.	*//* 11/13/01  EJV     31    Added support for new MMS type UtcTime:	*//*			   Added RT_UTC_TIME, chg RT_STR_END, RT_ARR_END*//*			   M_ARB_DATA_CTRL: added utc fun proto.	*//* 06/20/01  EJV     30    Added () around rt in ms_comp_name_xxx macros*//*			   to handle rt+1, rt-1 arguments.		*//* 04/11/01  MDE     29    Added ms_comp_name_pres macros		*//* 01/21/01  EJV     28    M_ARB_DATA_CTRL: changed bool to booln,	*//*			   to avoid conflict w/ bool type in C++ files.	*//* 11/02/00  JRB     27    Del #if MVL_UCA. Use #if MMS_LITE instead.	*//* 10/25/00  JRB     26    Del MVL_UCA define (define in makefile).	*//*			   Move ST_RTREF typedef so always defined.	*//* 08/29/00  JRB     25    Chg ms_comp_name_find from funct to macro.	*//* 07/28/00  JRB     24    Simplify RT_TYPE ifdefs.			*//*			   Fix SD_CONST in some prototypes.		*//*			   Del m_type_nam* externs, only used in 1 file.*//* 07/13/00  JRB     23    Add "#ifdef USE_RT_TYPE_2".			*//*			   Add ms_runtime_create, ms_runtime_destroy,	*//*			     ms_comp_name_find.				*//* 06/22/00  MDE     22    Added numMvlRtNames declaration		*//* 06/16/00  JRB     21    Add #if INT64_SUPP...			*//* 04/20/00  JRB     20    Del SD_CONST from (RUNTIME_TYPE **) args.	*//* 09/13/99  MDE     19    Added SD_CONST modifiers			*//* 09/10/98  MDE     18    Added 'mvlRtNames' declaration		*//* 08/11/98  MDE     17    Minor changes for Foundry			*//* 06/30/98  MDE     16    Changed ST_REF to ST_VOID *			*//* 04/07/98  MDE     15    Added struct/arr start/end alignment mode	*//* 03/23/98  MDE     14    Now let user supply AA derived type (RD/WR)	*//* 03/12/98  MDE     13    MMS-Lite related runtime type changes	*//* 03/11/98  MDE     12    Removed NEST_RT_TYPES			*//* 02/10/98  MDE     11    Changed runtime type				*//* 12/29/97  MDE     10    Added 'typeCtrl' to RUNTIME_TYPE for use	*//* 			   with 'mktypes.exe' only.			*//* 09/11/97  MDE     09    MMS ARB user funs now return ST_RET		*//* 09/04/97  NAV     08    Split ARB Btime functions & add 		*//*			     have them return a ST_BOOLEAN		*//* 08/15/97  MDE     07    BTOD handling comments			*//* 08/14/97  RKR     06    Format changes				*//* 07/16/97  RKR     05    Added more 64 bit integer support		*//* 06/23/97  RKR     04    Added arbitrary data handling		*//* 06/20/97  MDE     03    Added 64 bit integer support			*//* 06/09/97  MDE     02    Changed Runtime Type and it's use		*//* 06/05/97  RKR     01    Removed AA_OUTER_NEST rearranged AA constants*//* 04/02/97  DTL   7.00    MMSEASE 7.0 release. See MODL70.DOC for	*//*			   history.					*//************************************************************************/#ifndef MMS_VVAR_INCLUDED#define MMS_VVAR_INCLUDED#ifndef MMS_LITE#include "mms_mv.h"#endif#ifdef __cplusplusextern "C" {#endif/* Uncomment this define to allow dynamic type creation.		*//* #define USE_RT_TYPE_2	*//************************************************************************//************************************************************************//* BINARY TIME OF DAY NOTES						*//* There are two forms of TimeOfDay, 4 byte and 6 byte.			*//* The 6 byte form contains the number of milliseconds since midnight	*//* and the number of days since Jan 1, 1984. The 4 byte form contains	*//* only the millisecond number. 					*//*									*//* In memory, the Btime6 data looks like a pair of 32 bit integers:	*//*   ST_INT32 ms;	      Number of milliseconds since midnight	*//*   ST_INT32 day;	      Number of days since Jan 1, 1984		*//*									*//* and the Btime4 data looks like a single 32 bit integer:		*//*   ST_INT32 ms;	      Number of milliseconds since midnight	*//*									*//* Data alignment for either form is that of a ST_INT32.		*//* Note that MMS-EASE simply encodes/decodes the values to/from the 	*//* MMS PDU and does not perform any local time localization.		*//************************************************************************//************************************************************************//************************************************************************//* MMS-LITE 								*//************************************************************************//* MMS-LITE uses a slightly different form of RUNTIME_TYPE, which is    *//* ROM-able and a bit more compact. Foundry uses the standard form.	*/#if defined(MMS_LITE) && (!defined(USE_RT_TYPE_2))#define USE_RT_TYPE_3	/* Default for MMS Lite				*/#endif#if defined(FOUNDRY)	/* Overwride defines when compiling Foundry	*/#undef USE_RT_TYPE_2#undef USE_RT_TYPE_3#endif/* RUNTIME TYPE INTEGER FORM						*//* In MMS-LITE the size of the RUNTIME_TYPE must be minimized, so we	*//* will use 16 bit integers for the compoments. This puts a 32K limit	*//* on the size of a variable. 						*/#if !defined(MMS_LITE)#define ST_RTINT  ST_INT#else#define ST_RTINT  ST_INT16#endif/************************************************************************//* MMS-LITE UCA SPECIFIC SECTION					*//************************************************************************//* MMS-LITE uses an extended RUNTIME_TYPE for use with the MVL UCA 	*//* object handling extensions.						*//* To use the UCA extensions, MVL_UCA must be defined.			*//* NOTE: MVL_UCA is NOT defined by default.				*//* This typedef is for the application use only and can be changed as 	*//* required. Normally it is used to allow the applcation to consolidate	*//* MVL_UCA read and write indication handler functions.			*/typedef ST_VOID *  ST_RTREF;/* These elements are designed to be used to assist in implementing the *//* UCA device models in MMS-EASE Lite. Note that 'MVL_UCA' must be 	*//* defined when creating the MMS-EASE libraries if these features are	*//* to be used.								*//* You may comment out the defines for those components that will not	*//* bs used in the target application to reduce the size of the 		*//* RUNTIME_TYPE table.							*/#define MVLU_USE_REFtypedef struct mvluTypeStruct   {  ST_RTINT sortedNum;	/* For use by MVLU GNL code 			*/  ST_RTINT offSet;	/* Offset from start of mother structure 	*/  ST_RTINT rdIndFunIndex;	  ST_RTINT wrIndFunIndex;	/* These elements can be used by the application as needed, and are	*//* copied into the derived variable association. MVLU does not use them	*//* directly.								*/#if defined(MVLU_USE_REF)  ST_RTREF ref;		/* set to 'XXX$YYY_REF' by foundry 		*/#endif  } MVLU_TYPE_INFO;/************************************************************************//* RUNTIME TYPE DEFINITION STRUCTURE					*//************************************************************************//* The following defines specify the various data parameters		*//************************************************************************/#define RT_ARR_START	        1#define RT_STR_START	        2#define	RT_BOOL		        3#define	RT_BIT_STRING	        4#define	RT_INTEGER		5#define	RT_UNSIGNED	        6#define	RT_FLOATING_POINT	7#define	RT_OCTET_STRING	        9#define	RT_VISIBLE_STRING	10#define	RT_GENERAL_TIME	        11#define	RT_BINARY_TIME	        12#define	RT_BCD		        13#define	RT_BOOLEANARRAY	        14#define	RT_UTC_TIME	        17#define RT_STR_END 	        18#define RT_ARR_END 	        19struct runtime_type  {  ST_UCHAR el_tag; 	/* ID tag expected for this element, or special */			/* values for end of array, end of struct	*/			/* or nested runtime types			*/  ST_RTINT   el_size;	/* number of bytes occupied by this element	*/  ST_RTINT   offset_to_last; /* offset in bytes from the start of the 	*/                         /* data to the last element 		 	*/  union    {    struct		 /* primitive element				*/      {      ST_RTINT el_len;	 /* precision, in bytes except bitstr, time	*/      ST_RTINT pad;	 /* included to allow aggregate initialization	*/      } p;    struct		 /* structure (top or bottom)			*/      {      ST_RTINT num_rt_blks; /* # runtime blks to get to strt/end elmnt	*/      ST_RTINT pad;	 /* included to allow aggregate initialization	*/#if !defined(USE_RT_TYPE_2) && !defined(USE_RT_TYPE_3)      ST_BOOLEAN packd;	 /* Indicates if packed or not.			*/#endif      } str;    struct		 /* Array (top or bottom)			*/      {      ST_RTINT num_elmnts;  /* # array elements (index limit)		*/      ST_RTINT num_rt_blks; /* # runtime blks to get to strt/end elmnt	*/#if !defined(USE_RT_TYPE_2) && !defined(USE_RT_TYPE_3)      ST_BOOLEAN packd;	 /* Indicates if packed or not.			*/#endif      } arr;    } u;#if defined(USE_RT_TYPE_2)  ST_CHAR *comp_name_ptr;		/* ptr to comp name string	*/#elif defined(USE_RT_TYPE_3)  ST_RTINT name_index;	 		/* Index into mvlRtNames table	*/#else					/* Default			*/  ST_CHAR name[MAX_IDENT_LEN+1];#endif#if defined(MMS_LITE)  MVLU_TYPE_INFO mvluTypeInfo;	    	/* MMS-LITE UCA handler use	*/#endif#if defined(FOUNDRY)  ST_CHAR *refBuf;  ST_CHAR *rdIndexBuf;  ST_CHAR *wrIndexBuf;#endif  };typedef struct runtime_type RUNTIME_TYPE;#if defined(MMS_LITE)extern ST_RET (*u_ml_get_rt_type) (OBJECT_NAME *type_name,       			   RUNTIME_TYPE **rt_out, ST_INT *num_rt_out);extern SD_CONST ST_INT numMvlRtNames;extern SD_CONST ST_CHAR *SD_CONST mvlRtNames[];#endif/************************************************************************//* ALTERNATE ACCESS DEFINITION STRUCTURE  				*//************************************************************************//* Possible values for sel_type                                         */#define AA_COMP		        0#define AA_INDEX 	        1#define AA_INDEX_RANGE	        2#define AA_ALL	                3#define AA_COMP_NEST		4#define AA_INDEX_NEST 	        5#define AA_INDEX_RANGE_NEST	6#define AA_ALL_NEST	        7#define AA_END_NEST             8#define MAX_NUM_AA_EL		100struct alt_acc_el  {  ST_BOOLEAN comp_name_pres;  ST_CHAR    comp_name[MAX_IDENT_LEN+1];/* named component for derived 	*/					/* type				*/  ST_INT sel_type;			/* type of access selection	*/  union    {    ST_CHAR component[MAX_IDENT_LEN+1];	/* Used for AA_COMP		*/     ST_UINT32 index;			/* Used for AA_INDEX		*/    struct		  		/* Used for AA_INDEX_RANGE	*/      {      ST_UINT32 low_index;      ST_UINT32 num_elmnts;      } ir;    } u;  };typedef struct alt_acc_el ALT_ACC_EL;struct alt_access  {  ST_INT     num_aa;  ALT_ACC_EL *aa;  };typedef struct alt_access ALT_ACCESS;/* This data structure is used in table form to implement alternate	*//* access from the server perspective (NEWDATA <-> ASN1DATA)		*//* It allows re-ordering of elements as well as limited selection	*/struct rt_aa_ctrl  {  SD_CONST RUNTIME_TYPE *rt;  ST_UINT      offset_to_data;	/* offset to data element		*/

⌨️ 快捷键说明

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