TTYPort.mesa
Copyright (C) Xerox Corporation 1982, 1985. All rights reserved.
last edited:
11-Aug-81 11:49:53 By: Luniewski
27-Aug-82 11:41:57 By: Loretta
5-Apr-83 21:21:26 By: Johnsson
Tim Diebert: November 16, 1985 7:42:24 pm PST
DIRECTORY
TTYPortEnvironment USING [CharacterLength, LineSpeed, Parity, StopBits];
TTYPort: DEFINITIONS = BEGIN
Procedures, alphabetically
CharsAvailable: PROCEDURE [channel: ChannelHandle] RETURNS [number: CARDINAL];
Create: PROCEDURE [lineNumber: CARDINAL] RETURNS [ChannelHandle];
Delete: PROCEDURE [channel: ChannelHandle];
Get:
PROCEDURE [channel: ChannelHandle]
RETURNS [data: CHARACTER, status: TransferStatus];
GetStatus: PROCEDURE [channel: ChannelHandle] RETURNS [stat: DeviceStatus];
Put:
PROCEDURE [channel: ChannelHandle, data:
CHARACTER]
RETURNS [status: TransferStatus];
Quiesce: PROCEDURE [channel: ChannelHandle];
SendBreak: PROCEDURE [channel: ChannelHandle];
SetParameter: PROCEDURE [channel: ChannelHandle, parameter: Parameter];
StatusWait:
PROCEDURE [channel: ChannelHandle, stat: DeviceStatus]
RETURNS [newstat: DeviceStatus];
ChannelAlreadyExists, ChannelQuiesced, InvalidLineNumber, NoTTYPortHardware:
ERROR;
nullChannelHandle: ChannelHandle = NIL;
ChannelHandle: TYPE = REF ChannelStatus;
ChannelStatus: TYPE;
TransferStatus:
TYPE = {
success, parityError, asynchFramingError, dataLost, breakDetected, aborted,
abortedByDelete};
DeviceStatus:
TYPE =
RECORD [
aborted: BOOLEAN,
breakDetected: BOOLEAN, --latched
dataTerminalReady: BOOLEAN,
readyToGet: BOOLEAN,
readyToPut: BOOLEAN,
requestToSend: BOOLEAN];
Parameter:
TYPE =
RECORD [
SELECT parameter: * FROM
breakDetectedClear => [breakDetectedClear: BOOLEAN],
characterLength => [characterLength: CharacterLength],
clearToSend => [clearToSend: BOOLEAN],
dataSetReady => [dataSetReady: BOOLEAN],
lineSpeed => [lineSpeed: LineSpeed],
parity => [parity: Parity],
stopBits => [stopBits: StopBits],
ENDCASE];
CharacterLength: TYPE = TTYPortEnvironment.CharacterLength;
LineSpeed: TYPE = TTYPortEnvironment.LineSpeed;
Parity: TYPE = TTYPortEnvironment.Parity;
StopBits: TYPE = TTYPortEnvironment.StopBits;