This function writes data to the Irinos-System and waits for a response.
Definition
MSC_STATUS
MSC_WriteCommand(
MSC_HANDLE Handle,
unsigned char OpCode,
unsigned long SndBufferSize,
void* SndBuffer,
unsigned long RcvBufferSize,
void* RcvBuffer,
unsigned long* BytesReceived,
unsigned long Timeout
);
Parameter
Handle
Device-Handle, which has been returned by a previous call of the function MSC_OpenDevice.
OpCode
Opcode for the data to be transmitted.
SndBufferSize
Size of the data, which shall be sent.
SndBuffer
Buffer with data, which shall be sent. Minimum size is „SndBufferSize“.
RcvBufferSize
Size of the receive buffer. Enough space must be provided for the response data.
RcvBuffer
Buffer for the response data. Minimum size is „RcvBufferSize“.
BytesReceived
Number of bytes received.
Timeout
Timeout for the data exchange in ms, e.g. 500.
Return value
If successful, MSC_STATUS_SUCCESS will be returned. In case of an error, an error code will be returned.
Comments
This function is used to send a single data packet to the Irinos-System and to receive the related response. The data transfer must be started. The MscDll waits until the data is sent and the response has been received or until a timeout occurs.
See also
Used with the following opcodes: opcRIV, opcRMI, opcWCC, opcRCA, opcWCA, opcWCL, opcRCL, opcACL, opcDT, opcAT, opcIT, opcSP, opcREv, opcSAbsT, opcWEvCfg, opcRSW, opcRST
Can be used instead of MSC_SetupStaticChannel & MSC_ReadStatic for the following opcodes: opcRS, opcRHS, opcBIO