Concludes a field replaceable unit (FRU) goal.
#include <diag/da.h> int addfrub ( fptr ) struct fru_bucket *fptr;
The addfrub subroutine associates a FRU with the device currently being tested. The TMInput object class identifies the device currently being tested.
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:
|
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:
|
fru_exempt | Indicates that the designated FRU will not be absorbed as a result
of chip/FRU integration. The following values are defined:
|
Upon successful completion, a value of 0 is returned. If the addfrub subroutine is unsuccessful, then a value of -1 is returned.