RavenControl.mesa
Copyright Ó Xerox Corporation 1985, 1986, 1987. All rights reserved.
last edited by prochaska 14-May-86 13:44:59
Tim Diebert: March 31, 1987 8:39:20 am PST
DIRECTORY
PrincOps USING [PageCount, wordsPerPage],
RavenCodes USING [PrinterCommand, PrinterStatus];
RavenControl: CEDAR DEFINITIONS = BEGIN
TYPEs:
ConsoleKey: TYPE = RavenCodes.PrinterStatus[key0..keyOffLine];
EngineEvent: TYPE = MACHINE DEPENDENT {readyToFeed(0), feeding, transferReady, imaged, imagedOverrun, pageSyncMiss, pageDelivery, idle, feedError, softError, hardError, timeout, (LAST[WORD])};
EngineStatus: TYPE = {okay, okayFlushRequired, tonerLow, warming, lowPowerMode, preRegistrationFault, postRegistrationJam, preExitJam, postExitJam, outputTrayFull, traysUnlatched, doorOpen, offline, communicationFault, imageFault1, imageFault2, imageFault3, sequenceFault};
EventContext: TYPE [1];
LogItem: TYPE = RECORD [
SELECT sort: * FROM
command => [command: RavenCodes.PrinterCommand],
printerStatus => [printerStatus: RavenCodes.PrinterStatus],
softwareStatus => [statusExtras: StatusExtras],
plateStatus => [plateStatus: PlateStatus],
ENDCASE];
PlateStatus: TYPE = {okay, bandOverrun, pageSyncMiss};
PaperTray: TYPE = {bottom, top};
PaperTraySize: TYPE = {unknown, small, large};
PaperStacking: TYPE = {aligned, offset};
StatusExtras: TYPE = {okay, communicationFault, imageFault1, imageFault2, imageFault3,
sequenceFault};
variables:
unlimitedAvailable: READONLY BOOLEAN; -- enough real memory for unlimited mode
PROCEDUREs:
Initialize: PROCEDURE [bufferSize: PrincOps.PageCount, enableUnlimited: BOOLEAN];
bufferSize should be a multiple of 16 Environment.PageCount. enableUnlimited is ignored if memory size < 1.5Mb
GetEngineStatus: PROCEDURE RETURNS [engineStatus: EngineStatus];
returns current Raven engine status
WaitEngineStatus: PROCEDURE RETURNS [engineStatus: EngineStatus];
returns with the new engine status when it changes
GetPaperTrayStatus: PROCEDURE [tray: PaperTray] RETURNS [okay: BOOLEAN];
returns the staus of paper in the desired paper tray
GetPaperTraySize: PROCEDURE RETURNS [bottom, top: PaperTraySize];
returns the staus of the desired paper tray
WaitEngineEvent: PROCEDURE[ eventContext: REF EventContext]
RETURNS [event:RavenControl.EngineEvent];
returns when an event occurs
SetToCurrentEventContext: PROCEDURE [eventContext: REF EventContext];
initializes the context to reference the current state of the eventQ
WaitConsoleKey: PROCEDURE RETURNS [key: ConsoleKey];
returns when a key is pressed
WaitLogItem: PROCEDURE RETURNS [logItem: LogItem];
returns with an item to be logged
Feed: PROCEDURE [tray: PaperTray, stacking: PaperStacking];
issues feed command with tray and stacking modifiers
SendEngineCommand: PROCEDURE [command: RavenCodes.PrinterCommand];
sends command to Raven
SetScanLineLength: PROCEDURE [scanLineLength: (0..PrincOps.wordsPerPage]];
establishes the number of words in a scanline
BandBLTTransferReady: PROCEDURE;
bandslist/fontload are resident and ready for imaging
WaitEngineEvent RETURNs transferReady event
BandBLTTransferCreatePage: PROCEDURE [firstPlate: BOOLEAN];
bandslist/fontload are resident - creates page bitmap utilizes previous page bitmap bands if firstPage is FALSE
PageTransferSet: PROCEDURE[pageNumber: CARDINAL];
Make page bitmap resident and ready for imaging WaitEngineEvent RETURNs transferReady event
TransferRelease: PROCEDURE;
release dependancy on transfer
RunTurnaroundTest: PROCEDURE RETURNS [ok: BOOLEAN];
exercises command/status hardware (assumes loopback cable)
END...
LOG
When / Who / What.
18-Apr-85 11:25:46 / Strickberger / Created.
16-Jun-85 15:01:32 / Strickberger / Updated for multi plate unlimited printing.
19-Sep-85 17:01:52 / Strickberger / Added enableUnlimited parameter to Initialize.
14-May-86 13:44:59 / Prochaska / Added TYPE EventContext, PROC SetToCurrentEventContext; Added parm to WaitEngineEvent.