Cip api initialization functions – ProSoft Technology MVI69E-LDM User Manual
Page 68
Contents
MVI69E-LDM ♦ "C" Programmable
Developer's Manual
Linux Application Development Module
Page 68 of 130
ProSoft Technology, Inc.
August 21, 2014
5.1
CIP API Initialization Functions
MVI69_Open
Syntax
int MVI69_Open(MVI69HANDLE *handle);
Parameters
handle
pointer to variable of type MVI69HANDLE
Description
MVI69_Open
acquires access to the API and sets handle to a unique ID that the application
uses in subsequent functions. This function must be called before any of the other API
functions can be used (with the exception of
MVI69_SetModuleInfo
).
The function provides full access to the backplane and all of the API functions. Only one
program is allowed to call this function.
IMPORTANT: Once the API has been opened,
MVI69_Close
should always be called before exiting the
application.
Return Value
MVI69_SUCCESS
API was opened successfully
MVI69_ERR_REOPEN
API is already open
MVI69_ERR_NODEVICE
backplane driver could not be accessed
Note:
MVI69_ERR_NODEVICE
will be returned if the backplane device driver is not loaded.
Example
MVI69HANDLE Handle;
if (MVI69_Open(&Handle)!= MVI69_SUCCESS)
{
printf ("Open failed!\n");
}
else
{
printf ("Open succeeded\n");
}
See Also
MVI69_Close
MVI69_OpenNB