-- Copyright (C) 1985 by Xerox Corporation. All rights reserved. 
-- PrinterStatusMessagesImpl.mesa
-- Last revised by Jacks on:   7-Nov-85 18:00:41

DIRECTORY
  PrinterStatusMessages USING [Key, totalKeys],
  PSKMessages USING [Name],
  XMessage USING [
    AllocateMessages, Handle, MsgEntry, MsgID, RegisterMessages],
  XString USING [FromSTRING];

PrinterStatusMessagesImpl: PROGRAM
  IMPORTS PSKMessages, XMessage, XString 
  EXPORTS PrinterStatusMessages =
  BEGIN
  
  MsgEntry: TYPE = RECORD [
    key: PrinterStatusMessages.Key,
    msg: LONG STRING,
    id: XMessage.MsgID,
    translatable: BOOLEAN ← TRUE]; 
  
  InitMessages: PUBLIC PROCEDURE RETURNS [printerStatusMsgs: XMessage.Handle] =
    BEGIN
    entries: ARRAY [0..PrinterStatusMessages.totalKeys) OF MsgEntry = [
      [mAsterisk, "*"L, 5],
      -- Added for Raven:
      [mOk, "Okay"L, 10],
      [mC3CheckPaperHandle, "C3 - Please check paper handle"L, 15],
      [mC4CheckPaperCassette, "C4 - Please check paper cassette"L, 20],
      [mE2ClearPaperPath, "E2 - Please clear paper path"L, 25],
      [mE3ClearPaperPath, "E3 - Please clear paper path"L, 30],
      [mE4EmptyOutputTray, "E4 - Please empty output tray"L, 35],
      [mE5CloseDoor, "E5 - Please close door"L, 40],
      [mF5EmptyOutputTray, "F5 - Please empty stacker tray"L, 45],
      [mJ1AddToner, "J1 - Please add dry imager"L, 50],
      [mAboutToDozeOff, "Low power mode"L, 55],
      [mL1PleaseWait, "L1 - Warming, please wait"L, 60],
      [mL2CallSysAdmin, 
        "L2 - Image fault, please call System Administrator"L, 65],
      [mL4CallSysAdmin, 
        "L4 - Command status fault, please call System Administrator"L, 70],
      [mPressOnLineKey, "Off line - Press on line key"L, 75],
      -- Added for FX3500:
      [mC3CloseDrawer, "C3 - Please close drawer"L, 80],
      [mC4ClearPaperPath, "C4 - Please clear paper path"L, 85],
      [mE3PushDeliverKey, 
        "E3 - Please push deliver key & clear paper path"L, 90],
      [mE4PushDeliverKey, 
        "E4 - Please push deliver key & clear paper path"L, 95],
      [mP1CallSysAdmin, "P1 - Please call System Administrator"L, 100],
      [mP2CallSysAdmin, "P2 - Please call System Administrator"L, 105],
      [mP3CallSysAdmin, "P3 - Please call System Administrator"L, 115],
      [mP4CallSysAdmin, "P4 - Please call System Administrator"L, 120],
      [mU1CallSysAdmin, "U1 - Please call System Administrator"L, 125],
      [mU2CallSysAdmin, "U2 - Please call System Administrator"L, 130],
      [mU3CallSysAdmin, "U3 - Please call System Administrator"L, 135],
      [mU4CallSysAdmin, "U4 - Please call System Administrator"L, 140],
      [mU5CallSysAdmin, "U5 - Please call System Administrator"L, 145],
      [mU6CallSysAdmin, "U6 - Please call System Administrator"L, 150],
      [mF2CallSysAdmin, 
        "F2 - Image fault, please call System Administrator"L, 155],
      [mF4CallSysAdmin, 
        "F4 - Command status fault, please call System Administrator"L, 160],
      [mPleaseWait, "Please wait"L, 165],
      [mAddA4Paper, "Please add A4 paper"L, 170],
      [mAddB4Paper, "Please add B4 paper"L, 175],
      [mAddB5Paper, "Please add B5 paper"L, 180],
      [mAddPaper, "Please add paper"L, 185],
      [mUnknownCallSysAdmin, 
        "Error - Please call System Administrator"L, 190],
      -- Added for Fax:
      [mNoRS232CHardware, 
        "RS232 hardware error, please call System Administrator"L, 195],
      [mLineNumberInvalid, 
        "RS232 communication line number provided by clearinghouse server is incorrect, please call System Administrator"L, 200],
      [mLineUnavailable, 
        "RS232 communication line number provided by clearinghouse server is not available, please call System Administrator"L, 205],
      [mFaxDiagFailed, 
        "Diagnostic test failed, please call System Administrator"L, 210],
      [mFaxOffLine, 
        "Off line, please call System Administrator to check power supply and RS232 cable"L, 215],
      [mPlacePhoneOnHook, 
        "Please place telephone receiver on hook"L, 220],
      [mFaxClearPaperPath, "Please clear paper path"L, 225],
      [mFaxInUse, "Fax in use"L, 230],
      [mFaxError, "Fax error, please call System Administrator"L, 235],
      -- Added for Banshee:
      [mA1ClearDocumentFeeder, 
        "A1 - Please clear document feeder"L, 240],
      [mC4AddPaper, "C4 - Please add paper"L, 245],
      [mE4ClearPaperPath, "E4 - Please clear paper path"L, 250],
      [mE5ClosePaperPath, "E5 - Please close paper path"L, 255],
      [mC3CheckPaperCassette, "C3 - Please check paper cassette"L, 260],
      [mUnloadPageSeqTray, "Please unload page sequence tray"L, 265],
      [mAddDryImager, "Please add dry imager"L, 270],
      [mNeedServiceCallSysAdmin, 
        "Printer needs service, please call System Administrator"L, 275],
      [mCopyMode, "Printer in copy mode, please wait"L, 280],
      [mBansheeRepairMode, 
        "Printer in repair mode, queuing and printing have been stopped"L, 285],
      [mBansheeOffline, 
        "Off line - Press offline again to resume"L, 290],
      [mP1ImageFault, 
        "P1 - Image fault, please call System Administrator"L, 295],
      [mP2ImageFault, 
        "P2 - Image fault, please call System Administrator"L, 300],
      [mP4CommFault, 
        "P4 - Communication fault, please call System Administrator"L, 305],
      [mP5SequenceFault, 
        "P5 - Sequence fault, please call System Administrator"L, 310],
      -- Added for FEPS9700:
      [mTargetBusy, "Target Print Service busy"L, 315],
      [mTargetInsufficientSpace, 
        "Insufficient space on Target Print Service"L, 320],
      [mDocTooLarge, "Document too large"L, 325],
      [mPaperSizeUnavailable, "Requested paper size unavailable"L, 330],
      [mTargetUnavailable, "Target Print Service unavailable"L, 335],
      [mTargetQueuingDisabled, 
        "Queuing disabled at Target Print Service"L, 340],
      [mTargetQueueFull, "Target Print Service queue full"L, 345],
      [mNoRouteToTarget, 
        "No network route to Target Print Service"L, 350],
      [mTargetNotResponding, 
        "Target Print Service not responding"L, 355],
      [mTransmissionMedium, "Transmission medium problem"L, 360],
      [mConnectionError, "Connection error"L, 365],
      [mTransferError, "Transfer error"L, 370],
      [mUnknownProblem, "Unknown problem"L, 375],
      -- Added for D1:
      [mCheckPaperCassette, "Please check paper cassette"L, 380],
      [mProcessorOverRun, 
        "Processor OverRun - 1, please call System Administrator"L, 385],
      [mProcessorOverRun2, 
        "Processor OverRun - 2, please call System Administrator"L, 390],
      [mE1ClearPaperPath, "E1 - Please clear paper path"L, 395],
      [mAddA5Paper, "Please add A5 paper"L, 400],
      [mAddPostalCardPaper, "Please add Postal Card paper"L, 405],
      [mAddLetterPaper, "Please add Letter paper"L, 410]
      ];
     
    messages: ARRAY [0..PrinterStatusMessages.totalKeys) OF XMessage.MsgEntry ← NULL;
    FOR i: CARDINAL IN [0..PrinterStatusMessages.totalKeys) DO
      messages[i]  ← [
        msgKey: ORD[entries[i].key], msg: XString.FromSTRING[entries[i].msg],
        translationNote: NIL, translatable: entries[i].translatable, 
	type: userMsg, id: entries[i].id];
      ENDLOOP;
    printerStatusMsgs ← XMessage.AllocateMessages[
      applicationName: PSKMessages.Name[printerStatus], 
      maxMessages: PrinterStatusMessages.totalKeys, 
      clientData: NIL, proc: NIL];
    XMessage.RegisterMessages[
      h: printerStatusMsgs, messages: DESCRIPTOR[messages],
      stringBodiesAreReal: FALSE];
    END; -- of InitMessages
    
   END. -- of PrinterStatusMessagesImpl
   
  LOG [Time - Person - Action]
23-Jul-85 15:32:17 - Jacks - Created. 
30-Jul-85 17:00:12 - Jacks - Fixed catch phrase on MsgOps.DomainsFromFile; hardcoded Message IDs.
 5-Nov-85 15:19:41 - Jacks - Removed RegisterMsgs and GetHandle; made InitMessages public.
 7-Nov-85 18:00:27 - Jacks - Removed periods from end of all msgs.