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.
| 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. |
| rcode | Reason code associated with the failure.
Note: A Service Request Number is formatted as follows:SSS - RRRwhere 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: 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 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: |
Note: DAs do not have to return MAXFRU frus. The Diagnostic Controller processes frus[ ] from 0..MAXFRU-1, while conf>0.
Upon successful completion, a value of 0 is returned. If the addfrub subroutine is unsuccessful, then a value of -1 is returned.