Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Function
int16 dm_SendRecv(uint16 uiPortNo, uchar08 *ucpSendBuf, uchar08 ucBytesCount, uchar08 *ucpRecvBuf, uint16 uiBufSize, char08 *cpErrMsg);
Description

Send & receive or take acknowledge for a block of bytes between Master and Device.

Input Parameters

  • uchar08 uiPortNo – (virtual) comport number in order to communicate with Master
  • char08 *ucpSendBuf – pointer to a data buffer to send
  • uchar08 ucBytesCount – bytes number to send from ucpSendBuf
  • uint16 uiBufSize – size of receive data buffer ucpRecvBuf

Output parameters

  • char08 *ucpRecvBuf – pointer to a data buffer to return received data
  • char08 *cpErrMsg – pointer to buffer to return error message (minimum 256 bytes)

Return value

Number of received bytes if success or negative error number.

Example

char08 cpErrMsg[256];

uchar08 ucpBuf[] = { 0x12, 0x34 }, ucAck;

int16 iRes = dm_SendRecv(iPortNo, ucpBuf, 2, &ucAck, 1, cpErrMsg);

  • No labels