亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? udprot.h

?? 工業組態軟件modbus驅動源代碼, 包括幫助文件.共享.
?? H
字號:
/* $Header: "%n Ver=%v  %f  LastEdit=%w  Locker=%l" */
/* "UDPROT.H Ver=1  5-Nov-97,14:00:00  LastEdit=JIMV  Locker=***_NOBODY_***" */
/***********************************************************************\
*                                                                       *
*       Copyright Wonderware Software Development Corp. 1989-1997       *
*                                                                       *
*               ThisFileName="L:\ww\dde_serv\src\udsample\udprot.h"     *
*               LastEditDate="1997 Nov 05  14:00:00"                    *
*                                                                       *
\***********************************************************************/

#ifndef H__udprot 
#define H__udprot

#ifndef LINT_ARGS
#define LINT_ARGS
#endif

#include "protypes.h"
#include "wwheap.h"
#include "ntconv.h"
#include "Utitech.h"
#include "chainmgr.h"

#define DEBUG_CALL_TRAFFIC

extern  HHEAP   hHeap;

extern BOOL  ShowingSend;       /* display commands to PLC in logger */
extern BOOL  ShowingReceive;    /* display replies from PLC in logger */
extern BOOL  ShowingErrors;     /* display error messages in logger */
extern BOOL  ShowingEvents;     /* display events in logger */
extern BOOL  IndefWriteRetry;   /* retry write messages even after loss of connection */
extern BOOL  Verbose;           /* display program trace messages */
extern BOOL  DebugMenu;         /* enable debug menu on server window */
extern BOOL  WriteConfigInASCII; /* write configuration file as structures */
extern BOOL  bDoHelp;

#define DBG_BUF_SIZE 512        /* size of local buffer for trace, debug info */
extern char dbgBuf[];           /* local buffer for trace, debug info */

/** When the comm port is opened, we must specify
    the sizes of the transmit and receive buffers. **/

#define INQSIZE                 1024
#define OUTQSIZE                1024

/** definitions for communications recovery **/

#define PROT_RETRIES            3

#define TOPIC_RECOVERY_RETRIES          1
#define TOPIC_NORMAL_RETRIES            2
#define TOPIC_CONSEC_FAILURE_LIMIT      2
#define ERRORDELAY                      1000    /* One second    */
#define SLOW_POLL_MULTIPLIER            15
#define SLOW_POLL_MIN                   15000   /* 15 second min on slow poll */
#define SLOW_POLL_MAX                   300000  /*  5 minute max on slow poll */


/*  Protocol States
    Processing of the protocol based on timer tick messages causes the
    driver to be organized as a state machine.  These are the states:
*/

#define PROT_IDLE               300
#define PROT_WAITRESP           301
#define PROT_PROTERRORDELAY     302
#define PROT_WAITQUIET          303
#define PROT_WAITHDR            304

/**************************************************************\
    Assign the correct values for these constants
\**************************************************************/

#define UD_BLOCK_DATA_START     3

#define UD_MAX_WRITE_LENGTH   100    /* max number of bytes in outgoing data */
#define UD_MAX_READ_LENGTH    100    /* max number of bytes in incoming data */

/*  Default values for <Your Name> Server Operational Parameters */

#define MIN_DDEBLOCKSIZE        512
#define MAX_DDEBLOCKSIZE        64512

#define DEFAULT_PROTTIMER       50
#define DEFAULT_RQTIMER         1000
#define DEFAULT_DDEBLOCKSIZE    4096
#define DEFAULT_RETRYINDEF      FALSE
#define DEFAULT_PATH            ""

#define NAME_PROTTIMER          GetString(STRUSER+1) /* "ProtocolTimer" */
#define NAME_VDTIMEOUT          GetString(STRUSER+2) /* "ValidDataTimeout" */
#define NAME_RQTIMER            GetString(STRUSER+4) /* "RequestTimer" */
#define NAME_DDEBLOCKSIZE       GetString(STRUSER+6) /* "DDEBlockSize" */
#define NAME_RETRYINDEF         GetString(STRUSER+8) /* "WriteRetryIndefinitely" */

