-- Em3270ComDefs:  3270 Communication Description

-- Revised for Star 21.0 by Lui:        29-Mar-82 10:53:58 
-- Owner:  Lui

-- Overview: 
--  Em3270ComDefs provides the nescessary types and procedures needed to establish communication with an IBM Host Controller 


DIRECTORY
  Em3270PrivDefs USING [LptComData, LptCmdData, MDTStream],
  IconDefs       USING [Icon], 
  SchemaDefs     USING [Lschema],
  Stream         USING [SubSequenceType];
  

Em3270ComDefs: DEFINITIONS = 
BEGIN OPEN Em3270PrivDefs; 

-- =======================
--     Constants
-- =======================
 
-- =======================
--     Public Types 
-- =======================
AbortOpen: ERROR;               

 -- ======================= 
--     Public Procedures
-- =======================
DoStreamPut: PUBLIC PROC [my: LptComData, mdtStream: MDTStream, sstType: Stream.SubSequenceType];
-- DoStreamPut sends a linked list of data to the host.
-- mdtStream contains a pointer to the head of the list. and the lastCharPlusOne in the last block of the list.
-- readModified3270, testRequest3270, and status3270 are the only SST currently supported.  

StartCom: PUBLIC PROC [lschemaWn: SchemaDefs.Lschema, icon: IconDefs.Icon, lptCmdData: LptCmdData] RETURNS [comHandle: LptComData];
-- Initialize instance data.
-- Creates a communication stream to the specified IBM host controller.
-- Fork a process to continously poll host for data.
-- Fork a process to continously poll the stream for attentions.

ForkComProcesses: PUBLIC PROC[my: LptComData];
-- This procedure forks 2 processes. Get and WaitAttention.
-- The procedure ForkComProcesses should only be called after the 3270Window have been created because the two forked processes calles Em3270StatusDefs indirectly, which depends on a window schema.

EndCom: PUBLIC PROC [my: LptComData];
-- EndCom will be called by Em3270Pack when the user bugs close.
-- It will terminate delete the stream to host, and free up all communication related spaces allocated to the given instance of the 3270.
-- The processes forked by Start are joined. 

-- ======================= 
--     Private Procedures
-- =======================


-- =======================
--     Modules
-- =======================
Em3270ComPack: PRIVATE PROGRAM;




END.    -- of Em3270ComDefs 
LOG
14-Dec-81 16:47:38    - Lui       - Created
 1-Feb-82 11:11:00    - Lui       - Added icon to CreateStream
 3-Feb-82 10:43:52    - Lui       - Added lschemaWn to CreateStream
10-Feb-82 16:49:06    - Lui       - Added lptData to DoStreamGet
12-Feb-82 14:39:34    - Lui       - Added StartCom
18-Feb-82 15:14:41    - Lui       - Added Em3270PrivDefs
29-Mar-82 10:54:08    - Lui       - Added ForkComProcesses