2cdaqmx::receivebuffer, Cdaqmx::receivepacket – Yokogawa PC-Based MX100 User Manual
Page 80
![background image](/manuals/360310/80/background.png)
2-57
IM MX190-01E
MX100 -Visual C++
2
CDAQMX::receiveBuffer
Syntax
int receiveBuffer(unsigned char * pBuf, int lenBuf, int *
realLen, int * sizeBuf = NULL)
Parameters
pBuf
Specify the field where the data is to be stored using a byte array.
lenBuf
Specify the number of bytes of the data field.
realLen
Specify the destination where the byte size of the actual data
received is returned.
sizeBuf
Specify the destination where the size information is to be returned.
Description
Receives the data including the size information. Receives and stores the amount
of data specified by the size information or the specified number of bytes in the field
specified by the parameter. Returns the number of bytes and size information of the
actual data received if the return destination is specified.
Return value
Returns an error number.
Error:
Not acknowledgeThe size of the response packet is wrong.
Reference
receiveRemain receive
CDAQMX::receivePacket
Syntax
virtual int receivePacket(unsigned char * ackBuf, int lenAck,
int * realLen);
Parameters
ackBuf
Specify the field where the response packet is to be stored using a
byte array.
lenAck
Specify the byte size of the response packet.
realLen
Specify the destination where the byte size that is actually
received is returned.
Description
Receives the specified packet and decodes it.
If the received packet is an error packet, the MX100-specific error is stored in the
MX100-specific error field.
Return value
Returns an error number.
Error:
Commands are not processed successfully
Received an error packet.
Reference
receiveBuffer
2.5 Details of the MX100 Class