beautypg.com

Rockwell Automation 6008-SI IBM PC I/O SCNNR 6008-SI User Manual

Page 88

background image

Chapter 7

Scanner Management

7-21

mr_print

Formats an MR queue entry for display. This function translates the
command and status to English for writing to screen or file. If the MR was
for link status or autoconfigure, mr_print also displays expanded
information on all adapters.

Calling sequence:

mr_print(

fileptr, command, &qmrptr

);

Arguments:

fileptr:

stdout or stderr for screen output, or a pointer to a user file

opened with fopen.

command:

an integer, the management request. This is one of the six

symbolic constants C_AUTOCONF, C_FLT_GRP, C_LINKSTAT,
C_SCANLIST, C _SET_MODE, C_SETUP.
(mr_print needs to
know which command you issued because the interpretation of the data
is different for different commands.)

qmrptr:

the QMR-type packet that was passed to mr_wait. Note that

the function argument is a pointer to the packet.

Returned values:

none.

mr_print

displays as much information as possible in English, rather

than in numeric codes. For instance, if the command was
C_AUTOCONF or C_LINKSTAT, mr_print displays a line of
information about each adapter that is in the scan list, followed by a
display of the scan list showing the order in which adapters are scanned.
For these commands plus C_SCANLIST, mr_print separates adapter
addresses into the form rack/group.