ProSoft Technology MVI56E-LDM User Manual
Page 113

ControlLogix Platform ♦ "C" Programmable
CIP API Functions
Linux Application Development Module
Developer's Manual
ProSoft Technology, Inc.
Page 107 of 264
March 12, 2014
OCXcip_WriteConnectedComplete
Syntax
int OCXcip_WriteConnectedImmediate(OCXHANDLE apihandle,
OCXHANDLE connHandle,
BYTE *DataBuf,
WORD offset,
WORD dataSize );
Parameters
apiHandle
handle returned by previous call to OCXcip_Open
connHandle
handle of open connection
dataBuf
Pointer to data to be written
offset
Offset of byte to begin writing
dataSize
Number of bytes of data to write
Description
This function is used by an application to update data being sent on the open
connection specified by
connHandle
. This function differs from the
OCXcip_WriteConnected
function in that it bypasses the normal image integrity
mechanism and transmits the updated data immediately. This is faster and more
efficient that
OCXcip_WriteConnected
, but does not guarantee image integrity.
apiHandle
must be a valid handle return from
OCXcip_Open
.
connHandle
must be
a handle passed by the
connect_proc
callback function.
offset
is the offset into the connected data buffer to begin writing.
dataBuf
is a
pointer to a buffer containing the data to be written.
dataSize
is the number of
bytes of data to be written.
This function should not be used in conjunction with
OCXcip_WriteConnected
. It is
recommended that this function only be used to update the entire output image
(i.e., no partial updates).
Note: The
OCXcip_WriteConnected
function is the preferred method of updating
output data. However, for applications that need a potentially faster method and
do not need image integrity, this function may be a viable option.
Return Value
OCX_SUCCESS
data was read successfully
OCX_ERR_NOACCESS
apihandle
does not have access
OCX_ERR_BADPARAM
connHandle
or offset/dataSize is invalid
Example
OCXHANDLE apihandle;
OCXHANDLE connHandle;
BYTE buffer[128];