Rockwell Automation Allen-Bradley ControlLogix 1756-MVI Programming Reference Manual page 60

Multi-vendor interface module
Hide thumbs Also See for Allen-Bradley ControlLogix 1756-MVI:
Table of Contents

Advertisement

4-8
CIP Messaging API
Publication 1756-RM004B-EN-P - October 2000
MVIcip_RegisterAssemblyObj
service_proc is a pointer to a callback function which handles service
requests to the registered object. This function will be called by the
backplane device driver when an unscheduled message is received for
the object. See Section 4.3.4 for details.
rxdata_proc is a pointer to a callback function which handles data
received on an open connection. If rxdata_proc is NULL, then the CIP
API buffers the received data and the application must retrieve the data
using the MVIcip_ReadConnected() function. If rxdata_proc is not
NULL, then the rxdata_proc callback routine must copy the received
data to a local buffer.
Return Value:
MVI_SUCCESS
MVI_ERR_NOACCES
MVI_ERR_BADPARAM
MVI_ERR_ALREADY_REGISTEREDobject has already been registered
Example:
MVIHANDLE
apiHandle;
MVIHANDLE
objHandle;
MY_STRUCT
mystruct;
int
rc;
MVICALLBACK MyConnectProc (MVIHANDLE, MVICIPCONNSTRUC *);
MVICALLBACK MyServiceProc(MVIHANDLE, MVICIPSERVSTRUC *);
// Register all instances of the assembly object
rc = MVIcip_RegisterAssemblyObj( apiHandle, &objHandle,
(DWORD)&mystruct, MyConnectProc, MyServiceProc, NULL );
if (rc != MVI_SUCCESS) printf("Unable to register assembly object\n");
See Also:
MVIcip_UnregisterAssemblyObj
connect_proc
service_proc
object was registered successfully
SapiHandle does not have access
connect_proc or service_proc is NULL

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents