Displays menus commonly used by Diagnostic Applications (DA).
#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[];
The diag_resource_screen subroutine displays menus commonly used by Diagnostic Applications.
Parameter | Description | |
---|---|---|
screen_info | Screen Information. This structure defines the screen type and screen ID. | |
short screen_type | Screen Type.
|
|
short screen_id | Screen Identifier.
|
|
short screen_key | Identifies extra function keys for screen.
|
|
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.
|
NOTES:
- This structure must be built exactly for a SINGLE_SELECTION screen type. screen_msg[0..n] MUST have the msg_type set to SELECTABLE_MSG for all selectable messages.
- screen_msg[n+1] MUST have the msg_type set to INFO_MSG if you want some kind of information displayed to the user before the INSTRUCTION line.
- The help message, if any, should be last.
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 |