ProSoft Technology MVI56E-LDM User Manual
Page 177

ControlLogix Platform ♦ "C" Programmable
CIP API Functions
Linux Application Development Module
Developer's Manual
ProSoft Technology, Inc.
Page 171 of 264
March 12, 2014
OCXcip_GetActiveNodeTable
Syntax
int OCXcip_GetActiveNodeTable (OCXHANDLE apihandle,
int * rackSize,
DWORD ant);
Parameters
apihandle
handle returned by previous call to OCXcip_Open
rackSize
Pointer to integer into which is written the number of slots in the
local rack
ant
Pointer to DWORD into which is written a bit array corresponding
to the slot occupancy of the local rack (bit 0 corresponds to Slot
0)
Description
OCXcip_GetActiveNodeTable
returns information about the size and occupancy of
the local rack.
apihandle
must be a valid handle returned from
OCXcip_Open
.
rackSize
is a pointer to an integer containing the number of slots of the local
rack.
ant
is a pointer to a DWORD containing a bit array. This bit array reflects the slot
occupancy of the local rack, where bit 0 corresponds to Slot 0. If a bit is set (1),
there is an active module installed in the corresponding slot. If the bit is set to 0,
the slot is (functionally) empty.
Return Value
OCX_SUCCESS
Active node table was returned successfully
OCX_ERR_NOACCESS
apihandle
does not have access
Example
OCXCIPHANDLE apihandle;
int racksize;
DWORD rackant;
int i;
OCXcip_GetActiveNodeTable (apiHandle, &racksize, &rackant);
for (i=0; i
if (rackant & (1< printf("\Slot %d is occupied", i);
else
printf("\Slot %d us empty", i);
}