Cip miscellaneous functions – ProSoft Technology MVI69-ADM User Manual
Page 292

CIP Messaging Library Functions
MVI-ADM ♦ 'C' Programmable
Developer's Guide
'C' Programmable Application Development Module
Page 292 of 342
ProSoft Technology, Inc.
February 20, 2013
10.8 CIP Miscellaneous Functions
MVIcip_GetIdObject
Syntax
int MVIcip_GetIdObject(MVIHANDLE handle, MVICIPIDOBJ *idobject);
Parameters
handle
handle returned from MVIcip_Open call
Description
MVIcip_GetIdObject retrieves the identity object for the module.
handle 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 handle does not have access
Example
MVIHANDLE handle;
MVICIPIDOBJ idobject;
MVIcip_GetIdObject(handle, &idobject);
printf("Module Name: %s Serial Number: %lu\n", idobject.Name,
idobject.SerialNo);