
ControlLogix Platform ♦ "C" Programmable CIP API Functions
Linux Application Development Module Developer's Manual
ProSoft Technology, Inc. Page 139 of 264
March 12, 2014
OCXcip_GetDeviceIdObject
Syntax
int OCXcip_GetDeviceIdObject (OCXHANDLE apihandle,
BYTE *pPathStr,
OCXCIPIDOBJ *idoObj,
WORD timeout);
Parameters
handle returned by previous call to OCXcip_Open
path to device being read
pointer to structure receiving the Identify Object Data
number of milliseconds to wait for the read to complete
Description
OCXcip_GetDeviceIdObject retrieves the identity object from the device at the
address specified in pPathStr.
apihandle must be a valid handle returned from OCXcip_Open.
idobject is a pointer to a structure of type OCXCIPIDOBJ. The members of this
structure will be updated with the module identity data.
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 OCXCIPIDOBJ structure:
typedef struct tagOCXCIPIDOBJ
{
WORD VendorID; //Vendor ID Number
WORD DeviceType; //General product type
WORD ProductCode: //Vendor-specific product identifier
BYTE MajorRevision; //Major revision level
BYTE MinorRevision; //Minor revision level
DWORD SerialNo; //Module serial number
BYTE Name [32]; //Text module name (null-terminated)
} OCXCIPIDOBJ;
Return Value
ID object was retrieved successfully
apihandle does not have access
returned if not enough memory is available
returned if path was incorrect
Example
OCXCIPHANDLE apihandle;
Comentarios a estos manuales