#define NAME_PATH               GetString(STRUSER+7) /* "ConfigurationFile" */

/***********************************************************************\
*                       Message Data Structure                          *
\***********************************************************************/

typedef struct tagUDMSG {
    CHAINLINK   mmChainLink;
    struct tagSTAT  FAR* mmTopic;
    IDLDEV      mmIdLogDev;
    WORD        mmStartAddr;
    WORD        mmEndAddr;
    WORD        mmCount;
    unsigned long mmFirstSym;
    unsigned long mmLastSym;
    BYTE        mmMsgType;
    BYTE        mmDataType;
    int         mmSize;
    long        mmScanTimer;
    long        mmScanReload;
    int         mmActiveCt;
    BYTE        mmMbType;
    BYTE        mmTopicId;
    unsigned    mmDue         : 1;
    unsigned    mmRead        : 1;
    unsigned    mmDiscrete    : 1;
    unsigned    mmChanged     : 1;
    unsigned    mmMsgInBinary : 1;
    BYTE        mmOutData[UD_MAX_WRITE_LENGTH];
    BYTE        mmData[1];
} UDMSG, FAR *LPUDMSG;



/***********************************************************************\
*                       Symbol Table Data Structure                     *
\***********************************************************************/


/*  The symbol table organization is thus:
    Each node (or station or topic) has a single data structure allocated
    from the FAR heap (using GlobalAlloc()).  It is of type SYMTAB with
    the number of entries in the msSym field adjusted dynamically to
    handle the symbol table size.

    Each entry in the msSym array is of type SYMENT.  These array entries
    are linked in order of ascending msAlias using the chain manager
    structure CHAINLINK.  Since the symbol table may grow or shrink by being
    reallocated, its location in memory may change.  Consequently, the
    chains of used symbols and of unused symbols are handled using offsets
    and a base address, which is updated whenever the table is reallocated.

    The hProt is a handle used in communicating with the outside world.
    It identifies a symbol table entry (relative to a node) by being
    INDEX+SYM_OFFSET in the msSym array.  It could have been the index,
    but hProt must use zero to represent an invalid handle, and for
    simplicity reserved points such as STATUS are assigned handles below
    SYM_OFFSET.
*/

#define HPROT_STATUS  1     /* DB handle for reserved STATUS word */
#define SYM_OFFSET    2     /* handle offset for all other points */

/*  A simple symbol table is maintained to permit mapping the protocol-
    specific data format into the I/O handler's notation.  This constant
    controls the symbol granularity.
*/
#define SYMTABQUANTUM           64
#define SYMTABMAXCOUNT       65536L

/******************************************************************\
    The SYMENT structure must be a power of two bytes in length.
    The define below must be the power of two size of the SYMENT
    structure.  Adjust the pad[] field of the structure so that
    the size of the structure is equal to SIZE_SYMENT.
\******************************************************************/
#define SIZE_SYMENT 32

typedef struct tagSYMENT {
    CHAINLINK   msChainLink;                 /* link with list of symbols */
    unsigned long msIndex;                   /* index within symbol array */
    HDB         msDbHnd;                     /* handle from toolkit */
    int         msLockCt;
    unsigned    msNumBytes      : 6;
    unsigned    msActive        : 1;
    unsigned    msBCD           : 1;
    unsigned    msDdeType       : 3;
    unsigned    msMbType        : 3;
    unsigned    msSigned        : 1;
    unsigned    msBadBCDRead    : 1;
    WORD        msBitPos;
    WORD        msCount;
    struct tagUDMSG FAR* msPollMsg;
    /******************************************************************\
        The following fields must uniquely define the item names that
        are supported by the driver.  Add msAddr? fields if more are
        required for your driver.  Make sure that LogicalAddressCompare
        is modified to properly sort these fields in the symbol table.
    \******************************************************************/
    BYTE        msPlcDataType;
    BYTE        msSubType;
    WORD        msAddr1;
    /******************************************************************\
        Add more msAddr? fields as required and change
        LogicalAddressCompare.
    WORD        msAddr2;
    WORD        msAddr3;
    \******************************************************************/
    /******************************************************************\
        The SYMENT structure must be a power of two bytes in length.
        Modify the pad[] field to insure that this requirement is met.
    \******************************************************************/
//  BYTE        pad[16];
} SYMENT, huge * SYMPTR;

