Connected data transfer – ProSoft Technology MVI56E-LDM User Manual
Page 105

ControlLogix Platform ♦ "C" Programmable
CIP API Functions
Linux Application Development Module
Developer's Manual
ProSoft Technology, Inc.
Page 99 of 264
March 12, 2014
5.5
Connected Data Transfer
OCXcip_WriteConnected
Syntax
int OCXcip_WriteConnected(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
.
apiHandle
must be a valid handle returned 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.
Return Value
OCX_SUCCESS
data was updated 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];
// Write 128 bytes to the connected data buffer
OCXcip_WriteConnected(apihandle, connHandle, buffer, 0, 128 );
See Also
OCXcip_ReadConnected