ProSoft Technology MVI69-ADM User Manual

Page 63

Advertising
background image

MVI-ADM ♦ 'C' Programmable

Understanding the MVI-ADM API

'C' Programmable Application Development Module

Developer's Guide

ProSoft Technology, Inc.

Page 63 of 342

February 20, 2013

typedef struct
{
WORD CmdList; /* Total number of command list requests */
WORD CmdListResponses; /* Total number of command list responses
*/
WORD CmdListErrors; /* Total number of command list errors */
WORD Requests; /* Total number of requests of slave */
WORD Responses; /* Total number of responses */
WORD ErrSent; /* Total number of errors sent */
WORD ErrRec; /* Total number of errors received */

}ADM_PORT_ERRORS;

The following are the prototypes for the referenced functions:

extern int (*startup_ptr)(void); /* pointer to function for startup code
*/
extern int (*shutdown_ptr)(void); /* pointer to function for shutdown
code */
extern int (*user_menu_ptr)(void); /* pointer to function for additional
menu code */
extern void (*version_ptr)(void); /* pointer to function for version
information */
extern void (*process_cfg_ptr)(void); /* pointer to function for checking
configuration */
extern int (*ctrl_data_block_ptr)(unsigned short); /* pointer to function
for checking configuration */

The following is an example excerpted from the sample code of how the pointers
to functions can be initialized:

interface.startup_ptr = startup;
interface.shutdown_ptr = shutdown;
interface.version_ptr = ShowVersion;
interface.user_menu_ptr = DebugMenu;
interface.process_cfg_ptr = ProcessCfg;
interface.ctrl_data_block_ptr = CtrlDataBlock;

Advertising