📄 icsdkc.h
字号:
/* SPECTRUM: C txt off * Copyright (C) Siemens AG 1993 All Rights Reserved.Confidential * ICCP Protocol Engine constant definitions * * $Id: icsdkc.h,v 1.000.1.07 1997/11/24 15:21:16 sbecchet Exp $ * * $NewRev$ * $NewRevEnd$ * * $Log: icsdkc.h,v $ * Revision 1.000.1.07 1997/11/24 15:21:16 sbecchet * Set largest MMS message size supported to 32766. * Wanted 32768, but this results in 8000(16) and * doesn't work well in a short variable. * The icapi code needs further change to go to 32768 * and beyond. EMP14513 * * Revision 1.000.1.06 1997/11/06 22:19:45 sbecchet * Set DEFAULT_MAX_MMS_PDU=32000. This becomes the * maximum ASN1 buffer used by SDK. EMP14513 * * Revision 1.000.1.05 1997/10/31 21:13:52 rwoodruf * Add PT_DEVICE_TAG for Block 5 tagging feature. EMP14356 * * Revision 1.000.1.04 1997/10/10 21:15:20 rwoodruf * Remove #define MINIMAL_EVENT_BUFFER_TIME 1. EMP13964 * * Revision 1.000.1.03 1997/05/28 21:05:27 shri * Transfered Transmit Queue Full code from NT to AIX EMP13185 * * Revision 1.000.1.02 1996/10/18 16:09:56 dnikolic * Increased DEFAULT_MAX_MMS_PDU size from 8000 EMP10990 * * Revision 1.000.1.01 1996/10/10 21:42:00 kevinr * EMP9614 * Changed the define name BUFFER_TIME_FOR_NON_RBE to * MINIMAL_EVENT_BUFFER_TIME in an attempt to better describe * what it represents. * * Revision 1.000.1.00 1996/09/11 00:26:20 kevinr * -- revision created by srcinit -- EMP10251 * * Revision 1.000 1996/09/11 00:26:19 kevinr * Initial revision EMP10251 * This is a copy of the def/icc.h file (rev 1.000.1.09) with the * unnecessary items removed. * * $Logend$ * txt on- */ /*-*/#ifndef _ICSDKC_H#define _ICSDKC_H/* FILE START*******************************************************************************NAME icsdkc.h - Common constants (#define) definitions for ICCP SDKSCOPE Internal to subsystem.SYNOPSIS #include <icsdkc.h>DESCRIPTION The ICCP SDK uses constant definitions which are defined here. ICCP-SDK is used by applications to exchange control center information with a peer as defined by the iccp protocol. See the Inter-Control Center Communications Protocol (ICCP) specification as defined by the IEEE Power Engineering Society (PES) Utility Communications Standards (UCS) Working Group for complete protocol details. The MMS services required by the iccp protocol are obtained through the use of the MMS-EASE third party product. MMS-EASE provides a set of procedure interfaces that converts to/from MMS protocol elements exchanged over a MMS protocol stack.NOTES*******************************************************************************FILE END *//* * define DEBUG_MMS_LOG2 to turn on MMS logging * define DEBUG_MMS_LOG2 will define DEBUG_MMS_LOGT which * lengthen the time out values *#define DEBUG_MMS_LOG2 */#ifdef DEBUG_MMS_LOG2#define DEBUG_MMS_LOGT#endif#ifndef ST_BOOLEAN#define ST_BOOLEAN unsigned char#endif/* * SISCO's macro for malloc and free * */#define icMalloc(a) chk_calloc(1,a)#define icFree(a) chk_free(a)/* * dbmalloc * * To use: export LDOPTIONS=/usr/contrib/debug/dbmalloc/libdbmalloc.a make (use the same options/parameters that you always do) * * and before executing your program * export MALLOC_WARN=1 export MALLOC_FATAL=1 *#define icMalloc(a) malloc(a)#define icFree(a) free(a) * *//* * ICCP Protocol Engine Timer Values (in milli seconds) */#ifdef DEBUG_MMS_LOGT#define CHECK_ASSO_TIME 20000#else#define CHECK_ASSO_TIME 1000 /* MMSEASE require this for checking association reqs */#endif#define CHANNEL_EVENT_TIME 200#define CHECK_STARTTIME_TIME 1000#define DEFAULT_TLE 2 /* in seconds */#define TRANSMIT_CHECK_TIME 333#define CHANNEL_BUSY_TIME 500/* * BLT version numbers */#define FEATURE_VERSION_BLTID 3#define IC_MAX_NAME_LEN 32#define MAX_VERSION_LEN 32/* * these default values are from ICCP IDDUG */#define DEFAULT_MAX_NUM_TS 400 #define DEFAULT_MAX_NUM_DS 400 /* DEFAULT_MAX_MMS_PDU is the size of SDK's ASN1 buffer. *//* If MMS supports a larger PDU size, then this should be *//* increased. *//* NOTE: Currently this value must fit into a icShort variable*//* So it is set to 32766 and not 32768. */#define DEFAULT_MAX_MMS_PDU 32766#define DEFAULT_INTERVAL 60 /* in seconds */#define DEFAULT_INTEGRITY 1800 /* in seconds *//* * access control constants */#define PERM_VISIBLE 0x00 /* Client allowed to see name */#define PERM_READ 0x01 /* Client allowed to read value */#define PERM_WRITE 0x02 /* Client allowed to write value */#define PERM_SELECT 0x04 /* Client allowed to select device */#define PERM_OPERATE 0x08 /* Client allowed to operate device */#define PERM_OUTPUT 0x10 /* Client allowed to output to operator station */#define TV_HIGH_PRIORITY 0x0001 /* Transfer value as high priority */#define TV_LOW_PRIORITY 0x0002 /* Transfer value as high priority */#define TV_OTHER_PRIORITY 0x0004 /* Transfer value as high priority */#define TV_PERIODIC 0x0008 /* Transfer value periodically */#define TV_EXCEPTION 0x0010 /* Transfer value by exception */#define TV_CRITICAL 0x0020 /* Data require ACK by client upon recipt */#define TV_RBE 0x0040 /* Transfer Report by RBE */#define TV_BLOCK 0x0080 /* Transfer Report by Block Data */#define TV_OPERATOR 0x0100 /* Transfer Report by server operator */#define TV_PRIORITY_MASK 0x0007 /* mask to clear TV_DONE */#define TV_MASK 0x00ff /* mask to clear TV_DONE */#define TV_DONE 0x0100 /* Transfer value included in data set, for internal iccp use *//* * * return code for createObjectSetArray * */#define OK_RETURNED 0#define DATA_VAL_UNDEFINED 1#define DATA_VAL_NOT_ACCESSIBLE 2#define MALLOC_ERROR 3#define UNKNOWN_OBJ_TAG 4#define DATA_VAL_ALT_ACCESS_PRE 5#define DATA_VAL_NOT_VA_SPEC_NAMED 6/* * * return code for processTransferWrite *#define OK_RETURNED 0 */#define DATA_SET_UNDEFINED 1#define DATA_SET_ACCESS_DENIED 2#define DATA_SET_EXCEED_MAX_PDU 3#define XFER_SET_ALREADY_ACTIVE 4#define XFER_SET_NO_RBE_NO_INT 5#define XFER_SET_DEFAULT_INTEGRITY 0x80#define XFER_SET_TIME_TOO_SHORT 0x40#define XFER_SET_BAD_TIME_VALUE 0x20#define XFER_SET_TIME_INVALID 0x10#define XFER_SET_BAD_BUFR_TIME 0x08/* * ICCP Local Defines */#define FEATURE_BLOCK1 0x8000#define FEATURE_BLOCK2 0x4000#define FEATURE_BLOCK3 0x2000#define FEATURE_BLOCK4 0x1000#define FEATURE_BLOCK5 0x0800#define FEATURE_BLOCK6 0x0400#define FEATURE_BLOCK7 0x0200#define FEATURE_BLOCK8 0x0100#define FEATURE_BLOCK9 0x0080#define FEATURE_BLOCK10 0x0040#define FEATURE_BLOCK11 0x0020#define FEATURE_BLOCK12 0x0010#define PT_FEATURES (MAX_LD_PT + 1)#define PT_VERSION_ICCP (MAX_LD_PT + 2)#define PT_VERSION_TASE (MAX_LD_PT + 3)#define PT_VISIBLE_STRING (MAX_LD_PT + 4)#define PT_OBJECT_NAME (MAX_LD_PT + 5)#define PT_SECONDS (MAX_LD_PT + 6)#define PT_DSTRANSFER_SET (MAX_LD_PT + 7)#define PT_CONDITIONS (MAX_LD_PT + 8) /* DSCondition */#define PT_EVENT_CODE (MAX_LD_PT + 9)#define PT_TIMESTAMP (MAX_LD_PT + 10)#define PT_DEVICE_TAG (MAX_LD_PT + 11)#define MAX_ACCESSIBLE_PT PT_DEVICE_TAG#define PT_C_TRANSFER_SET (MAX_LD_PT + 12)#define PT_OBJECT_SET (MAX_LD_PT + 13)#define PT_C_OBJECT_SET (MAX_LD_PT + 14)#define MAX_PT (PT_C_OBJECT_SET + 1)#define cNormName 8/* An initial amount of memory is allocated for each of the *//* bilaterail tables. The amount of memory is determined by the *//* nuber of entries the table is expected to contain multiplied by *//* the size of bilateralEntryType + the size of bilateralTableType. *//* As variables are defined, it may become necessary to free the *//* initial memory and allocate a larger amount. Below are defined *//* values for initail sizes plus a definition for the number of *//* additional entries that should be allocated incase the existing *//* memory is not large enough. Projects may want to try and fine *//* tune the amount of memory initailly allocated by modifying the *//* following defines. */#define IC_INIT_ENTRIES_AA_TBL 50 /* associationVariables */#define IC_INIT_ENTRIES_CMV_TBL 50 /* clientMsgVariables */#define IC_INIT_ENTRIES_CAV_TBL 50 /* clientAccountVariables */#define IC_INIT_ENTRIES_BIL_TBL 50 /* bilateral */#define IC_INIT_ENTRIES_BILCLI_TBL 50 /* bilateralClient */#define IC_INIT_ENTRIES_DOM_TBL 50 /* domainVariables */#define IC_INIT_ENTRIES_CV_TBL 50 /* clientVariables */#define IC_INIT_ENTRIES_LAAV_TBL 10 /* linkAAVariables */#define IC_INIT_ENTRIES_LCMV_TBL 3 /* linkClientMsgVariables */#define IC_INIT_ENTRIES_LCAV_TBL 10 /* linkClientTAVariables */#define IC_ADD_BILATERIAL_TBL_ENTRIES 50 /* increase by this number */#endif /* _ICSDKC_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -