beautypg.com

ProSoft Technology MVI69E-LDM User Manual

Page 86

background image

Contents

MVI69E-LDM ♦ "C" Programmable

Developer's Manual

Linux Application Development Module

Page 86 of 130

ProSoft Technology, Inc.

August 21, 2014

MVI69_SetModuleInfo

Syntax

int MVI69_SetModuleInfo (MVI69HANDLE handle,
MVI69MODULEINFO *modinfo);

Parameters

handle

not used - set to 0

modinfo

pointer to structure of type MVI69MODULEINFO

Description
MVI69_SetModuleInfo allows an application to set the identity information for the module.
This function must be called before MVI69_Open. The module information is provided in the
structure modinfo. handle must be a valid handle returned from MVI69_Open.

The MVI69MODULEINFO structure is defined as follows:

typedef struct tagMVIBPMODULEINFO
{
WORD VendorID; /* Reserved */
WORD DeviceType; /* Reserved */
WORD ProductCode; /* Device model code */
BYTE MajorRevision; /* Device major revision */
BYTE MinorRevision; /* Device minor revision */
DWORD SerialNo; /* Serial number */
BYTE Name[32]; /* Device name (string) */
} MVI69MODULEINFO

The module serial number is set during manufacturing and cannot be edited.

Return Value

MVI69_SUCCESS

the module information was read successfully

MVI69_ERR_NOACCESS

handle does not have access

Example

MVI69HANDLE handle;
MVIBPMODULEINFO modinfo;

/* Setup a customized module identity */
char new_name[] = "Widget 6900";
strcpy (modinfo.Name, new_name);
modinfo.VendorID = 774;
modinfo.DeviceType = 30;
modinfo.ProductCode = 42;
modinfo.MajorRevision = 2;
modinfo.MinorRevision = 1;
MVI69_SetModuleInfo (0, &modinfo);
/* Now open the API (and initialize backplane comms with new ID) */
MVI69_Open (&Handle);

See Also
MVI69_GetModuleInfo