
ControlLogix Platform ♦ "C" Programmable CIP API Functions
Linux Application Development Module Developer's Manual
ProSoft Technology, Inc. Page 149 of 264
March 12, 2014
OCXcip_GetExDeviceObject
Syntax
int OCXcip_GetExDeviceObject(OCXHANDLE apihandle,
BYTE *pPathStr,
OCXCIPEXDEVOBJ *exdevobject,
WORD timeout);
Parameters
handle returned by previous call to OCXcip_Open
path to device being read
pointer to structure receiving the extended device object data
number of milliseconds to wait for the read to complete
Description
OCXcip_GetExDeviceObject retrieves the extended device object from the module
at the address specified in pPathStr.
apihandle must be a valid handle returned from OCXcip_Open.
exdevobject is a pointer to a structure of type OCXCIPEXDEVOBJ. The members of
this structure will be updated with the extended device object data from the
addressed module.
timeout is used to specify the amount of time in milliseconds the application
should wait for a response from the device.
The following example defines the OCXCIPEXDEVOBJ structure:
typedef struct tagOCXCIPEXDEVOBJ
{
BYTE Name[64];
BYTE Description[64];
BYTE GeoLocation[64];
WORD NumPorts;
OCXCIPEXDEVPORTATTR PortList[8];
} OCXCIPEXDEVOBJ;
The following example defines the OCXCIPEXDEVPORTATTR structure:
typedef struct tagOCXCIPEXDEVPORTATTR
{
WORD PortNum;
WORD PortUse;
} OCXCIPEXDEVPORTATTR;
Return Value
ICP object was retrieved successfully
apihandle does not have access
returned if not enough memory is available
Comentarios a estos manuales