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

📄 uddefs.h

📁 工业组态软件modbus驱动源代码, 包括帮助文件.共享.
💻 H
📖 第 1 页 / 共 2 页
字号:
LPPORT  WINAPI UdprotDoProtocol (LPPORT lpPort);
WORD    WINAPI UdprotCvtBinToBCD (WORD BinaryValue);
WORD    WINAPI UdprotCvtBCDToBin (WORD BcdValue);
void    WINAPI UdprotAsciiFromBin (LPSTR, int);

/***********************************************************************
 ***********************************************************************
 * Module UDFREE.C                                                     *
 ***********************************************************************
 ***********************************************************************/

LPUDMSG  WINAPI UdprotFreeMsg (LPUDMSG lpMsg);
BOOL FAR DeleteMessageItem (LPCHAINLINK chain_link);
LPSTAT   WINAPI UdprotFreeTopic (LPSTAT lpTopic);
BOOL FAR DeleteStationItem (LPCHAINLINK chain_link);
LPPORT   WINAPI UdprotFreePort (LPPORT lpPort);
BOOL FAR DeletePortItem (LPCHAINLINK chain_link);
BOOL     WINAPI UdprotFreeSymEnt (LPSTAT lpTopic, SYMPTR lpSymEnt);
BOOL     WINAPI UdprotUnchainSymEnt (LPSTAT lpTopic, SYMPTR lpSymEnt);
void     WINAPI UdprotUnchainMsg (LPSTAT lpTopic, LPUDMSG lpMsg);
LPPORT   WINAPI UdprotUnchainTopic (LPSTAT lpTopic);
LPPORT   WINAPI UdprotUnchainPort (LPPORT lpPort);

/***********************************************************************
 ***********************************************************************
 * Module UDDUMP.C                                                     *
 ***********************************************************************
 ***********************************************************************/

LPUDMSG WINAPI UdprotDumpMessage (LPUDMSG lpMsg);
void    WINAPI UdprotDumpSymbolTable (LPSTAT lpTopic);
LPSTAT  WINAPI UdprotDumpTopic (LPSTAT lpTopic);
LPPORT  WINAPI UdprotDumpPort (LPPORT lpPort);

/***********************************************************************
 ***********************************************************************
 * Module UDDUMPSC.C                                                   *
 ***********************************************************************
 ***********************************************************************/

LPUDMSG WINAPI XUdprotDumpMessage (HDC hDC, LPUDMSG lpMsg);
LPSTAT  WINAPI XUdprotDumpTopic (HDC hDC, LPSTAT lpTopic);
LPPORT  WINAPI XUdprotDumpPort (HDC hDC, LPPORT lpPort);

/***********************************************************************
 ***********************************************************************
 * Module UDSERVER.C                                                   *
 ***********************************************************************
 ***********************************************************************/

void WINAPI ExtractPortName (LPSTNPARAM lpStnParam, LPSTR lpName, int iMax);
void WINAPI SetPortConfigInfo (LPPORT lpPort, LPSTNPARAM lpStnParam);
void WINAPI ClosePort (LPPORT lpPort);
BOOL WINAPI OpenPort (LPPORT lpPort);
int  WINAPI WritePortMsg (LPPORT lpPort, LPUDMSG lpMsg);
int  WINAPI ReadPortMsg (LPPORT lpPort);
BOOL WINAPI PortHasData (LPPORT lpPort);
void WINAPI FlushPort (LPPORT lpPort, LPSTR lpErrMsg);
BOOL WINAPI WaitForQuietPort (LPPORT lpPort, LPSTR lpErrMsg);
void WINAPI checkEvents (LPPORT lpPort);

BOOL WINAPI IsSimulatorEnabled (void);

/***********************************************************************
 ***********************************************************************
 * Module UDBLDMSG.C                                                   *
 ***********************************************************************
 ***********************************************************************/

