-- RS232CManager.mesa (last edited by: Danielson on: January 16, 1981  4:42 PM) --
DIRECTORY
  Dialup USING [RetryCount],
  RS232C USING [ChannelHandle, LineType, LineSpeed, AutoRecognitionOutcome];

RS232CManager: DEFINITIONS =
  BEGIN
  -- Procedures
  ReserveChannel: PROCEDURE [
    portID: CARDINAL, useType: ChannelUseType,
    preemptOthers, preemptMe: ReserveType, commParamHandle: CommParamHandle]
    RETURNS [RS232C.ChannelHandle];
  AwaitAutoRecognition: PROCEDURE [RS232C.ChannelHandle]
    RETURNS [RS232C.AutoRecognitionOutcome];
  RedefineChannelUse: PROCEDURE [
    channel: RS232C.ChannelHandle, useType: ChannelUseType,
    preemptOthers, preemptMe: ReserveType];
  ReleaseChannel: PROCEDURE [RS232C.ChannelHandle];
  DescribeCommEquipment: PROCEDURE [
    portID: CARDINAL, commParamHandle: CommParamHandle];
  GetCommEquipmentDescription: PROCEDURE [portID: CARDINAL]
    RETURNS [CommParamObject];
  -- Types
  ChannelUseType: TYPE = {oisCommunication, foreignDeviceAccess};
  ReserveType: TYPE = {preemptNever, preemptAlways, preemptInactive};
  CommParamHandle: TYPE = POINTER TO CommParamObject;
  -- The following types help describe the communication equipment (modems) being used.  They are too restrictive for multi-speed and multi-mode modems.
  CommParamObject: TYPE = RECORD [
    duplex: CommDuplex,
    lineType: RS232C.LineType,
    lineSpeed: RS232C.LineSpeed,
    accessDetail:
      SELECT netAccess: NetAccess FROM
	directConn => NULL,
	dialConn => [
	  dialMode: DialMode,
	  dialerNumber: CARDINAL,
	  retryCount: Dialup.RetryCount],
	ENDCASE];
  CommDuplex: TYPE = {full, half};
  NetAccess: TYPE = {directConn, dialConn};
  DialMode: TYPE = {manual, auto};
  ReserveFailedReason: TYPE = {
    noRS232CHardware, unimplementedFeature, inUse, inconsistentParams};
  -- Signals and Errors
  ReserveFailed: ERROR [reason: ReserveFailedReason];
  NonrecoverableSoftwareFailure: ERROR;
  END.
LOG
Time: August 7, 1978  11:52 AM	By: Garlick	Action: Created file
Time: June 26, 1980  2:11 PM	By: Schwartz	Action: Removed  pre-Amargosa log entries.
Time: June 26, 1980  2:12 PM	By: Schwartz	Action: Added ChannelHandle parameter to DefineIdleChannelUse, and changed ReserveFailedReason "noAutoRecognition" to "unimplementedFeature".
Time: August 1, 1980  5:33 PM	By: BLyon	Action: changed netNumber in from CARDINAL to SpecialSystem.NetworkNumber.
Time: August 4, 1980  4:37 PM	By: Schwartz	Action: Removed references to netNumber.
Time: January 16, 1981  4:32 PM	By: Danielson	Action: Removed DefineIdleChannelUse and added dailerNumber to allow multiple dialers.