TTYPortFace.mesa
Copyright (C) 1980, 1981, 1986 by Xerox Corporation. All rights reserved.
Tim Diebert: November 16, 1985 6:29:30 pm PST
Bill Jackson (bj) July 31, 1986 0:23:01 am PDT
DIRECTORY
TTYPortEnvironment USING [CharacterLength, LineSpeed, Parity, StopBits];
TTYPortFace: CEDAR DEFINITIONS ~ {
Copied Types
CharacterLength: TYPE ~ TTYPortEnvironment.CharacterLength;
LineSpeed: TYPE ~ TTYPortEnvironment.LineSpeed;
Parity: TYPE ~ TTYPortEnvironment.Parity;
StopBits: TYPE ~ TTYPortEnvironment.StopBits;
Types
DeviceStatus: TYPE ~ RECORD [
dataTerminalReady: BOOLEAN,
readyToGet: BOOLEAN,
readyToPut: BOOLEAN,
requestToSend: BOOLEAN
];
Parameter: TYPE ~ RECORD [
SELECT parameter: * FROM
characterLength => [characterLength: CharacterLength],
clearToSend => [clearToSend: BOOLEAN],
dataSetReady => [dataSetReady: BOOLEAN],
lineSpeed => [lineSpeed: LineSpeed],
parity => [parity: Parity],
stopBits => [stopBits: StopBits],
ENDCASE
];
TransferStatus: TYPE ~ {
success,
parityError,
asynchFramingError,
dataLost,
breakDetected,
notReady
};
Procs
GetCommand: PROC [lineNumber: CARDINAL] RETURNS [data: CHAR, stat: TransferStatus];
GetLineCount: PROC RETURNS [lineCount: CARDINAL];
GetStatus: PROC [lineNumber: CARDINAL] RETURNS [stat: DeviceStatus];
Off: PROC [lineNumber: CARDINAL];
On: PROC [lineNumber: CARDINAL, mask: UNSPECIFIED];
PutCommand: PROC [lineNumber: CARDINAL, data: CHARACTER] RETURNS [stat: TransferStatus];
SendBreak: PROC [lineNumber: CARDINAL];
SetParameter: PROC [lineNumber: CARDINAL, parameter: Parameter];
}...