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
19
ComGetWriteState
comInt
ComGetWriteState
(int com_handle)
This function is used to query the current status of the send routine and then to reset it.
Parameter
com_handle
interface handle from
ComOpen
Return value
COM_ST_FREE
Send routine is not busy
COM_ST_BUSY
A frame is currently being sent
COM_ST_SUCCESS A frame was sent successfully
< 0
Error status
Notes
● If the current status is "COM_ST_BUSY", the status is not reset.
● The error status can include several errors at the same time. Each bit in the error number
corresponds to an error. The "COM_ST_ERROR" is set in any case. Section "Error and
status messages (Page 23)" contains a precise description of the individual errors.
ComClose
comInt
ComClose
(int com_handle)
This function closes an interface and releases all the resources associated with it.
Parameter
com_handle
interface handle from
ComOpen
Return value
0
Function successfully completed
≠ 0
possible error message:
•
COM_NOT_OPEN
Notes
Following this call, no data transfer routines of this driver can be used until the next the
"ComOpen".