(FILECREATED "27-JUL-83 16:33:51" {PHYLUM}<FIKES>LISP>8200INTERFACE.;6 23785 changes to: (VARS 8200Server) previous date: "10-MAR-83 16:17:17" {PHYLUM}<FIKES>LISP>8200INTERFACE.;5) (PRETTYCOMPRINT 8200INTERFACECOMS) (RPAQQ 8200INTERFACECOMS [(FNS * 8200INTERFACEFNS) (MACROS * 8200INTERFACEMACROS) (PROP Settings CopyButton CopyModeButton OutputButton PaperTrayButton ReductionButton) (PROP Message A12 APLight AddPaper B01 B02 Bottom CBPTDLight CDCLight CollatedStapled CollatedUnstapled CopyButton CopyModeButton E10 FPBLPTLight FullSize Initialization LCITTLight LPBFPTLight LampTest NotReady OFDLight OFULight OneSidedCopies OutputButton PWLight PaperTrayButton Printing RDHLeftCover RDHRightCover RLight Ready ReductionButton RunNotPrint SCSILight STTTSLight TechRep Top TwoSidedCopies TwoSidedOriginalsAndCopies UOTLight UTPTLight) (RECORDS * 8200INTERFACERECORDS) (P (LOAD? (QUOTE EVALSERVER.DCOM))) (VARS * 8200INTERFACEVARS) (DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA) (NLAML) (LAMA]) (RPAQQ 8200INTERFACEFNS (Get8200 Get8200Copy Get8200CopyMode Get8200Led Get8200OpStatusCode Get8200Output Get8200PaperTray Get8200Reduction Get8200State Get8200TechStatusCodes GetAddPaperMsg GetMessage Push8200Button Read8200 Select8200Feature SelectNumberOfCopies)) (DEFINEQ (Get8200 [LAMBDA (array prop) (* edited: " 3-MAR-83 13:55") (* Get the value of property prop from array as obtained by Read8200. The properties are each of the feature types selected by buttons on the main panel (e.g., CopyMode), each of the other lights on the main panel (e.g., AddPaper), each of the led's on the status panel (e.g., MainFeederLed), each of the sensors (e.g., DocumentInRDH), OperatorStatusCode, and TechStatusCode. Note: no provision is made in the code for dealing with blinking main panel lights.) (SELECTQ prop ((AddPaper APLight) (Get8200OnOffLight array 18 128)) (AddPaperLed (Get8200Led array 27 32)) (BSkiis (EltAnd array 23 1)) (BTransport (EltAnd array 23 2)) (BeltMistrackNOT (EltAnd array 20 8)) (CTransport (EltAnd array 23 4)) (CleanPopSensor (EltAnd array 22 16)) ((CloseBottomPaperTrayDoor CBPTDLight) (Get8200OnOffLight array 17 128)) ((CloseDocumentCover CDCLight) (Get8200OnOffLight array 16 1)) (ClosePaperDoorLed (Get8200Led array 24 128)) (CloseRDHLed (Get8200Led array 27 16)) (CompilerEntrySwitch (EltAnd array 19 16)) (CompilerExitSwitch (EltAnd array 19 32)) ((Copy CopyButton) (Get8200Copy array)) ((CopyMode CopyModeButton) (Get8200CopyMode array)) (DeveloperDoor (EltAnd array 23 128)) (DocumentInRDH (EltAnd array 19 128)) (EmptyTopTrayLed (Get8200Led array 27 1)) (FinisherCover (EltAnd array 20 2)) ((FirstPageBottomLastPageTop FPBLPTLight) (Get8200OnOffLight array 18 8)) (FuserJamReset (EltAnd array 23 32)) (FuserOverTempNOT (EltAnd array 20 16)) (FuserUnderTemperature (EltAnd array 22 8)) (JamSwitch2 (EltAnd array 19 1)) (JamSwitch3 (EltAnd array 19 2)) (JamSwitch4 (EltAnd array 19 4)) (JamSwitch5 (EltAnd array 19 8)) ((LastPageBottomFirstPageTop LPBFPTLight) (Get8200OnOffLight array 18 16)) ((LoadCopiesInTopTray LCITTLight) (Get8200OnOffLight array 18 1)) (MainFeederLed (Get8200Led array 27 8)) (MainPaperTrayDoor (EltAnd array 20 64)) (MisStrip (EltAnd array 22 128)) (ModuleInterlockNOT (EltAnd array 20 32)) (OffsettingCatchTray (EltAnd array 19 64)) (OffsettingCatchTrayPosition (EltAnd array 21 16)) ((OperatorStatusCode OpStatusCode) (Get8200OpStatusCode array)) ((OriginalsFaceDown OFDLight) (Get8200OnOffLight array 18 4)) ((OriginalsFaceUp OFULight) (Get8200OnOffLight array 18 2)) ((Output OutputButton) (Get8200Output array)) ((PaperTray PaperTrayButton) (Get8200PaperTray array)) (PaperUnderPopSensor (EltAnd array 22 32)) ((PleaseWait PWLight) (Get8200OnOffLight array 16 32)) (PopJam (EltAnd array 22 64)) (PopReset (EltAnd array 23 8)) (PopSensorLed (Get8200Led array 24 8)) (ProcessorCover (EltAnd array 20 1)) (RDHLeftCover (EltAnd array 21 128)) (RDHMisfeed (EltAnd array 6 8)) (RDHMotor (EltAnd array 21 64)) (RDHMotorOff (EltAnd array 6 128)) (RDHOpen (EltAnd array 21 2)) (RDHReturnJam (EltAnd array 6 64)) (RDHRightCover (EltAnd array 21 32)) (RDHShingleFeed (EltAnd array 6 16)) (RDHSlowOffPlaten (EltAnd array 6 32)) (RDHStackingJam (EltAnd array 6 4)) (RXShroudOpen (EltAnd array 21 8)) ((Ready RLight) (Get8200OnOffLight array 16 128)) ((Reduction ReductionButton) (Get8200Reduction array)) (SetsTooThickLed (Get8200Led array 27 64)) ((SetsTooThickToStaple STTTSLight) (Get8200OnOffLight array 17 64)) (ShadeOpen (EltAnd array 21 1)) (StandbyRelayNOT (EltAnd array 20 128)) (StaplerCover (EltAnd array 20 4)) (StaplerPresent (EltAnd array 22 4)) (State (Get8200State array)) ((StatusCodeSeeInstructions SCSILight) (Get8200OnOffLight array 16 64)) (TechStatusCode (Get8200TechStatusCodes array)) (TopTrayFeederLed (Get8200Led array 27 4)) (TurnAroundTransport (EltAnd array 23 16)) (USShroudOpen (EltAnd array 21 4)) ((UnloadOutputTray UOTLight) (Get8200OnOffLight array 18 64)) ((UnloadTopPaperTray UTPTLight) (Get8200OnOffLight array 17 2)) (X2Led (Get8200Led array 24 1)) (X3Led (Get8200Led array 24 2)) (X4Led (Get8200Led array 24 4)) (X5Led (Get8200Led array 24 16)) (X6Led (Get8200Led array 24 32)) (X7Led (Get8200Led array 24 64)) (PROG [(fix (FIXSPELL prop NIL '(APLight AddPaper AddPaperLed BSkiis BTransport BeltMistrackNOT CBPTDLight CDCLight CTransport CleanPopSensor CloseBottomPaperTrayDoor CloseDocumentCover ClosePaperDoorLed CloseRDHLed CompilerEntrySwitch CompilerExitSwitch Copy CopyButton CopyMode CopyModeButton DeveloperDoor DocumentInRDH EmptyTopTrayLed FPBLPTLight FinisherCover FirstPageBottomLastPageTop FuserJamReset FuserOverTempNOT FuserUnderTemperature JamSwitch2 JamSwitch3 JamSwitch4 JamSwitch5 LCITTLight LPBFPTLight LastPageBottomFirstPageTop LoadCopiesInTopTray MainFeederLed MainPaperTrayDoor MisStrip ModuleInterlockNOT OFDLight OFULight OffsettingCatchTray OffsettingCatchTrayPosition OpStatusCode OperatorStatusCode OriginalsFaceDown OriginalsFaceUp Output OutputButton PWLight PaperTray PaperTrayButton PaperUnderPopSensor PleaseWait PopJam PopReset PopSensorLed ProcessorCover RDHLeftCover RDHMisfeed RDHMotor RDHMotorOff RDHOpen RDHReturnJam RDHRightCover RDHShingleFeed RDHSlowOffPlaten RDHStackingJam RLight RXShroudOpen Ready Reduction ReductionButton SCSILight STTTSLight SetsTooThickLed SetsTooThickToStaple ShadeOpen StandbyRelayNOT StaplerCover StaplerPresent State StatusCodeSeeInstructions TechStatusCode TopTrayFeederLed TurnAroundTransport UOTLight USShroudOpen UTPTLight UnloadOutputTray UnloadTopPaperTray X2Led X3Led X4Led X5Led X6Led X7Led] (RETURN (if fix then (Get8200 array fix) else (HELP "Unknown prop in Get8200:" prop]) (Get8200Copy [LAMBDA (array) (* ref: " 5-MAR-82 16:32") (* Get the value of property Copy from array as obtained by Read8200. Return NIL if no setting is found for Copy.) (if (EltAnd array 17 32) then 'Normal elseif (EltAnd array 17 16) then 'Darker elseif (EltAnd array 17 8) then 'Lighter]) (Get8200CopyMode [LAMBDA (array) (* ref: " 5-MAR-82 16:37") (* Get the value of property Copy Mode from array as obtained by Read8200. Return NIL if no setting is found for Copy Mode.) (if (EltAnd array 17 4) then 'OneSidedCopies elseif (EltAnd array 17 1) then 'TwoSidedCopies elseif (EltAnd array 15 4) then 'TwoSidedOriginalsAndCopies]) (Get8200Led [LAMBDA (array elt mask) (* ref: "10-MAR-82 12:34") (* Get the status of the 8200 status panel led indicated by array and elt. Return on, off, blink, or flash.) (if (EltAnd array elt mask) then 'on elseif (EltAnd array elt+1 mask) then 'blinking elseif (EltAnd array elt+2 mask) then 'flashing else 'off]) (Get8200OpStatusCode [LAMBDA (array) (* ref: "24-MAR-82 16:54") (* Return the operator status code indicated by the given 8200 status array.) (SELECTQ (for elt to 14 thereis (ELT array elt) ~=0) [1 (if (EltAnd array 1 32) then 'B08 elseif (EltAnd array 1 16) then 'B07 elseif (EltAnd array 1 8) then 'B06 else (HELP "illegal 8200 fault, byte 1:" (ELT array 1] [2 (if (EltAnd array 2 127) then 'E10 else (HELP "illegal 8200 fault, byte 2:" (ELT array 2] [3 (if (EltAnd array 3 143) then 'E10 else (HELP "illegal 8200 fault, byte 3:" (ELT array 3] [4 (if (EltAnd array 4 63) then 'E10 else (HELP "illegal 8200 fault, byte 4:" (ELT array 4] [5 (if (EltAnd array 5 16) then 'C10 elseif (EltAnd array 5 8) then 'C20 else (HELP "illegal 8200 fault, byte 5:" (ELT array 5] (6 (if (EltAnd array 6 252) then 'A10 elseif (EltAnd array 6 2) then 'A11 else 'A17)) [7 (if (EltAnd array 7 128) then 'D07 elseif (EltAnd array 7 8) then 'D03 elseif (EltAnd array 7 2) then 'D01 elseif (EltAnd array 7 1) then 'D00 else (HELP "illegal 8200 fault, byte 7:" (ELT array 7] (8 (if (EltAnd array 8 128) then 'D15 elseif (EltAnd array 8 64) then 'D14 elseif (EltAnd array 8 32) then 'D13 elseif (EltAnd array 8 16) then 'D12 elseif (EltAnd array 8 8) then 'D11 elseif (EltAnd array 8 4) then 'D10 elseif (EltAnd array 8 2) then 'D09 else 'D08)) (9 (if (EltAnd array 9 128) then 'D23 elseif (EltAnd array 9 64) then 'D22 elseif (EltAnd array 9 32) then 'D21 elseif (EltAnd array 9 16) then 'D20 elseif (EltAnd array 9 8) then 'D19 elseif (EltAnd array 9 4) then 'D18 elseif (EltAnd array 9 2) then 'D17 else 'D16)) (10 (if (EltAnd array 10 128) then 'D31 elseif (EltAnd array 10 64) then 'D30 elseif (EltAnd array 10 32) then 'D29 elseif (EltAnd array 10 16) then 'D28 elseif (EltAnd array 10 8) then 'D27 elseif (EltAnd array 10 4) then 'D26 elseif (EltAnd array 10 2) then 'D25 else 'D24)) (11 (if (EltAnd array 11 128) then 'E15 elseif (EltAnd array 11 64) then 'C30 elseif (EltAnd array 11 32) then 'F02 elseif (EltAnd array 11 16) then 'F01 elseif (EltAnd array 11 8) then 'E16 elseif (EltAnd array 11 4) then 'F02 elseif (EltAnd array 11 2) then 'F01 else 'E16)) [12 (if (EltAnd array 12 192) then 'A12 elseif (EltAnd array 12 1) then 'E15 else (HELP "illegal 8200 fault, byte 12:" (ELT array 12] [13 (if (EltAnd array 13 8) then 'A16 elseif (EltAnd array 13 4) then 'A14 elseif (EltAnd array 13 3) then 'A13 else (HELP "illegal 8200 fault, byte 13:" (ELT array 13] (14 (if (EltAnd array 14 128) then 'B03 elseif (EltAnd array 14 64) then 'B05 elseif (EltAnd array 14 32) then 'B04 elseif (EltAnd array 14 16) then 'A18 elseif (EltAnd array 14 8) then 'B02 elseif (EltAnd array 14 4) then 'B01 elseif (EltAnd array 14 2) then 'A15 else 'A19)) NIL]) (Get8200Output [LAMBDA (array) (* ref: " 5-MAR-82 16:01") (* Get the value of property Output from array as obtained by Read8200. Return NIL if no setting is found for Output.) (if (EltAnd array 15 128) then 'CollatedStapled elseif (EltAnd array 15 2) then 'Uncollated elseif (EltAnd array 15 1) then 'CollatedUnstapled]) (Get8200PaperTray [LAMBDA (array) (* ref: " 5-MAR-82 16:40") (* Get the value of property Paper Tray from array as obtained by Read8200. Return NIL if no setting is found for Paper Tray.) (if (EltAnd array 15 32) then 'Top elseif (EltAnd array 15 16) then 'Bottom]) (Get8200Reduction [LAMBDA (array) (* ref: " 5-MAR-82 16:44") (* Get the value of property Reduction from array as obtained by Read8200. Return NIL if no setting is found for Reduction.) (if (EltAnd array 16 16) then 'FullSize elseif (EltAnd array 16 8) then 98 elseif (EltAnd array 16 4) then 74 elseif (EltAnd array 16 2) then 65]) (Get8200State [LAMBDA (array) (* edited: "16-MAR-82 16:58") (* Get the value of property State from array as obtained by Read8200. Return NIL if no setting is found for State.) (CAR (NTH '(ComponentControl TechRep NotReady Ready Printing RunNotPrint LampTest Initialization) (ELT array 30)+ 1]) (Get8200TechStatusCodes [LAMBDA (array) (* edited: " 6-MAR-82 11:17") (* Return a list of the tech status codes indicated by the given 8200 status array.) "not yet implemented"]) (GetAddPaperMsg [LAMBDA (addPaper array) (* ref: "22-MAR-82 17:26") (* The "Message" function for AddPaper. Return a message that depends on which paper tray is selected.) (CONCAT "Add paper to " (SELECTQ (Get8200 array 'PaperTray) (Top "top") "bottom") " paper tray."]) (GetMessage [LAMBDA (indicator array) (* ref: "22-MAR-82 15:21") (* Get the message associated with indicator. If the value of property "Message" is a string, then return it. If the value is an atom, treat the value as a function and apply the function with "indicator" and "array" as arguments. Otherwise, return "indicator" as a string.) (PROG [(message (SELECTQ indicator (65 "65%%") (74 "74%%") (98 "98%%") (GETPROP indicator 'Message] (RETURN (if (STRINGP message) then message elseif message and (ATOM message) then (APPLY* message indicator array) else (MKSTRING indicator]) (Push8200Button [LAMBDA (button) (* edited: " 5-AUG-82 12:41") (* Send a signal to the "8200" that will have the effect of pushing the panel button specified by "button". "button" can be an integer 0,1,...,9, one of the globally specified buttons (e.g., CopyModeButton), or one of the atoms Blank, Clear, Copy, CopyMode, Output, PaperTray, Reduction, StartPrint, or StopPrint.) (if 8200Server then (REMOTEVAL <'ServerPush8200Button <'QUOTE button>> 8200Server) else (ServerPush8200Button button]) (Read8200 [LAMBDA (array) (* edited: "10-MAR-83 15:20") (* Read into array "array" a 30 byte status report from the 8200 copier. If "array" is NIL, create a 30 element array of type BYTE. Return the array.) (PROG (state) (if 8200Server then Reading8200Flg← <NIL> state←(REMOTEVAL (QUOTE (ServerRead8200)) 8200Server) (for exp in Reading8200Flg do (EVAL exp)) else state←(ServerRead8200)) (Reading8200Flg←NIL) (if (LISTP state) then (if ~array then array←(ARRAY 30 (QUOTE BYTE))) (for i to 30 as b in state do ((ELT array i)←b)) else (HELP "Error from 8200 server:" state)) (RETURN array]) (Select8200Feature [LAMBDA (feature) (* edited: "11-AUG-82 15:05") (* Select one of the features on the 8200 main control panel (e.g., OneSidedCopies).) (PROG [current (array (Read8200)) (button (OR (for b in '(OutputButton PaperTrayButton CopyButton CopyModeButton ReductionButton) thereis feature MEMB (GETPROP b 'Settings)) (for b in '(OutputButton PaperTrayButton CopyButton CopyModeButton ReductionButton) bind fix thereis (fix←(FIXSPELL feature NIL (GETPROP b 'Settings))) (if fix then feature←fix)) (HELP "Unknown button in Select8200Feature" feature] (while (Get8200 array 'State)='ComponentControl do (Read8200 array)) (current←((Get8200 array button) MEMB (GETPROP button 'Settings))) (if ~current then (HELP "No current selection for " button)) [until current:1=feature do (Push8200Button button) (current←(current::1 or (GETPROP button 'Settings] (RETURN button]) (SelectNumberOfCopies [LAMBDA (noc) (* ref: "18-JUN-82 12:50") (* Select noc number of copies on the 8200.0) (Push8200Button 'Clear) (PROG ((x noc)) (while (x GT 0) do (Push8200Button (IREMAINDER x 10)) (x←x/10]) ) (RPAQQ 8200INTERFACEMACROS (EltAnd Get8200OnOffLight)) (DECLARE: EVAL@COMPILE (PUTPROPS EltAnd MACRO ((array elt mask) (GREATERP (LOGAND (ELT array elt) mask) 0))) (PUTPROPS Get8200OnOffLight MACRO [(array elt mask) (COND ((EltAnd array elt mask) (QUOTE on)) (T (QUOTE off]) ) (PUTPROPS CopyButton Settings (Normal Darker Lighter)) (PUTPROPS CopyModeButton Settings (OneSidedCopies TwoSidedCopies TwoSidedOriginalsAndCopies)) (PUTPROPS OutputButton Settings (CollatedUnstapled CollatedStapled Uncollated)) (PUTPROPS PaperTrayButton Settings (Bottom Top)) (PUTPROPS ReductionButton Settings (FullSize 98 74 65)) (PUTPROPS A12 Message "Document handler (RDH) cover open.") (PUTPROPS APLight Message GetAddPaperMsg) (PUTPROPS AddPaper Message GetAddPaperMessage) (PUTPROPS B01 Message "B01: Two-sided copies should not be selected.") (PUTPROPS B02 Message "B02: Stapled output should not be selected.") (PUTPROPS Bottom Message "Standard Paper") (PUTPROPS CBPTDLight Message "Close bottom paper tray door") (PUTPROPS CDCLight Message "Close document cover") (PUTPROPS CollatedStapled Message "Collated and Stapled") (PUTPROPS CollatedUnstapled Message "Collated and Unstapled") (PUTPROPS CopyButton Message "Copy") (PUTPROPS CopyModeButton Message "Copy Mode") (PUTPROPS E10 Message (of a paper jam.)) (PUTPROPS FPBLPTLight Message "First page bottom, last page top") (PUTPROPS FullSize Message "Full Size") (PUTPROPS Initialization Message "The 8200 is initializing") (PUTPROPS LCITTLight Message "Load copies in top tray") (PUTPROPS LPBFPTLight Message "Last page bottom, first page top") (PUTPROPS LampTest Message "The 8200 is doing a lamp test.") (PUTPROPS NotReady Message "The 8200 is not ready.") (PUTPROPS OFDLight Message "Originals face down") (PUTPROPS OFULight Message "Place originals in RDH, face up") (PUTPROPS OneSidedCopies Message "One-Sided Copies") (PUTPROPS OutputButton Message "Output") (PUTPROPS PWLight Message "Please wait") (PUTPROPS PaperTrayButton Message "Make Copies On") (PUTPROPS Printing Message "The 8200 is Printing") (PUTPROPS RDHLeftCover Message "RDH left cover is open") (PUTPROPS RDHRightCover Message "RDH right cover is open") (PUTPROPS RLight Message "Ready") (PUTPROPS Ready Message "The 8200 is Ready") (PUTPROPS ReductionButton Message "Reduction") (PUTPROPS RunNotPrint Message "The 8200 is running but not printing") (PUTPROPS SCSILight Message "Status code, see instructions") (PUTPROPS STTTSLight Message "Sets too thick to staple") (PUTPROPS TechRep Message "The 8200 is in Tech Rep status ") (PUTPROPS Top Message "Paper Supplied by Operator") (PUTPROPS TwoSidedCopies Message "Two-Sided Copies") (PUTPROPS TwoSidedOriginalsAndCopies Message "Two-Sided Originals and Copies") (PUTPROPS UOTLight Message "Unload output tray") (PUTPROPS UTPTLight Message "Unload top paper tray") (RPAQQ 8200INTERFACERECORDS (8200Status)) [DECLARE: EVAL@COMPILE (DATATYPE 8200Status (array)) ] (/DECLAREDATATYPE (QUOTE 8200Status) (QUOTE (POINTER))) (LOAD? (QUOTE EVALSERVER.DCOM)) (RPAQQ 8200INTERFACEVARS (8200Server)) (RPAQQ 8200Server RAJAH) (DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDTOVAR NLAMA ) (ADDTOVAR NLAML ) (ADDTOVAR LAMA ) ) (DECLARE: DONTCOPY (FILEMAP (NIL (1423 20230 (Get8200 1433 . 8095) (Get8200Copy 8097 . 8583) (Get8200CopyMode 8585 . 9119 ) (Get8200Led 9121 . 9616) (Get8200OpStatusCode 9618 . 13677) (Get8200Output 13679 . 14195) ( Get8200PaperTray 14197 . 14642) (Get8200Reduction 14644 . 15186) (Get8200State 15188 . 15645) ( Get8200TechStatusCodes 15647 . 15964) (GetAddPaperMsg 15966 . 16409) (GetMessage 16411 . 17165) ( Push8200Button 17167 . 17764) (Read8200 17766 . 18592) (Select8200Feature 18594 . 19848) ( SelectNumberOfCopies 19850 . 20228))))) STOP