home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2000 April
/
VPR0004B.BIN
/
DRIVER
/
COMPAQ
/
SP12255
/
sp12255.exe
/
DMWEBC1.CAB
/
PcDevice.tpl
< prev
next >
Wrap
Text File
|
1999-07-15
|
7KB
|
323 lines
<html>
<head>
<title>PC's Devices</title>
<!#sComp.JS>
</head>
<BODY BACKGROUND="IMAGES/BACKGRND.GIF">
<CENTER><TABLE BORDER="0" ALIGN="center" WIDTH="100%">
<SCRIPT LANGUAGE="JavaScript">
prevLink = "CFSYSINF.TPL"; // Default
function SubFunctionSelect(RefLink)
{
// Mask the selection symbol
for (i = 0; i < document.images.length; i ++)
{
if (document.images[i].name == prevLink)
{
document.images[i].src = "IMAGES/TRIANGLEMASK.GIF";
break;
}
}
// Use selection symbol
for (i = 0; i < document.images.length; i ++)
{
if (document.images[i].name == RefLink)
{
document.images[i].src = "IMAGES/TRIANGLE.GIF";
prevLink = RefLink;
break;
}
}
}
function WriteLinkRow(PicNum, RefLink, DisplayText)
{
if (PicNum == 0)
Pic = "";
else
if (PicNum == 1)
Pic = "IMAGES/blue_ball_small.gif";
else
if (PicNum == 2)
Pic = "IMAGES/green_check_small.gif";
else
if (PicNum == 3)
Pic = "IMAGES/yellow_yield_small.gif";
else
if (PicNum == 4)
Pic = "IMAGES/orange_x_small.gif";
else
Pic = "IMAGES/BACKGRND.GIF";
document.write("<TR>");
document.write("<TD ALIGN=LEFT VALIGN=TOP WIDTH=5%>");
document.write("<IMG NAME=" + RefLink + " SRC=./IMAGES/TRIANGLEMASK.GIF></TD>");
document.write("<TD ALIGN=LEFT VALIGN=TOP WIDTH=5%>");
if (PicNum == 0)
document.write("</TD>");
else
document.write("<IMG SRC=" + Pic + "></TD>");
document.write("<TD ALIGN=LEFT VALIGN=TOP WIDTH=90% ALIGN=TOP HSPACE=0 VSPACE=0 BORDER=0>");
document.write("<A HREF=" + RefLink + " onclick=SubFunctionSelect(\'" + RefLink + "\'); target=INPUTOUTPUT>");
document.write("<font color=blue size=2 face=Arial>" + DisplayText + "</font></A>");
document.write("</TD> </TR>");
}
function GetOsStatus(DevOs, OsCurrentErrorStatus, DevStatus, OsIndex)
{
TempCond = 1;
TempDevCond = 1;
for (x = 0; x < DevOs.length; x++)
{
if (DevOs[x] > 0)
{
ActualOsIndex = -1;
for (k = 0; k < OsIndex.length; k++)
{
if (DevOs[x] == OsIndex[k])
{
ActualOsIndex = k;
break;
}
}
if (ActualOsIndex >= 0)
{
for (j = 0; j <= DevStatus.length - 1; j++)
{
if (OsCurrentErrorStatus[ActualOsIndex] == DevStatus[j])
{
if (j == 5)
TempCond = 4;
else
if (j == 3 || j == 4)
TempCond = 3;
else
if (j == 2)
TempCond = 2;
else
if (j < 2)
TempCond = 1;
break;
}
}
}
}
if (TempCond > TempDevCond)
TempDevCond = TempCond;
}
return TempDevCond;
}
function GetMsStatus(DevOs, OsCurrentErrorStatus, DevStatus, OsIndex, dmiDevIntfType, MsType)
{
TempCond = 0;
TempDevCond = 0;
for (i = 0; i < DevOs.length; i++)
{
bMatch = 0;
if (MsType == 0)
{
if (dmiDevIntfType[i] == "SCSI")
bMatch = 1;
else
bMatch = 0;
}
else
{
if (MsType == 1)
{
if (dmiDevIntfType[i] == "IDE" || dmiDevIntfType[i] == "Enhanced ATA/IDE")
bMatch = 1;
else
bMatch = 0;
}
else
{
if (MsType == 2)
{
if (dmiDevType[i] == "Hard Disk" && dmiDevIntfType[i] != "SCSI" && dmiDevIntfType[i] != "IDE" && dmiDevIntfType[i] != "Enhanced ATA/IDE")
bMatch = 1;
else
bMatch = 0;
}
}
}
if (bMatch == 1)
{
if (DevOs[i] > 0)
{
ActualOsIndex = -1;
for (k = 0; k < OsIndex.length; k++)
{
if (DevOs[i] == OsIndex[k])
{
ActualOsIndex = k;
break;
}
}
if (ActualOsIndex >= 0)
{
for (j = 0; j <= DevStatus.length - 1; j++)
{
if (OsCurrentErrorStatus[ActualOsIndex] == DevStatus[j])
{
if (j == 5)
TempCond = 4;
else
if (j == 3 || j == 4)
TempCond = 3;
else
if (j == 2)
TempCond = 2;
else
if (j < 2)
TempCond = 1;
break;
}
}
}
if (TempCond > TempDevCond)
TempDevCond = TempCond;
}
}
}
return TempDevCond;
}
<!*, DMTF|FRU|*, 1, FRUIndex>
<!*, DMTF|Operational State|*, 1, OsIndex>
<!*, DMTF|Operational State|*, 10, OsCurrentErrorStatus>
<!*, DMTF|Physical Container Global Table|*, 1, globalContainer>
DevStatus = new Array();
DevStatus[0] = "Other";
DevStatus[1] = "Unknown";
DevStatus[2] = "OK";
DevStatus[3] = "Non-critical";
DevStatus[4] = "Critical";
DevStatus[5] = "Non-recoverable";
tempCondition = 0;
<!*, DMTF|Processor|*, 9, CpuOs>
<!*, DMTF|Memory Device|*, 23, MemOsIndex>
<!*, DMTF|Disks|*, 3, dmiDevIntfType>
<!*, DMTF|Disks|*, 1, dmiDevType>
<!*, DMTF|Disks|*, 21, DiskOsIndex>
CpuCond = GetOsStatus(CpuOs, OsCurrentErrorStatus, DevStatus, OsIndex);
MemCond = GetOsStatus(MemOsIndex, OsCurrentErrorStatus, DevStatus, OsIndex);
IdeDevPresent = 0;
ScsiDevPresent = 0;
HdDevPresent = 0;
for(i = 0; i < dmiDevIntfType.length; i++)
{
if (dmiDevIntfType[i] == "IDE" || dmiDevIntfType[i] == "Enhanced ATA/IDE")
{
IdeDevPresent = 1;
break;
}
}
for(i = 0; i < dmiDevIntfType.length; i++)
{
if (dmiDevIntfType[i] == "SCSI")
{
ScsiDevPresent = 1;
break;
}
}
for(i = 0; i < dmiDevIntfType.length; i++)
{
if (dmiDevType[i] == "Hard Disk" && dmiDevIntfType[i] != "SCSI" && dmiDevIntfType[i] != "IDE" && dmiDevIntfType[i] != "Enhanced ATA/IDE")
{
HdDevPresent = 1;
break;
}
}
WriteLinkRow(0, "CFSYSINF.TPL", sSysInfo);
WriteLinkRow(0, "SB-INFO.TPL", sSystemBoard);
WriteLinkRow(CpuCond, "CPU.TPL", sCPU);
WriteLinkRow(0, "PARALLEL.TPL", sParallel);
WriteLinkRow(0, "SERIAL.TPL", sSerial);
WriteLinkRow(MemCond, "MEMORY.TPL", sMemory);
WriteLinkRow(0, "MONITOR.TPL", sMonitor);
IdeCond = 1;
ScsiCond = 1;
HdCond = 1;
if (IdeDevPresent == 1)
IdeCond = GetMsStatus(DiskOsIndex, OsCurrentErrorStatus, DevStatus, OsIndex, dmiDevIntfType, 1);
if (ScsiDevPresent == 1)
ScsiCond = GetMsStatus(DiskOsIndex, OsCurrentErrorStatus, DevStatus, OsIndex, dmiDevIntfType, 0);
if (HdDevPresent == 1)
HdCond = GetMsStatus(DiskOsIndex, OsCurrentErrorStatus, DevStatus, OsIndex, dmiDevIntfType, 2);
if (HdCond < ScsiCond)
HdCond = ScsiCond;
if (HdCond < IdeCond)
HdCond = IdeCond;
WriteLinkRow(HdCond, "HARDDISK.TPL", sStorage);
for(i = 0; i < dmiDevType.length; i++)
{
if (dmiDevType[i] == "Hard Disk")
{
WriteLinkRow(0, "FILEUSE.TPL", sStorageUsage);
break;
}
}
WriteLinkRow(0, "NICDRV.TPL", sNIC);
PCType = globalContainer[0];
if (PCType == "Portable" || PCType == "LapTop" || PCType == "Notebook")
{
WriteLinkRow(0, "BT-BTTY.TPL", sBattery);
}
WriteLinkRow(0, "KEYBOARD.TPL", sKeyboard);
WriteLinkRow(0, "POINTDEV.TPL", sPointingDevice);
WriteLinkRow(0, "VIDEO.TPL", sGraphics);
document.write("</TABLE>");
// Use selection symbol
for (i = 0; i < document.images.length; i ++)
{
if (document.images[i].name == prevLink)
{
document.images[i].src = "IMAGES/TRIANGLE.GIF";
break;
}
}
</SCRIPT>
</body>
</html>