DIRECTORY RS232CEnvironment USING [AutoRecognitionOutcome, CharLength, CompletionHandle, Correspondent, LineSpeed, LineType, Parity, PhysicalRecord, PhysicalRecordHandle, StopBits, SyncChar, SyncCount]; RS232C: DEFINITIONS = BEGIN Create: PROCEDURE [lineNumber: CARDINAL, lineType: LineType] RETURNS [ChannelHandle]; Get: PROCEDURE [channel: ChannelHandle, rec: PhysicalRecordHandle] RETURNS [CompletionHandle]; Put: PROCEDURE [channel: ChannelHandle, rec: PhysicalRecordHandle] RETURNS [CompletionHandle]; TransferWait: PROCEDURE [channel: ChannelHandle, event: CompletionHandle] RETURNS [byteCount: CARDINAL, status: TransferStatus]; Delete: PROCEDURE [channel: ChannelHandle]; Suspend: PROCEDURE [channel: ChannelHandle, class: OperationClass]; Restart: PROCEDURE [channel: ChannelHandle, class: OperationClass]; GetStatus: PROCEDURE [channel: ChannelHandle] RETURNS [stat: DeviceStatus]; StatusWait: PROCEDURE [channel: ChannelHandle, stat: DeviceStatus] RETURNS [newstat: DeviceStatus]; AutoRecognitionWait: PROCEDURE [channel: ChannelHandle] RETURNS [outcome: AutoRecognitionOutcome]; GetLineCount: PROCEDURE RETURNS [numberOfLines: CARDINAL]; TransmitNow: PROCEDURE [channel: ChannelHandle, event: CompletionHandle] RETURNS [byteCount: CARDINAL, status: TransferStatus]; SendBreak: PROCEDURE [channel: ChannelHandle]; SetParameter: PROCEDURE [channel: ChannelHandle, parameter: Parameter]; SetLineType: PROCEDURE [channel: ChannelHandle, lineType: LineType]; ChannelAlreadyExists: ERROR; ChannelSuspended: ERROR; InvalidLineNumber: ERROR; InvalidParameter: ERROR; NoRS232CHardware: ERROR; SendBreakIllegal: ERROR; UnimplementedFeature: ERROR; LineType: TYPE = RS232CEnvironment.LineType; ChannelHandle: TYPE [2]; AutoRecognitionOutcome: TYPE = RS232CEnvironment.AutoRecognitionOutcome; CompletionHandle: TYPE = RS232CEnvironment.CompletionHandle; OperationClass: TYPE = {input, output, other, all}; PhysicalRecordHandle: TYPE = RS232CEnvironment.PhysicalRecordHandle; PhysicalRecord: TYPE = RS232CEnvironment.PhysicalRecord; TransferStatus: TYPE = { success, dataLost -- (caused by input buffer overrun --, deviceError, frameTimeout, checksumError, parityError, asynchFramingError -- (i.e. stop bit(s) missing) --, invalidChar, invalidFrame, aborted, disaster}; DeviceStatus: TYPE = RECORD [ statusAborted: BOOLEAN, dataLost: BOOLEAN, breakDetected: BOOLEAN, --latched clearToSend, dataSetReady, carrierDetect: BOOLEAN, ringHeard: BOOLEAN, --latched version of EIA RS-232-C Ring Indicator ringIndicator: BOOLEAN, deviceError: BOOLEAN]; Parameter: TYPE = RECORD [ SELECT type: ParameterType FROM charLength => [charLength: CharLength], correspondent => [correspondent: Correspondent], dataTerminalReady => [dataTerminalReady: BOOLEAN], frameTimeout => [frameTimeout: CARDINAL], latchBitClear => [latchBitClearMask: LatchBitClearMask], lineSpeed => [lineSpeed: LineSpeed], parity => [parity: Parity], requestToSend => [requestToSend: BOOLEAN], stopBits => [stopBits: StopBits], syncChar => [syncChar: SyncChar], syncCount => [syncCount: SyncCount], ENDCASE]; ParameterType: TYPE = {charLength, correspondent, dataTerminalReady, frameTimeout, latchBitClear, lineSpeed, parity, requestToSend, stopBits, syncChar, syncCount}; CharLength: TYPE = RS232CEnvironment.CharLength; Correspondent: TYPE = RS232CEnvironment.Correspondent; LatchBitClearMask: TYPE = DeviceStatus; LineSpeed: TYPE = RS232CEnvironment.LineSpeed; Parity: TYPE = RS232CEnvironment.Parity; StopBits: TYPE = RS232CEnvironment.StopBits; SyncCount: TYPE = RS232CEnvironment.SyncCount; SyncChar: TYPE = RS232CEnvironment.SyncChar; END. RS232C.Mesa Copyright c 1985 by Xerox Corporation. All rights reserved. LastEdited: January 22, 1981 2:14 PM By: Danielson Russ Atkinson (RRA) February 2, 1985 2:56:02 pm PST Beach, February 27, 1985 10:53:39 am PST Interface Definitions RS232C-specific procedures SIGNALs and ERRORs Interface type definitions latched: caused by arrival of data with no input buffer allocated correspond to signals in EIA RS-232-C Spec CHANGE LOG Time: 1978 By: Victor Schwartz Action: Created file Time: October 1979 By: Victor Schwartz Action: Pre-Teak LOG entries removed Time: June 20, 1980 2:51 PM By: Victor Schwartz Action: Pre-Amargosa LOG entries removed. Time: June 20, 1980 2:51 PM By: Victor Schwartz Action: Remove Abort and ChannelDoesNotExist. Change semantics of Suspend/Restart. Time: January 20, 1981 12:43 PM By: Danielson Action: Add procedure GetLineCount to allow client to obtain count of total number of RS232C lines. Added deviceError to deviceStatus to allow reporting of terminal device errors. Κβ˜codešœ ™ Kšœ Οmœ1™