ProSoft Technology MVI69-ADM User Manual

Page 227

Advertising
background image

MVI-ADM ♦ 'C' Programmable

Backplane API Functions

'C' Programmable Application Development Module

Developer's Guide

ProSoft Technology, Inc.

Page 227 of 342

February 20, 2013

MVIbp_GetProcessorStatus

Syntax

int MVIbp_GetProcessorStatus(MVIHANDLE handle, WORD *pstatus);

Parameters

handle

Handle returned by previous call to MVIbp_Open

pstatus

Pointer to a word that will be updated with the current processor
status.

Description
This function queries the state of the processor.

handle must be a valid handle returned from MVIbp_Open.

pstatus is a pointer to an word. When this function returns, certain bits in this
word will be set to indicate the current processor status, as shown in the
following table.

Processor Status Bits

Bit

Name

Description

0

MVI_PROCESSOR_STATUS_RUN

Set if processor is in Run Mode

1

MVI_DATA_CONNECTION_OPEN

Set if data connection is open (MVI56 only)

2

MVI_STATUS_CONNECTION_OPEN

Set if status connection is open (MVI56 only)

MVI56 Note
The data connection must be established in order to receive the processor
status. Therefore, if the data connection is not established, this function will
return MVI_ERR_BADCONFIG and pstatus will be zero.

MVI94 Note
This function is not supported on the MVI94 and will always return
MVI_ERR_NOTSUPPORTED.

Return Value

MVI_SUCCESS

No errors were encountered

MVI_ERR_NOACCESS

handle does not have access

MVI_ERR_BADCONFIG

The data connection is not open (MVI56 only)

Example

MVIHANDLE handle;
WORD status;
MVIbp_GetProcessorStatus(handle, &status);
if (status & MVI_PROCESSOR_STATUS_RUN)
// Processor is in Run Mode
else
// Processor is not in Run Mode or there is no connection

Advertising