Programming interface
4.1 Functions of the serial interface
SIMATIC 3964R protocol for Windows 9x/XP/7
Installation Manual, 01/2013, J31069-D0131-U001-A2-7218
15
ComWrite
comInt
ComWrite
(int com_handle,
void *write_data,
int write_number,
long options)
This function is used to send an asynchronous send job.
Parameter
com_handle
interface handle from
ComOpen
write_data
Pointer to the send buffer of the caller
write_number
Length of the send buffer
options
Not used
Return value
≥ 0
Number of bytes written (≙ frame length)
< 0
possible error message:
•
COM_HANDLE_FALSE
•
COM_2SMALL
•
COM_WRITE_ERROR
Notes
This call places the send job in a send buffer. The actual data communication is
asynchronous. As result, the return following the call for this routine simply means that the
send job was correctly included in the send queue.
ComEnableEvent
comInt
ComEnableEvent
(int com_handle,
int com_event,
int user_id,
init msg)
This function enables events (for checking the asynchronous transfer).