home *** CD-ROM | disk | FTP | other *** search
- BIOSPRN.DOC - Enhanced BiosPrinter Object
- -------------------------------------------------------
- TurboPower Software
- 4/90
-
- A new object type has been derived from the BasePrinter object in
- OPPRNLOW.PAS. This new object, BiosPrinterWithRetry, is implemented in the
- unit BIOSPRN.PAS. It differs from the plain BiosPrinter object in the
- following manner:
-
- * Supports separate printer test number and success mask information for
- printer status and printer output calls.
-
- * Can automatically retry a specific number of times or based on a timeout
- value.
-
- If an object is instantiated as a BiosPrinterWithRetry using either the Init
- or InitCustom constructors, then it operates the same as a plain BiosPrinter.
-
- BiosPrinterWithRetry adds a new constructor, InitDeluxe, defined as follows:
-
- Declaration
- constructor BiosPrinterWithRetry.InitDeluxe(LPTNumber : LPTType;
- StatusTestNumber, StatusMask,
- PutTestNumber, PutMask : Byte;
- Retries : Word;
- TimeOut : LongInt);
- Purpose
- Create a BiosPrinterWithRetry instance with custom parameters.
- Description
- Instantiates a BiosPrinterWithRetry object with complete control over
- printer test masks for printer status and character output functions, as
- well as number of automatic retries and timeout values.
-
- The TimeOut value has meaning only if Retries is zero. If Retries is zero
- and TimeOut is non-zero, then TimeOut is interpreted as the amount of time
- the instance will retry before giving up. This value is in ticks (1/18.2
- seconds). For example, a TimeOut value of 182 means to wait for the printer
- to become ready no longer than 10 seconds.
-
- The following new methods are provided by BiosPrinterWithRetry:
-
- procedure SetTestAndMaskCustom(StatusTestNo, StatusMask,
- PutTestNo, PutMask : Byte);
- {-Set the printer test and success mask for Status and Put calls}
- procedure GetTestAndMaskCustom(var StatusTestNo, StatusMask,
- PutTestNo, PutMask : Byte);
- {-Return the printer test and success mask for Status and Put calls}
- procedure SetRetryAndTimeOut(Retries : Word; TimeOut : LongInt);
- {-Set Retry and timeout values}
- procedure GetRetryAndTimeOut(var Retries : Word; var TimeOut : LongInt);
- {-Return Retry and timeout values}
-
-
- This unit was implemented based on interaction with OPRO users on PCVENB of
- Compuserve. Thanks to John Ackermann for testing this unit. Even though this
- unit appears on the BONUS disk, we are interested in feedback about this unit.