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

Understanding the Diagnostic Subsystem for AIX

addfrub

Purpose

Concludes a field replaceable unit (FRU) goal.

Syntax

#include                <diag/da.h>
int addfrub ( fptr )
struct fru_bucket *fptr;

Description

The addfrub subroutine associates a FRU with the device currently being tested. The TMInput object class identifies the device currently being tested.

Parameters

Parameter Description
fptr Pointer to a structure of type fru_bucket, which is defined as follows:
struct fru_bucket  {
          char   dname[NAMESIZE];
          short  ftype;
          short  sn;
          short  rcode;
          short  rmsg;
          struct {
                   int   conf;
                   char  fname[NAMESIZE];
                   char  floc[LOCSIZE];
                   short fmsg;
                   char  fru_flag;
                   char  fru_exempt;
                 } frus[MAXFRUS];
};
dname Names the device under test.
ftype Indicates the type of FRU Bucket being added to the system. The following values are defined:
FRUB1
The FRUs include the resource that failed, its parent, and any cables needed to attach the resource to its parent.
FRUB2
This FRU Bucket is similar to FRU Bucket FRUB1, but does not include the parent resource.
sn Source number of the failure. The source number is usually set to the led field of the PdDV object class by the insert_frub subroutine. If the sn set by the insert_frub subroutine is not the desired value, the calling subroutine should set sn to the desired value after the insert_frub subroutine and before the addfrub subroutine.
rcode Reason code associated with the failure.
Note
A Service Request Number is formatted as follows:
SSS - RRR

where SSS is the sn and RRR is the rcode.

Some devices may use a different nomenclature for their service request numbers. For this special case, the sn parameter indicates how the rcode value should be formatted. If sn = 0, then rcode is interpreted as decimal. If sn = -1, then rcode is interpreted as a 4-digit hexadecimal number.

If sn = -2, then the object class DAVars is searched for an attribute of Errorcode. This allows the displaying of 8 digit hex Error Codes. The diagnostic application is responsible for setting up a DAVars object similar to the following:

DAVars:

dname: <device name under test>
vname: Error_code           "Error_code is an ascii string"
vtype: DIAG_STRING          "Literal value"
val: <8 digit hex character string> 

See the getdavar/putdavar subroutine for more information.

rmsg Message number of the text describing the reason code. The set number of the text is predefined by the PSet field in the Predefined Diagnostic Resources object class.
conf Indicates whether an FRU is valid. A value of 0 indicates an invalid FRU. No other FRUs are displayed once an invalid FRU is found in the FRU bucket.

However, if fname contains the string REF-CODE, then the fmsg and conf values are used to make the 8-digit ref code.

For AIX 4.3.2 and earlier versions, this field indicates the probability of failure associated with the named FRU.

fname Names the FRU.

The parameters floc and fmsg must be specified, if fname is not represented in the Customized Devices object class. Otherwise, they should be set to 0.

floc Location of fname.
fmsg Message number of the text describing fname. The set number is predefined by the PSet descriptor in the Predefined Diagnostic Resources object class.
fru_flag Flag used by the Diagnostic Applications (DA) in determining which FRU to use in the frus[ ] structure. The following values are defined:
NOT_IN_DB
The FRU is not represented in the config database.
DA_NAME
frus[ ].fname should be the name of the device being tested.
PARENT_NAME
frus[ ].fname should be the name of the parent of the device being tested.
CHILD_NAME
frus[ ].fname should be the name of the child of the device being tested.
NO_FRU_LOCATION
The FRU name will be left blank, and the FRU location code will be set to the location of the device under test (dname).
fru_exempt Indicates that the designated FRU will not be absorbed as a result of chip/FRU integration. The following values are defined:
EXEMPT
FRU cannot be integrated (For example, fuse, cable, displays, etc.) This value should be the most-used value, and should be used in conjunction with the fru_flag field. Examples are:

FRU                  fru_flag         fru_exempt
----                 --------         ----------
Device being tested  DA_NAME          EXEMPT
Parent of device     PARENT_NAME      EXEMPT
CABLE                NOT_IN_DB        EXEMPT
NONEXEMPT
FRU can be integrated (generally, any specific chip set).
Note
DAs do not have to return MAXFRU frus. The Diagnostic Controller processes frus[ ] from 0..MAXFRU-1, while conf>0.

Return Value

Upon successful completion, a value of 0 is returned. If the addfrub subroutine is unsuccessful, then a value of -1 is returned.

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