Cip api initialization functions – ProSoft Technology MVI69-ADM User Manual

Page 270

Advertising
background image

CIP Messaging Library Functions

MVI-ADM ♦ 'C' Programmable

Developer's Guide

'C' Programmable Application Development Module

Page 270 of 342

ProSoft Technology, Inc.

February 20, 2013

10.3 CIP API Initialization Functions

MVIcip_Open

Syntax

int MVIcip_Open(MVIHANDLE *handle);

Parameters

handle

pointer to variable of type MVIHANDLE

Description
MVIcip_Open acquires access to the CIP Messaging 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 CIP API functions can be used.

Return Value

MVI_SUCCESS

API was opened successfully

MVI_ERR_REOPEN

API is already open

MVI_ERR_NODEVICE

backplane driver could not be accessed

Note: MVI_ERR_NODEVICE will be returned if the backplane device driver is not
loaded.

Example

MVIHANDLE handle;
if (MVIcip_Open(&handle)!= MVI_SUCCESS)
{
printf ("Open failed!\n");
}
else
{
printf ("Open succeeded\n");
}

See Also
MVIcip_Close (page 271)

After the API has been opened, MVIcip_Close should always be called before
exiting the application.

Advertising