/** The ACTIVE_CHECK structure is used for finding a symbol that is
    active and is referenced by a particular message **/

typedef struct tagACTIVE_CHECK
        {
         LPUDMSG       lpMsg;         /* pointer to message */
         unsigned long finalHandle;   /* final handle to check */
         unsigned long SymHandle;     /* symbol handle if match found */
        } ACTIVE_CHECK;

    /**************************************************************\
      Device specific names and identifiers go here

      The following example shows point types for an
      example server which has two memory ranges:
        V memory -- variables, 16 bit cells, address range 1-512
        C memory -- counters,  16 bit cells, address range 1-512
    \**************************************************************/

/* device point types */
#define PLC_V   1       /* variable memory */
#define PLC_C   2       /* counter memory  */

    /**************************************************************\
      Server-defined subtypes go here

      These can be defined to suit the addressing and data methods
      you wish to implement:  integers, reals, strings, etc.
    \**************************************************************/

/* sub-types */
#define PLCS_NONE    0  /* no subtype */
#define PLCS_BIN     1  /* binary */
#define PLCS_BCD     2  /* BCD word */
#define PLCS_WORD    3  /* unsigned word */
#define PLCS_SIGNED  4  /* signed word */
#define PLCS_DWORD   5  /* double word (unsigned) */
#define PLCS_BITP    6  /* bit position within a word */
#define PLCS_REAL    7  /* real, IEEE format */
#define PLCS_DOT     8  /* real, IEEE format */
#define PLCS_IBM     9  /* real, IBM format */
#define PLCS_STRC   10  /* null-terminated (C-style) string */
#define PLCS_STRP   11  /* length-byte-first (PASCAL-style) string */
#define PLCS_STRB   12  /* blank-padded (B-style) string */
#define PLCS_STR_   13  /* blank-padded (B-style) string */

/***********************************************************************\
*                       Station Data Structure                          *
\***********************************************************************/

/*  Each node (or station or topic) is represented by a data structure
    allocated from the FAR heap (using GlobalAlloc()).  It contains all
    of the information needed to identify a node and to perform the
    protocol.

    The station data structure (STAT) is located from the Port data
    structure or directly by the handle which is passed as a parameter to
    many of the functions called from the outside world.

    The station contains handles to the associated symbol table and a
    list of messages to be sent to the node.
*/

#define MAX_CONSEC_WRITES       2

typedef struct tagSTAT {
    CHAINLINK           statChainLink;       /* link with station list */
    DWORD               statUpdatePeriod;
    struct tagPORT FAR* statPort;
    CHAIN               statReadMsgList;
    CHAIN               statWriteMsgList;
    struct tagUDMSG FAR* statCurMsg;
    struct tagUDMSG FAR* statCurReadMsg;
    EXTARRAY            statSymTab;          /* symbol table (extensible) */
    EXTARRAY            statSymInd;          /* indexes of used symbols */
    CHAIN               statSymUsed;         /* list of used symbol entries */
    CHAIN               statSymUnused;       /* list of unused symbol entries */
    HDB                 statHdbStatus;
    WORD                statCoilReadSize;
    WORD                statRegReadSize;
    DWORD               statReplyTimeout;
    LONG                statDelay;
    int                 statRetries;
    int                 statPortRetries;
    IDLDEV              statIdLogDev;
    unsigned            statFailed      :1;
    unsigned            statStatusActive:1;
    unsigned            statStatusDue   :1;
    unsigned            statConsecWrites:3;
    BYTE                statTopic;
    char                statTopicName[33];
} STAT, FAR *LPSTAT;


/***********************************************************************\
*                       Port Data Structure                             *
\***********************************************************************/

/*  Each port is represented by a data structure (of the type PORT) which
    contains all of the information needed to control the port in processing
    the protocol.  It contains a handle to a linked list of nodes.  It
    also contains the handles of the currently-active node and message.
*/

#define MAX_PORT_NAME_LEN 33

