DIRECTORY
Ascii USING [BEL, ControlZ],
BasicTime USING [Now],
Convert USING [AppendCard, AppendTime],
Loader USING [BCDBuildTime],
LSEPDiagnostics USING [BuildImageSample, ImageFault, InterpretImageSample],
NSExec USING [ClientID, GetTTY, localExec, OutputHandle, PutAsyncMessage, PutMessage],
NSString USING [AppendToMesaString, CopyString, MakeString, nullString, String, StringRep, StringFromMesaString],
PaperHandling USING [PaperStacking, RavenRegLong, RavenRegShort, Registration],
PrintingState,
PrintingTypes USING [Option],
Process USING [ Abort, GetPriority, MsecToTicks, Pause, Priority, priorityForeground, SecondsToTicks, SetPriority],
PSCommand USING [ GetPrintServiceStatus, PrintFile, PrintFileOptions, PaperTray, SetRegistration],
PSExec USING [GetClientID],
PSState USING [State],
RasterLogFont USING [TransferStringSequence],
RavenBansheeMessage USING [GetNSMessage, Key],
RavenConsole USING [ BlankDisplay, Character, D1, D2, D3, D4, D5, D6, D7, D9, DC, displayAnalystLog, displayTechRepLog, DisplayCode, enterRepairMode, exitRepairMode, KeyPadCode, printAnalystLog, printTechRepLog, readRegistration, resetLog, runCommandStatusTest, runImageTest, runTestJob, setRegistration, UpdateDisplay, WaitKeyPadCode],
RavenControl USING [ EventContext, GetEngineStatus, RunTurnaroundTest, SetToCurrentEventContext, WaitEngineEvent, WaitEngineStatus],
RavenCounter USING [Get, Handle, Item, Reset],
RavenEngine USING [ --Job, SetJob, -- GetPrintingState, SetPrintingState, WaitPrintingState],
RavenTest USING [],
RefText USING [Append, AppendChar],
Rope USING [ToRefText],
StringSequence USING [Create, Delete, Handle, learSieglerStringLength],
TestPattern USING [Name, NotFound, TestPatternID],
TextInput USING [ChoiceIndex, Choices, GetChoice, GetYesNo],
ThisMachine USING [ProcessorID],
TTY USING [Handle, Rubout],
XFormat USING [CR, Handle, NSLine, NSString],
XMessage USING [Compose, StringArray];
statusList:
ARRAY [0..29)
OF LogItem = [
[readyToFeed, readyToFeed], [feeding, feeding], [pageSync, pageSync], [
pageAtOutputTray, pageAtOutputTray], [fuserCold, fuserCold], [
tonerLow, tonerLow], [interlockOpen, interlockOpen], [
feedTraysNotEngaged, feedTraysNotEngaged], [
displayAcknowledge, displayAcknowledge], [aboutToDozeOff, aboutToDozeOff], [
paperSmallSmall, paperSmallSmall], [paperSmallLarge, paperSmallLarge], [
paperLargeSmall, paperLargeSmall], [paperLargeLarge, paperLargeLarge], [
key0to9, key0to9], [keyClear, keyClear], [keyTest, keyTest], [
keyOnLine, keyOnLine], [onLine, onLine], [keyOffLine, keyOffLine], [
goingOffLine, goingOffLine], [offLine, offLine], [parityError, parityError], [
illegalCharacter, illegalCharacter], [illegalSequence, illegalSequence], [
statusError, statusError], [noStatus, noStatus], [
statusOverRun, statusOverRun], [undefinedStatus, undefinedStatus]];
BuildTechRepLog:
PROCEDURE [sequence: StringSequence.Handle] =
BEGIN
called by DisplayLog to put appropriate text into sequence
dataBase: RavenCounter.Handle;
ExpandAppendFreeBump:
PROCEDURE [messageKey: RavenBansheeMessage.Key] =
BEGIN
inserts arguments into a message, places the string into the string sequence, and increments the index
expandedString ← XMessage.Compose[
source: RavenBansheeMessage.GetNSMessage[messageKey],
args: expansionString];
NSString.AppendToMesaString[to: sequence[index], from: expandedString];
index ← index + 1;
END; -- ExpandAppendFreeBump
FormatLogCounterMessage:
PROCEDURE [item: RavenCounter.Item,
messageKey: RavenBansheeMessage.Key] =
BEGIN
mesaString.length ← 0;
mesaString ← Convert.AppendCard[mesaString, dataBase.counter[item]];
expansionString.data[1] ← mesaString;
ExpandAppendFreeBump[messageKey];
expansionString.data[1] ← NSString.nullString;
END; -- FormatLogCounterMessage
expansionString: REF XMessage.StringArray ← NEW[XMessage.StringArray[2]]; -- for arguments to embed in message
expandedString: NSString.String; -- string for message with embedded arguments
index: CARDINAL ← 0;
body of BuildTechRepLog
mesaString: REF TEXT ← NEW[TEXT[StringSequence.learSieglerStringLength]];
nsString: NSString.String ← NSString.MakeString[
bytes: StringSequence.learSieglerStringLength];
used for appending dates:
sDateAndTime: NSString.String ← NEW[NSString.StringRep[40]];
nsDateAndTime: NSString.String ← NSString.StringFromMesaString[sDateAndTime];
used for appending counters:
rateFormat: Format.NumberFormat = [
base: 10, zerofill: TRUE, unsigned: TRUE, columns: counterFieldWidth];
decFormat: Format.NumberFormat = [
base: 10, zerofill: FALSE, unsigned: TRUE, columns: 0];
hexFormat: Format.NumberFormat = [
base: 16, zerofill: FALSE, unsigned: TRUE, columns: 0];
counterFieldWidth: CARDINAL = 10;
dataBase ← RavenCounter.Get[]; -- get event counts from log
expansionString.data[0] ← NSString.nullString;
Make "Tech Rep Log Of..." line
nsString.length ← 0;
nsDateAndTime.length ← 0;
nsDateAndTime ← Convert.AppendTime[to: nsDateAndTime, from: BasicTime.Now[]];
appends time to nsDateAndTime
expansionString.data[1] ← nsDateAndTime;
ExpandAppendFreeBump[xerox804xTechRepLogOf];
Make "Host #" line
mesaString.length ← 0;
expansionString.data[1] ← Rope.ToRefText[ThisMachine.ProcessorID[$ProductSoftware]];
ExpandAppendFreeBump[host];
Make "Software Of..." line
nsString.length ← 0;
nsDateAndTime.length ← 0;
nsDateAndTime ← Convert.AppendTime[to: nsDateAndTime, from: Loader.BCDBuildTime[], end: seconds];
expansionString.data[1] ← nsDateAndTime;
ExpandAppendFreeBump[softwareOf];
Make "Last Reset On..." line
nsString.length ← 0;
nsDateAndTime.length ← 0;
nsDateAndTime ← Convert.AppendTime[to: nsDateAndTime, from: dataBase.resetTime, end: seconds];
expansionString.data[1] ← nsDateAndTime;
ExpandAppendFreeBump[lastResetOn];
Make "Feeds..." line
mesaString.length ← 0;
mesaString ← Convert.AppendCard[mesaString, dataBase.counter[feeding]];
expansionString.data[1] ← mesaString;
ExpandAppendFreeBump[feedsSinceLastReset];
index ← index + 1;
Make "Jam Counters" line
ExpandAppendFreeBump[jamCountersTotalRate];
Make the Jam Counters log block
FOR i:
CARDINAL
IN [0..
LENGTH[jamList])
DO
feeds: LONG CARDINAL;
feeds ←
SELECT jamList[i].counter
FROM
feederFaultBottom =>
dataBase.counter[feedBottomAligned] + dataBase.counter[
feedBottomOffset],
feederFaultTop =>
dataBase.counter[feedTopAligned] + dataBase.counter[feedTopOffset],
ENDCASE => dataBase.counter[feeding];
mesaString.length ← 0;
mesaString ← Convert.AppendCard[mesaString, dataBase.counter[jamList[i].counter]];
FOR character:
CARDINAL
IN [0..counterFieldWidth - 1)
DO
IF mesaString[character] = '0 THEN mesaString[character] ← '. ELSE EXIT;
ENDLOOP;
expansionString.data[0] ← NSString.CopyString[mesaString];
mesaString.length ← 0;
IF feeds = 0
THEN mesaString ← RefText.Append[to: mesaString, from: "**********"]
ELSE BEGIN
mesaString ← Convert.AppendCard[mesaString, (dataBase.counter[jamList[i].counter] / feeds) * 1000];
FOR character:
CARDINAL
IN [0..counterFieldWidth - 1)
DO
IF mesaString[character] = '0 THEN mesaString[character] ← '. ELSE EXIT;
ENDLOOP;
END;
expansionString.data[1] ← mesaString;
ExpandAppendFreeBump[jamList[i].message];
ENDLOOP;
expansionString.data[0] ← expansionString.data[1] ← NSString.nullString;
Make "Rate =..." line
ExpandAppendFreeBump[rateTotalTotalFeeds];
Make the Command Counters log block
index ← index + 1;
ExpandAppendFreeBump[commandCounters];
FOR i:
CARDINAL
IN [0..
LENGTH[commandList])
DO
FormatLogCounterMessage[commandList[i].counter, commandList[i].message];
ENDLOOP;
Make the Status Counters log block
index ← index + 1;
ExpandAppendFreeBump[statusCounters];
FOR i:
CARDINAL
IN [0..
LENGTH[statusList])
DO
FormatLogCounterMessage[statusList[i].counter, statusList[i].message];
ENDLOOP;
Make the Plate Status Counters log block
index ← index + 1;
ExpandAppendFreeBump[plateStatusCounters];
FOR i:
CARDINAL
IN [0..
LENGTH[plateStatusList])
DO
FormatLogCounterMessage[
plateStatusList[i].counter, plateStatusList[i].message];
ENDLOOP;
Make the Status Extras Counters log block
index ← index + 1;
ExpandAppendFreeBump[statusExtrasCounters];
FOR i:
CARDINAL
IN [0..
LENGTH[statusExtrasList])
DO
FormatLogCounterMessage[
statusExtrasList[i].counter, statusExtrasList[i].message];
ENDLOOP;
END; -- BuildTechRepLog
18-Jun-85 23:24:58 - Strickberger - Rewrite for Raven engine driver redesign. Eliminate automatic reboot if image test fail. Previous log entries deleted.
12-Aug-85 21:16:32 - Strickberger - Update for Euclid interfaces. Rewrite Tech Rep Log stuff, eliminate Analyst log. Add Print Tech Rep Log, Display Tech Rep Log and Reste Tech Rep Log commands to RunServeTestMode. FixArrows.
19-Sep-85 18:48:20 - Strickberger - Specify senderName when printing test pattern from Image Test.
19-Dec-85 11:57:45 - Strickberger - Base Tech Rep Log feeder jam rates on correct feed counters (AR23114).
23-Apr-86 23:24:35 - Strickberger - SetPrintingState[completed], wait for printing state to not be started instead of completed in PrintTechRepLog. Both printAnalystLog and printTechRepLog codes print Tech Rep Log. Both displayAnalystLog and displayTechRepLog codes display Tech Rep Log.
14-May-86 18:50:11 - Prochaska - Update for new RavenControl, add call to RavenControl.SetToCurrentEventContext.