Applies To:
  • CitectSCADA 5.xx

Summary:
In the past when an error occurred in the TCP/IP driver, only the error code is returned to the protocol driver, user, especially driver developer need to map the error manually and it is not helpful to spot a problem quickly. 

Solution:
A new COMGetParam() member "ERR_DETAIL_MSG" has been added to allow the protocol driver to get detailed error message from TCP/IP driver instead of error code only.

sample code.

#include "ct_drv.h"
...
ERRORMSG *pErrMsg = (ERRORMSG *)pBuf;
pErrMsg->nErrorCode = errcode; // the error code returned by COMGets, COMPuts or COMStats)
pErrMsg->nBufLength = buflength; // supplied buffer length to which pBuf points.
COMGetParam(cp->Config.ChannelNumber, "ERR_DETAIL_MSG", pBuf); // a "c" string error msg will be returned in pBuf.
...

 

Keywords:
 

Attachments