typedef struct tagPORT {
    CHAINLINK           mbChainLink;    /* forward/backward list pointers */
    char                mbPortName[MAX_PORT_NAME_LEN];
    char                mbConfigString[20];   /* configuration string */
    CHAIN               mbTopicList;    /* list of topics on this port */
    struct tagSTAT FAR* mbCurTopic;     /* topic currently being serviced */
    struct tagUDMSG FAR* mbCurMsg;      /* message currently being serviced */
    int                 mbState;        /* communication state */
    int                 mbRetries;      /* number of retries */
    int                 mbTimer;        /* timer for when to check port */
    int                 mbRspIndex;     /* number of characters received */
    int                 mbRspExpLen;    /* expected length of response */
    int                 mbReplyTime;    /* reply timeout limit (in msec) */
    BOOL                mbMsgInBinary;  /* =TRUE if message is in binary form */
    BOOL                mbDoingRead;    /* =TRUE if doing a read (polling) */
    int                 mbCid;          /* COM port ID for serial port */
    WORD                mbMemSegment;   /* MEM segment address for board */
    WORD                mbIoAddr;       /* I/O address for board */
    void FAR *          mblpBoardMem;   /* pointer to board memory buffer */
    HANDLE              mbhPermission;  /* handle for access to board memory */
    BYTE                mbRspBuffer[ RSP_BUF_SIZE ]; /* response buffer */
} PORT, FAR * LPPORT;


