1 /*  BEGIN INCLUDE FILE:       mowse_io_data.incl.pl1                              *  *  *  *  *  *  *  *  *  *  *  *  */
  2 
  3 /****^  HISTORY COMMENTS:
  4   1) change(87-04-16,Flegel), approve(87-07-15,MCR7580),
  5      audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075):
  6      Created.
  7   2) change(87-06-23,Flegel), approve(87-06-23,MCR7649),
  8      audit(87-07-30,RBarstad), install(87-08-07,MR12.1-1075):
  9      Converted to support the use of event channels.
 10   3) change(88-10-06,Flegel), approve(88-11-16,MCR8023), audit(88-12-12,Lee),
 11      install(89-01-24,MR12.3-1012):
 12      phx21215 - Added mowse_io_data.channel_info.foreground to use to generate
 13                 events when something happens in the foreground.
 14                                                    END HISTORY COMMENTS */
 15 
 16 /* format: style4,indattr,ifthen,^indcomtxt,thendo,^indproc,^indblkcom,initcol1,declareind8,dclind4,struclvlind3,comcol55 */
 17 dcl mowse_io_data_ptr      ptr;
 18 dcl 01 mowse_io_data       based (mowse_io_data_ptr),
 19        02 open_descrip     char (19) var,
 20        02 iocb_ptr         ptr aligned,               /* mowse_tty iocb pointer */
 21        02 default_iocb_ptr ptr aligned,               /* mowse_i/o iocb pointer */
 22        02 attach_descrip   char (256) var,            /* Attach description */
 23        02 old_modes        char (256) unal,           /* Modes on previous iocb */
 24 
 25        02 current_modes    char (256) unal,           /* Current mode settings */
 26        02 WSTERM_modes     (11) char (1),             /* Encoded modes for WSTERM */
 27        02 cv_trans_struc_ptr ptr,                     /* Conversion table pointer */
 28 
 29        02 info_ptr         ptr,                       /* Application control info seg */
 30        02 mcb_ptr          ptr,                       /* Internal MCB to MOWSE */
 31        02 sleepers         ptr,                       /* Queue of sleeping applications */
 32        02 dozers           fixed bin (35),            /* Number of unhandled sleeper wakeups */
 33 
 34        02 ws,                                         /* Vidoe system control */
 35           03 flags,
 36              04 trace      bit (1) unal,
 37              04 debug      bit (1) unal,
 38              04 mark_set   bit (1) unal,
 39              04 video_mode bit (1) unal,              /* State (on/off) of video */
 40              04 more_input bit (1) unal,              /* Last read unfinished */
 41              04 pad        bit (31) unal,
 42           03 read_count    fixed bin (17),            /* count of unfinished read commands sent */
 43           03 ips_mask      bit (36) aligned,
 44 
 45        02 sus_data,                                   /* sus_ information */
 46           03 sus_entry     ptr,                       /* Saved sus_ signal handler */
 47           03 activated     bit (1) unal,              /* If sus_ has been signaled */
 48           03 pad           bit (35) unal,
 49 
 50        02 channel_info,                               /* Event channel info */
 51           03 process_id    bit (36) aligned,          /* This process */
 52           03 wake_info,
 53              04 wake_map   (0:127) bit (1) unal,      /* Break chars */
 54              04 pad        bit (16) unal,
 55           03 user_input    like wait_info,            /* Input wait channel */
 56           03 packet_transmitter like wait_info,       /* Write events */
 57           03 packet_receiver,                         /* hcs_ events */
 58              04 channel    fixed bin (71),            /* Channel id */
 59           03 packet_dispatcher,                       /* Dispatch channels */
 60              04 sync_channel fixed bin (71),          /* Process when quiet */
 61              04 async_channel fixed bin (71),         /* Process NOW! */
 62           03 foreground,                              /* MF - phx21215 - read/write_status, get_event_channel info */
 63              04 channel    fixed bin (71),            /* Event channel */
 64 
 65        02 debug_iocb_ptr   ptr,                       /* Debug file IOCB */
 66        02 trace_iocb_ptr   ptr,                       /* Trace file IOCB */
 67 
 68        02 timer_info       (8),
 69           03 wakeup        fixed bin (71),            /* Seconds from last in queue */
 70           03 timer_id      fixed bin,                 /* Who owns this wakeup */
 71 
 72        02 switches,                                   /* Control switches */
 73           03 quit_enable   bit (1) unal,              /* Quit processing state */
 74           03 reset_write   bit (1) unal,              /* resetwrite requested */
 75           03 disconnect_active bit (1) unal,          /* Disconnection occuring */
 76           03 rs_pending    (2) bit (1) unal,          /* Reset occuring */
 77           03 ds_pending    (2) bit (1) unal,          /* Disconnect occuring */
 78           03 br_pending    bit (1) unal,              /* Break occurring */
 79           03 brk_pending   bit (1) unal,              /* Break occuring (quit) */
 80           03 info_stored   bit (1) unal,              /* Info segment stored */
 81           03 connect_active bit (1) unal,             /* Connection in progress */
 82           03 start_issued  bit (1) unal,              /* Indicates start order pending */
 83           03 pad           bit (24) unal,
 84 
 85        02 task,
 86           03 active        (0:2) bit (1) unal,        /* Tasks which are active */
 87           03 pad           bit (33) unal,
 88 
 89        02 user_input,                                 /* User_i/o input data */
 90           03 in            fixed bin (21),            /* Next free slot in repository */
 91           03 out           fixed bin (21),            /* Head of data */
 92           03 queue         (0:4095) char (1),         /* Repository */
 93 
 94        02 l_dat            (0:1),                     /* Local data message queue */
 95           03 in_ptr        ptr,                       /* Incoming messages */
 96           03 out_ptr       ptr,                       /* Outgoing messages */
 97 
 98        02 r,                                          /* Receiver data */
 99           03 eop           char (1),                  /* End of packet character */