LPSTR WINAPI put_bin_byte (LPSTR lpMsg, BYTE x);
LPSTR WINAPI put_hex_byte (LPSTR lpMsg, BYTE x);
LPSTR WINAPI put_bin_word (LPSTR lpMsg, WORD x);
LPSTR WINAPI put_hex_word (LPSTR lpMsg, WORD x);
LPSTR WINAPI put_bin_long (LPSTR lpMsg, long x);
LPSTR WINAPI put_hex_long (LPSTR lpMsg, long x);
BOOL  WINAPI IsHexASCII (char ch);
void  WINAPI crc_16 (WORD FAR *ucrc, BYTE FAR *msg, int len);
BYTE  WINAPI ah_to_bin (LPSTR lpStr, BOOL *ok);
long  WINAPI GetHexVal (LPSTR scan_ptr, int len, int *errflg);
BOOL  WINAPI IsHeaderValid (LPSTR lpStr, int len, int *total_len);
BOOL  WINAPI IsCommandValid (LPSTR lpStr, int len);
BOOL  WINAPI GetMsgAsBinary (LPSTR lpStr, int *len);
WORD  WINAPI LimitStringLength (WORD addr1, WORD count, WORD numBytes, int msgRead);

/*************************************************************\
    The contents of this routine are protocol dependent.
    Modify it as required.
\*************************************************************/
BYTE
WINAPI
BldCks(LPSTR       lpBuf,     /* pointer to buffer containing message */
       int         len,       /* length of message */
       int        *errflg);   /* nonzero if invalid characters */

/*************************************************************\
    The last four arguments to this routine are protocol
    dependent.  Modify them as required.
\*************************************************************/
WORD
WINAPI
BldRead(BYTE	plcAddr,	  /* 2/28/2000 Modify by Chen jun local PLC address (PLC的通信地址) */
		LPSTR  *plpMsg,       /* pointer to where the message is stored */
        BYTE    plcDataType,  /* type of data to read(查询数据的PLC) */
       	BYTE    DDEType,      /* type of data to transfer(查询数据的DDE类型) */
        WORD    addr1,        /* address of point(s) to be accessed(查询的起始地址) */
        WORD    numRd);       /* number of items to read(一次查询的寄存器数量) */

/*************************************************************\
    The last four arguments to this routine are protocol
    dependent.  Modify them as required.
\*************************************************************/
WORD
WINAPI
BldWrite(BYTE	   plcAddr,	   /* 2/28/2000 Modify by Chen jun local PLC address */
		 LPSTR    *plpMsg,     /* pointer to where the message is stored */
         BYTE FAR *pData,      /* pointer to data values to be sent */
         BYTE      plcDataType,/* type of device data to generate */
         BYTE      DDEType,    /* type of data to transfer */
         WORD      addr1,      /* address of point(s) to be accessed */
         WORD      numWrt);    /* number of items to write */

/*************************************************************\
    The last four arguments to this routine are protocol
    dependent.  Modify them as required.
\*************************************************************/
VOID
WINAPI
GetBldMsgReadBlockSizes
        (WORD *blockSize,      /* size of block needed to read data */
         WORD *extSize,        /* size needed to extend existing block */
         BYTE msgType,         /* type of message to use */
         BYTE plcDataType,     /* type of device data to access */
         WORD addr1,           /* address of point(s) to be accessed */
         WORD count);          /* number of items to read */

/*************************************************************\
    The last four arguments to this routine are protocol
    dependent.  Modify them as required.
\*************************************************************/
VOID
WINAPI
GetBldMsgWriteBlockSizes
        (WORD *blockSize,      /* size of block needed to write data */
         WORD *extSize,        /* size needed to extend existing block */
         BYTE msgType,         /* type of message to use */
         BYTE plcDataType,     /* type of device data to generate */
         WORD addr1,           /* address of point(s) to be accessed */
         WORD count);          /* number of items to write */

#endif

⌨️ 快捷键说明

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