addfrub_src

Purpose

Concludes a collection of field replacement units (FRUs) with a platform specific System Reference Code (SRC).

Syntax


#include     <diag/da.h>

int addfrub_src (fptr)
struct fru_bucket_src *fptr;                              

Description

The addfrub_src subroutine associates a collection of FRUs with a failure detected by the device currently being tested. The TMInput object class identifies the device currently being tested.
Note: addfrub() should be used when reporting a Service Request Number (SRN). insert_frub() should be called before addfrub() to fill in some of the fru_bucket data. addfrub_src() should be used when reporting an System Reference Code (SRC). Then, entire contents of the fru_bucket_src should be filled in by the caller before calling addfrub_src(), thus there is no corresponding call to insert_frub for fru_bucket_src.

Parameters

Parameter Description
fptr Pointer to a structure of type fru_bucket_src, which is defined below. The entire structure must be filled out before calling addfrub_src. Any optional or unknown values should be set to NULL (0).

struct fru_bucket_src
{
                char  dname[NAMESIZE];  /* Resource Name */
                char  src[RPA_SRC_SIZE_NN];/* Primary reference code */
                unsigned int  refc2;    /* Extended reference code - word 2 */
                unsigned int  refc3;    /* Extended reference code - word 3 */
                unsigned int  refc4;    /* Extended reference code - word 4 */
                unsigned int  refc5;    /* Extended reference code - word 5 */
                unsigned int  refc6;    /* Extended reference code - word 6 */
                unsigned int  refc7;    /* Extended reference code - word 7 */
                unsigned int  refc8;    /* Extended reference code - word 8 */
                unsigned int  refc9;    /* Extended reference code - word 9 */
                int   rmsg;     /* Failure description */
                char  crid[2];  /* Platform error creator id */
                unsigned int  plid;     /* Platform Log Id */
                unsigned int  subsysid; /* Subsystem Id */
                unsigned int  event_sev;/* Event Severity */
                int   action_flags;     /* Error Action Flags */
                int   errlg_seq;        /* Error Log Sequence Number */
                frus_src_t *frus;       /* Linked list of FRUs for SRC */
};
dname Names the device under test.
src System Reference Code. The Primary Reference Code is the 1st 8 characters of this 32 character string. The Primary Reference Code is required, the remainder of the string is optional.
refc2 Extended reference code word 2 (required).
refc3 - refc9 Optional additional extended reference code words 3 - 9. Should be 0 if not present.
rmsg Message number of the text describing the failure. The set number of the text is predefined by the PSet field in the predefined Diagnostic Resources object class.
crid ASCII character representing the subsystem creating the error log reporting the failure. Use NULL (0) if this failure is not from platform error log analysis.
plid Unique identifier for this failure.
subsysid Platform Error Log Subsystem ID, otherwise 0.
event_sev Platform Error Log Severity, otherwise 0.
action_flags Flags defining reporting action for this failure. The values can be or' ed together.
Bit
Action
RPA_REPORT_EXTERNALLY
Report this failure to external programs like the Service Focal Point.
RPA_CALL_HOME_REQD
Only valid with RPA_REPORT_EXTERNALLY, this failure should be reported automatically to IBM® Service.
NO_FAULT_INDICATOR
If the plid is zero and this bit is set, the system's fault indicator will not be turned on for this failure.
errlg_seq Error log sequence number of originating error.
frus Optional linked list of FRUs as described in the following structure. This list is not necessary if the SRC completely describes the failure and resolution actions.

typedef struct frus_src
{
        int   type;             /* RPA FRU type */
        char  priority;         /* RPA FRU/Procedure Priority */
        char  loc[RPA_LOC_SIZE];/* Physical location code */
        char  pn[RPA_FRU_PN_SIZE];      /* FRU Stocking p/n */
        char  proc_id[RPA_PROC_SIZE];   /* Procedure Id */
        char  ccin[RPA_CCIN_SIZE_NN];   /* CCIN */
        char  sn[RPA_FRU_SN_SIZE_NN];   /* FRU Serial Number*/
        struct frus_src *next_fru;
} frus_src_t;
type FRU type. One of the following:
RPA_FRUTYPE_NORMAL
Normal Hardware FRU.
RPA_FRUTYPE_CODE
Code FRU described by procedure id field.
RPA_FRUTYPE_C_PROC
Configuration procedure required.
RPA_FRUTYPE_M_PROC
Maintainence procedure required.
RPA_FRUTYPE_EXT
External FRU.
RPA_FRUTYPE_EXT_CODE
External code FRU described by procedure field.
RPA_FRUTYPE_TOOL
A tool required by another FRU in the list.
RPA_FRUTYPE_SYMBOL
Procedure id for acquiring or working with a FRU.
priority FRU Replacement/Procedure Priority. One of the following:
H
High priority and mandatory call-out. Replacing the FRU, or performing the Procedure is mandatory. Multiple call-outs with H priority should be acted on as a group.
M
Medium priority. Each FRU/Procedure with M priority should be acted on, one at a time, in the order given.
A
Medium priority group A. Each FRU/Procedure with A priority should be acted on as a group.
B
Medium priority group B. Each FRU/Procedure with B priority should be acted on as a group.
C
Medium priority group C. Each FRU/Procedure with C priority should be acted on as a group.
L
Low priority. Each FRU/Procedure with L priority should be acted on only after all other priority call-outs have failed to resolve the problem.
loc Location code
pn FRU Stocking Part Number if available, mutually exclusive with proc_id.
proc_id Procedure Id if available, mutually exclusive with pn.
ccin CCIN, if available and only if pn is available.
sn FRU Serial Number, if available, and only if pn is available.
next_fru Pointer to the next frus_src structure.

Return Value

Item Description
0 Upon successful completion.
-1 If the addfrub_src subroutine is unsuccessful.