1 08/25/87  hasp_workstation_
  2 
  3 Syntax:  hasp_workstation_ -control_args
  4 
  5 
  6 Function: The hasp_workstation_ I/O module performs record-oriented
  7 I/O to a single device of a remote terminal that supports the HASP
  8 communications protocol.
  9 
 10 Entry points in this module are not called directly by users; rather,
 11 the module is accessed through the I/O system.
 12 
 13 
 14 This module must be attached to a subchannel of a communications
 15 channel configured to use the HASP ring 0 multiplexer.  (See the
 16 description of the HASP multiplexer in MAM Communications.)
 17 
 18 The module is designed primarily for use by the Multics I/O daemon.  It
 19 expects output for the operator's console and line printers to have
 20 been properly formatted by the prt_conv_ module.
 21 
 22 
 23 Control arguments:
 24    The following control arguments are optional, with the exception of
 25    -comm, -device, and -tty;
 26 -comm hasp
 27    is required for compatibility with other I/O modules used by the I/O
 28    daemon.
 29 -device STR
 30    specifies the type of device for this attachment.  STR must be one
 31    of "teleprinter", "reader", "printer", or "punch".  The type
 32    specified by this control argument must match the type of device
 33    attached to the channel name defined by -tty.
 34 -ebcdic
 35    is accepted for compatibility with other I/O modules used by the I/O
 36    daemon, but is ignored by this I/O module.
 37 
 38 
 39 -forms STR
 40    specifies the type of forms to be used to print output directed
 41    through this attachment.  STR is an arbitrary string of, at most, 32
 42    characters whose interpretation is site dependent.  This control
 43    argument is only permitted for a line printer.  (Default is the null
 44    string.)
 45 -inside_page STR
 46    specifies the sequence of carriage control operations to be used to
 47    move to the top of the next "inside" page.  An "inside" page is the
 48    page on which the I/O daemon prints head sheets.  This control
 49    argument is only permitted for a line printer.  The format of STR is
 50    described under "Carriage control specifications" below.  (Default
 51    is "c1".)
 52 
 53 
 54 -no_block
 55    prevents going blocked on any IO with the channel.
 56 -outside_page STR
 57    specifies the sequence of carriage control operations to be used to
 58    move to the top of the next "outside" page.  An "outside" page is
 59    the page on which the I/O daemon prints tail sheets.  This control
 60    argument is only permitted for a line printer.  The format of STR is
 61    described under "Carriage control specifications" below.  (Default
 62    is "c1".)
 63 -physical_line_length N, -pll N
 64    is accepted for compatibility with other I/O modules used by the I/O
 65    daemon, but is ignored by this I/O module.
 66 
 67 
 68 -suppress_dial_manager
 69    suppresses calls to dial_manager_.
 70 -top_of_page STR
 71    specifies the sequence of carriage control operations to be used to
 72    move to the top of the next page.  This control argument is only
 73    permitted for a line printer.  The format of STR is described under
 74    "Carriage control specifications" below.  (Default is "c1".)
 75 -terminal_type STR, -ttp STR
 76    is used to define the character set used by the remote terminal.
 77    STR must be the name of a terminal type defined in the site's
 78    Terminal Type Table (TTT).  See "Character set specification" below
 79    for more information, including the default character set used if
 80    this control argument is omitted.
 81 
 82 
 83 -tty channel_name
 84    specifies the communications channel to be attached.  The channel
 85    must be a subchannel of a HASP multiplexed channel (eg:
 86    a.h014.prt3).
 87 
 88 
 89 Open operation;
 90 The hasp_workstation_ I/O module supports the sequential_input,
 91 sequential_output, and sequential_input_output opening modes.
 92 
 93 
 94 Write record operation;
 95 The write_record entry converts the supplied data record from ASCII to
 96 the remote terminal's character set, converts the supplied slew control
 97 into the proper carriage control sequences for line printer
 98 attachments, performs data compression, and transmits the record to the
 99 HASP multiplexer.