100           03 sop           char (1),                  /* Start of packet character */
101           03 esc           (0:2) char (1),            /* 3 escape characters */
102           03 esc_count     fixed bin,                 /* Number of escaped chars in received packet */
103           03 asn           (0:1) fixed bin (3),       /* Acknowledge sequence number */
104           03 dat           (0:1, 0:3) char (124) var, /* Data queues */
105           03 pkt           (0:2) char (129) var,      /* Packet queue */
106           03 pktin         fixed bin,                 /* Next packet character in */
107           03 pktout        fixed bin,                 /* Head of packet */
108           03 psn           (0:1) fixed bin,           /* SN for each channel */
109           03 esckey        bit (9) unal,              /* Decoding 2nd character escape */
110           03 ignoring      (0:1) bit (1) unal,        /* Ignore data during synchronization */
111           03 pad           bit (25) unal,
112 
113        02 s,                                          /* Sender data */
114           03 eop           char (1),                  /* End of packet character */
115           03 sop           char (1),                  /* Start of packet character */
116           03 esc           (0:2) char (1),            /* 3 escape characters */
117           03 dat           (0:1, 0:3) char (124) var, /* Data queue */
118           03 psn           (0:1) fixed bin (3),       /* Packet sequence number */
119           03 lasn          (0:1) fixed bin (3),       /* Last ack sent */
120           03 nasn          (0:1) fixed bin (3),       /* Next ack to be sent */
121           03 escreq        (0:255) bit (1) unal,      /* Characters to be escaped */
122           03 pad           bit (32) unal;
123 
124 /* Wait channel control struncture */
125 
126 dcl 01 wait_info           based,
127        02 channel          fixed bin (71) aligned,    /* Channel ID */
128        02 count            fixed bin,                 /* Waiting count */
129        02 flags,
130           03 transmitted   bit (1) unal,              /* Wakeup already generated */
131           03 pad           bit (35) unal;
132 
133 /*  END INCLUDE FILE:         mowse_io_data.incl.pl1                              *  *  *  *  *  *  *  *  *  *  *  *  */