[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Understanding the Diagnostic Subsystem for AIX

diag_resource_screen

Purpose

Displays menus commonly used by Diagnostic Applications (DA).

Syntax

#include <diag/diag_screen.h>

#include <diag/diag.h>

long  diag_resource_screen ( screen_info, screen_data, screen_msg )

screen_info_t *screen_info;
screen_data_t *screen_data;
screen_msg_t screen_msg[];

Description

The diag_resource_screen subroutine displays menus commonly used by Diagnostic Applications.

Parameters

Parameter Description
screen_info Screen Information. This structure defines the screen type and screen ID.
short screen_type Screen Type.
  • INFORMATIVE
  • TRANSITIONAL
  • SINGLE_SELECTION
short screen_id Screen Identifier.
  • TESTING_MENU
  • ANALYZE_ERROR_LOG
  • ANALYZE_POST
  • ANALYZE_FIRMWARE
  • ANALYZE_CHECKSTOP
  • ANALYZE_SUBSYS
short screen_key Identifies extra function keys for screen.
  • DIAG_HELP_KEY
long item_selected Indicates the selected item in the list, if screen_type is SINGLE_SELECTION. First selectable item in screen_msg would have a 1 returned, second selectable item would have a 2 returned, and so on.
screen_data Screen Data. This structure contains all data needed to construct the screen.
nl_catd fdes Catalog file descriptor.
long menu_number Menu number that is displayed, right-justified, as a hex number at the top-right corner of the screen.
char * resource_name The name of the resource being tested. (tminput->dname)
char * location_code The logical location code of the resource being tested. (tminput->dnameloc)
short test_mode The test mode (ADVANCED, NON_ADVANCED) this session is running in. (tminput->advanced)
short loop_mode Indicates whether Loop Mode has been selected. (tminput->loopmode)
short lcount Total number of passes made. This value is used only when loop_mode is not set to LOOPMODE_NOTLM.
short lerrors Total number of errors encountered. This value is used only when loop_mode is not set to LOOPMODE_NOTLM.
short msg_count Total number of messages in the screen_msg structure.
screen_msg The screen_msg structure contains an array of setid's and msgid's used to construct the text (or body) of the screen. This includes all messages except the last line, or INSTRUCTION line. This structure is not required for a TRANSITIONAL screen type, use NULL for the screen_msg argument.
short set_num The set number containing the message text.
short msg_num The message number containing the message text.
char * message Text message to use in place of < set_num, msg_num >. This is useful if string substitution was required in order to build the message text. This text will take precedence over the < set_num, msg_num > if not NULL.
short msg_type Flag indicating the type of message to be displayed.
  • HELP_MSG Only one message of this type allowed. This help message will always be associated with the screen, and not any particular line.
  • SELECTABLE_MSG
  • INFO_MSG

NOTES:

Return Value

The diag_resource_screen subroutine returns one of the following values:

Return Code Description
DIAG_OK Successful return.
DIAG_MALLOCFAILED Memory allocation was unsuccessful.
DIAG_ENTER Enter Function key was entered.
DIAG_EXIT Exit Function key was entered.
DIAG_CANCEL Cancel Function key was entered.
DIAG_HELP Help Function key was entered.
DIAG_FAIL Invalid data structure, software error

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]