100 
101 The structure and the referenced constants supplied to this I/O module
102 are contained in the include file terminal_io_record.incl.pl1.
103 
104 
105 Read record operation;
106 The read_record entry returns a single record from the device,
107 basically performing the inverse of the functions described for the
108 write_record operation.
109 
110 The structure and the referenced constants this I/O module returns in
111 the supplied buffer are contained in terminal_io_record.incl.pl1.
112 
113 
114 List of control operations;
115    This I/O module supports the following control operations;
116 assign_to_user_process
117    assigns channel to user identified by processid pointed to by
118    info_ptr.  The processid is a 36 bit aligned string.  This is
119    reserved for use by the Initializer process.
120 detach_user_process
121    takes channel away from user.  The detachflag pointed to by
122    info_ptr controls disposition of the channel.  If 0, the
123    channel is made available for other users.  If not 0, the
124    channel is placed in a hungup state.  This is reserved for use
125    by the Initializer process.
126 
127 
128 end_write_mode
129    ensures that all previously written data has been transmitted to the
130    HASP multiplexer and then writes an end-of-file record for the
131    device.
132 get_channel_info
133    get_channel_info returns the name of the attached channel and
134    its hardcore device index.  The info_ptr must point to the
135    tty_get_channel_info structure defined in
136    tty_get_channel_info.incl.pl1.
137 hangup_proc
138    is used to specify a procedure to be invoked when this attachment's
139    channel is hung up.
140 printer_off
141    Nothing  happens with  this control  order.  An  error code of
142    zero is always returned.
143 
144 
145 printer_on
146    Nothing  happens with  this control  order.  An  error code of
147    zero is always returned.
148 read_record_timeout
149    performs  a read_record  operation, with  a timeout specified.
150    The  info_ptr  points   to  the  input_timeout_info  structure
151    declared in io_timeout_info.incl.pl1.
152 read_status
153    determines whether or not there are any records waiting for a
154    process to read.
155 resetread
156    flushes any pending input.
157 
158 
159 resetwrite
160    flushes any as-yet unprocessed output.
161 runout
162    ensures that all data has been transmitted to the HASP multiplexer
163    from where it is guaranteed to be transmitted to the terminal.
164 select_device and reset
165    are ignored rather than rejected for compatibility with other I/O
166    modules used by the I/O daemon.
167 set_event_channel
168    specifies  the ipc_  event channel  that receives  wakeups for
169    this  attachment.  Wakeups  are received  for input available,
170    output completed, and state changes such as hangups and quits.
171    The channel must be event wait.  The info_pointer should point
172    to a  fixed bin(71) aligned  quantity containing a  valid ipc_
173    channel identifier.
174 
175    If this control  order is not given before the  opening of the
176    switch,  hasp_workstation_ attempts  to allocate  a fast event
177    channel.   Fast event  channels  cannot  be converted  to call
178    channels    and   receive    no   associated    message.    If
179    hasp_workstation_ cannot allocate a  fast channel, an ordinary
180    event wait channel is created and used.  This control order is
181    accepted while the switch is closed or open.  If the switch is
182    open, the new channel replaces the old one.
183 set_forms
184    changes the forms used for output on switch until the next
185    "end_write_mode" control order is used.  The info_ptr must
186    point to the set_forms_info structure defined in
187    hasp_set_forms_info.incl.pl1.
188 
189 
190 set_line_type
191    sets the line type associated with the terminal to the value
192    supplied.  The info_ptr should point to a fixed binary
193    variable containing the new line type.  Line types can be any
194    of the named constants defined in the include file
195    line_types.incl.pl1.
196 set_term_type
197    sets the terminal  type associated with the channel  to one of
198    the types  defined in the  terminal type table.   The info_ptr
199    should point  to the set_term_type_info structure  declared in
200    set_term_type_info.incl.pl1.    Only  the  input   and  output
201    translation tables for the specified terminal type are used.
202 
203 
204 state
205    returns the state of the channel as one of 4 values;
206        1 = hung up
207        2 = listening
208        5 = dialed up
209       -1 = masked
210    The info_ptr should point to a "fixed bin (17)" aligned variable.
211 
212 
213 write_record_timeout
214    performs a  write_record operation, with a  timeout specified.
215    The  info_ptr  points  to  the  output_timeout_info  structure
216    declared in io_timeout_info.incl.pl1.
217 
218 
219 Modes operation;
220 This module accepts all modes without error for compatibility
221 with other I/O modules, but ignores them.
222 
223 
224 Character set specification;
225 This I/O module allows the specification of the character set used by
226 the remote workstation through the -terminal_type attach option.
227 
228 If -terminal_type is given, the referenced terminal type must be
229 defined in the site's TTT with both an input and output translation
230 table.  This module uses these translation tables to convert data from
231 the remote workstation's character set to ASCII and vice versa.
232 
233 If -terminal_type is not given, the remote system is assumed to use
234 EBCDIC as its character set.  In this case, the subroutine
235 ascii_to_ebcdic_ is used to convert data sent to the workstation; the
236 subroutine ebcdic_to_ascii_ is used to convert data received from the
237 remote system.
238 
239 
240 Carriage control specifications;
241 Multics I/O daemon software uses three special slew operations;  skip
242 to top of the next page, skip to top of the next inside page, and skip
243 to the top of the next outside page.
244 
245 By default, this I/O module assumes that all of these slew operations
246 can be simulated on the remote workstation's line printer by skipping
247 to channel one.  However, through use of the -top_of_page,
248 -inside_page, and -outside_page control arguments, any sequence of
249 carriage motions can be specified to simulate these slew operations.
250 
251 
252 The format of this carriage control specification is
253       Tn:Tn:Tn:...
254 where n is a numeric value and T represents how to interpret that
255 numeric value.  T can be either c representing skip to channel n, or s
256 representing slew n lines.
257 
258 For example, the string
259       c7:s5:c12
260 means skip to channel seven, space five lines, and finally skip to
261 channel 12.