Publication 1756-RM004B-EN-P - October 2000
4-28 CIP Messaging API
Miscellaneous Functions
MVIcip_GetIdObject
Syntax:
int MVIcip_GetIdObject(MVIHANDLE apiHandle, MVICIPIDOBJ
*idobject);
Parameters:
apiHandle handle returned from MVIcip_Open call
Description:
MVIcip_GetIdObject retrieves the identity object for the module.
apiHandle
must be a valid handle returned from MVIcip_Open.
idobject
is a pointer to a structure of type MVICIPIDOBJ. The members
of this structure will be updated with the module identity data.
The MVICIPIDOBJ structure is defined below:
typedef struct tagMVICIPIDOBJ
{
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)
} MVICIPIDOBJ;
Return Value:
MVI_SUCCESS ID object was retrieved successfully
MVI_ERR_NOACCESS
apiHandle
does not have access
Example:
MVIHANDLE apiHandle;
MVICIPIDOBJ idobject;
MVIcip_GetIdObject(apiHandle, &idobject);
printf(“Module Name: %s Serial Number: %lu\n”, idobject.Name,
idobject.SerialNo);