#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲欧美日韩俺去了| 粗大黑人巨茎大战欧美成人| 国产一区二区三区电影在线观看| 97久久精品人人爽人人爽蜜臀| 3751色影院一区二区三区| 国产精品免费久久| 黑人精品欧美一区二区蜜桃| 欧美午夜影院一区| 国产精品久久久久久久浪潮网站| 美国欧美日韩国产在线播放| 欧美性猛片xxxx免费看久爱| 国产三级一区二区三区| 美女视频免费一区| 欧美精品在线观看播放| 一区二区三区视频在线观看| 成人免费视频app| 久久综合久久综合久久| 日本人妖一区二区| 欧美另类变人与禽xxxxx| 亚洲卡通欧美制服中文| av资源站一区| 国产精品美女一区二区| 东方aⅴ免费观看久久av| 亚洲精品一区二区三区99| 日韩精品国产欧美| 69成人精品免费视频| 午夜精品免费在线| 欧美三级在线播放| 午夜欧美一区二区三区在线播放| 91蜜桃网址入口| 亚洲精品大片www| 一本色道亚洲精品aⅴ| |精品福利一区二区三区| 9l国产精品久久久久麻豆| 中文字幕免费在线观看视频一区| 国产成人综合在线| 国产精品三级久久久久三级| 高清国产一区二区| 亚洲欧美在线视频观看| 在线一区二区三区| 肉丝袜脚交视频一区二区| 6080国产精品一区二区| 精品一区二区免费视频| 久久久综合视频| eeuss影院一区二区三区| 136国产福利精品导航| 欧美丝袜自拍制服另类| 三级欧美在线一区| 久久久精品欧美丰满| av电影一区二区| 亚洲一区在线视频| 日韩欧美国产一区二区在线播放 | 欧美久久久久免费| 五月天精品一区二区三区| 欧美一级二级在线观看| 国产精品77777| 亚洲激情av在线| 日韩一二在线观看| 国产成人午夜片在线观看高清观看| 中文字幕不卡的av| 欧美日韩精品一区二区天天拍小说| 麻豆一区二区三| 国产精品久久久久影院亚瑟| 欧美日韩国产一级二级| 国产麻豆视频一区二区| 伊人婷婷欧美激情| 久久综合九色综合欧美亚洲| 一本色道**综合亚洲精品蜜桃冫 | 欧美一区二区三区四区五区| 国产精品综合一区二区| 一卡二卡三卡日韩欧美| 日韩欧美二区三区| 91无套直看片红桃| 极品少妇一区二区三区精品视频| 中文字幕日本乱码精品影院| 91精品国产免费久久综合| 风间由美中文字幕在线看视频国产欧美 | 日本一区二区免费在线观看视频| 99国产精品久| 国内精品国产成人国产三级粉色 | 欧美国产欧美综合| 欧美一区二区三区思思人| 丰满少妇在线播放bd日韩电影| 亚洲成人动漫精品| |精品福利一区二区三区| 精品国产一区二区三区av性色| 99精品一区二区三区| 黑人巨大精品欧美黑白配亚洲| 亚洲成人av一区| 国产精品久久久爽爽爽麻豆色哟哟 | 久久久久国产精品麻豆ai换脸 | 亚洲丝袜制服诱惑| 精品国产伦一区二区三区观看方式| 一本色道久久综合亚洲精品按摩| 国产精品夜夜爽| 久久不见久久见免费视频1| 亚洲图片欧美色图| 亚洲六月丁香色婷婷综合久久 | 欧洲日韩一区二区三区| 不卡一区二区中文字幕| 国产成人丝袜美腿| 狠狠色狠狠色综合系列| 麻豆一区二区99久久久久| 午夜精品123| 午夜视频久久久久久| 一区二区三区在线免费视频| 亚洲欧美日韩国产综合| 国产精品剧情在线亚洲| 国产精品午夜春色av| 国产网红主播福利一区二区| 国产亚洲欧美日韩在线一区| 久久久精品影视| 久久九九国产精品| 国产精品嫩草影院av蜜臀| 国产精品视频麻豆| 中文字幕欧美一| 亚洲欧美激情一区二区| 亚洲综合激情小说| 亚洲成人午夜影院| 欧美aa在线视频| 久久精品久久精品| 国产一二三精品| 波多野结衣中文字幕一区 | 成人黄色av网站在线| 波多野结衣91| 日本精品视频一区二区三区| 欧美综合亚洲图片综合区| 欧美精品亚洲二区| 日韩一区二区电影在线| 久久亚洲一区二区三区明星换脸| 国产视频一区二区在线| 亚洲欧洲国产日韩| 亚洲午夜激情av| 另类小说欧美激情| 国产福利91精品| 91官网在线观看| 欧美一级xxx| 欧美国产精品劲爆| 亚洲综合免费观看高清完整版在线 | 成人av在线网站| 欧美影片第一页| 欧美电影免费观看高清完整版在线 | 日韩av一二三| 国产一区在线观看视频| 99精品视频中文字幕| 欧美精品第1页| 中文字幕精品一区二区三区精品 | 色婷婷综合视频在线观看| 欧美三级视频在线| 久久青草国产手机看片福利盒子 | 国产精品无人区| 日本视频一区二区| 成人综合婷婷国产精品久久蜜臀| 欧美亚洲一区二区三区四区| 精品精品欲导航| 一区二区三区中文字幕电影 | 久久电影网站中文字幕| 不卡视频免费播放| 欧美一区二区免费视频| 自拍偷拍亚洲激情| 国内国产精品久久| 欧美精品久久一区二区三区| 国产日产精品一区| 石原莉奈在线亚洲三区| 粉嫩av一区二区三区在线播放| 在线播放欧美女士性生活| 国产精品国产三级国产aⅴ中文| 蜜乳av一区二区| 91激情五月电影| 国产精品无人区| 国产在线精品免费| 91精品国产一区二区三区香蕉| 亚洲免费观看高清完整版在线| 国产在线不卡视频| 欧美一区二区在线不卡| 一区二区三区四区在线播放| 国产成人精品在线看| 精品国产免费久久| 奇米精品一区二区三区在线观看| 欧美中文字幕一区二区三区| 18欧美亚洲精品| 不卡电影免费在线播放一区| 久久夜色精品一区| 精品一区二区三区在线播放 | 九九**精品视频免费播放| 欧美久久高跟鞋激| 天天综合日日夜夜精品| 欧美亚洲日本国产| 一片黄亚洲嫩模| 欧美亚洲国产一区二区三区 | 韩国女主播一区二区三区| 538在线一区二区精品国产| 亚洲成国产人片在线观看| 欧美一a一片一级一片| 亚洲欧美日韩久久精品| 91首页免费视频| 亚洲伊人伊色伊影伊综合网| 欧美亚洲国产一区二区三区va | 亚洲一区欧美一区| 在线免费观看日韩欧美|