Commit graph

84 commits

Author SHA1 Message Date
Mark Pizzolato
136e16d54e TMXR: Add option to avoid connect message for incoming TCP connections
As discussed in #843
2020-06-21 14:18:03 -07:00
Mark Pizzolato
5523450d5c TMXR: Add option to disable/enable telnet mux wide 2020-06-21 13:15:33 -07:00
Mark Pizzolato
3d2394a2fb SOCK: Add tmxr (and socket) library tests 2020-03-31 09:07:39 -07:00
Mark Pizzolato
2f8fca49c6 SCP: Move sim_ library debug masks to all be high bits
This is to allow DEVICE defined debug masks to start using the low bits
in the 32 bit debug mask and avoid collisions with library defined values.
2019-01-23 15:17:19 -08:00
Lars Brinkhoff
6dfb0111e8 TMXR: Add Morton box line speeds: 25k, 40k, 50k, and 80k BPS. 2018-09-06 11:06:36 -07:00
Mark Pizzolato
6a015d3ef9 PDP11, all VAX: VH device modem signal fixup
As reported in #609
2018-08-24 14:33:04 -07:00
Mark Pizzolato
af173b7b6e TMXR: Rework modem signaling support
- Fix ineffective setting of RNG modem bit when line with DTR isn't available
- Fix logic clearing modem signal bits
- Add API to set/clear modem control behavior fo a specific line.
- return -2 status from tmxr_poll_conn when RNG has been enabled
2018-08-24 11:54:42 -07:00
Mark Pizzolato
f42db0c6ea TMXR: Add tmxr_txdone_ln() to provide precise completion speed timing
Multi line TMXR devices can simplify state maintenance and better leverage
output scheduling when they use this API
2018-07-12 10:12:49 -07:00
Mark Pizzolato
58ccb38d7b SCP: Add ability to ECHOF output to TMXR lines 2018-07-06 17:57:05 -07:00
Mark Pizzolato
0a7c9de1e1 TMXR: Change rx and tx delta values to be usecs including the speed factor 2018-06-13 04:51:34 -07:00
Mark Pizzolato
06654d1ff5 TMXR: Make sure all MUX devices can leverage all debug selectors 2018-06-07 16:39:26 -07:00
Mark Pizzolato
ce390bbae4 TMXR: Make transmitted data consider the configured line speed factor
As discussed in #566
2018-05-18 13:25:30 -07:00
Mark Pizzolato
f5ca960b82 TMXR: Disable ATTACH speed for devices which program port speed 2018-03-13 02:14:06 -07:00
Mark Pizzolato
611679a5cd TMXR: Properly apply output rate limit timing to all lines on a mux
Compute proper scheduling delays for all mux polling activities.
2018-02-13 01:38:33 -08:00
Mark Pizzolato
a8010f6fdb TMXR: Add counter of stalled transmits.
- Don't count stalls as drops since they can be retried
- Count stalls, which probably are rare on network connections but can
   happen more frequently on serial port connections.
2017-11-10 19:35:07 -08:00
Mark Pizzolato
932d16da53 SCP: Rework SEND and EXPECT commands to provide default and temporary arguments
- EXPECT HALTAFTER=nnn
     --> sets "nnn" as the global/default value

 - EXPECT "some string"
     --> uses the "nnn" global/default value

 - EXPECT HALTAFTER=ttt "some string"
     --> uses the "ttt" temporary value for this EXPECT only

and:

 - SEND AFTER=nnn
     --> sets "nnn" as the global/default value

 - SEND "some string"
     --> uses the "nnn" global/default value

 - SEND AFTER=ttt "some string"
     --> uses the "ttt" temporary value for this SEND only

(and similarly for the SEND DELAY value).
2017-10-16 13:10:10 -07:00
Mark Pizzolato
180b03107e TMXR: Properly accept ticks rather than instructions in coschedule APIs 2016-12-12 01:51:18 -08:00
Mark Pizzolato
6e0c26d85a TMXR: simplify #if expression conditions for SIM_ASYNCH_MUX 2016-11-12 13:21:45 -08:00
Mark Pizzolato
a9e17075ce TMXR: Reworked output to physical serial ports to avoid host OS buffering 2016-07-15 03:55:21 -07:00
Mark Pizzolato
c3496e4aa6 TMXR: Reworked output to physical Serial ports for VMS and Windows hosts
The goal being to have output to physical serial ports complete without host
OS level buffering so that what is transmitted via the serial port has correct
timing with respect to I/O completion status within a simulator.

Linux, OS X, and various other *nix host platforms still need work here.
2016-07-14 13:53:41 -07:00
Mark Pizzolato
1c551b7b5a TMXR: Use single character output buffer when writing to physical serial ports 2016-06-11 08:28:28 -07:00
Mark Pizzolato
5531ccb175 ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.

Most simulators can now also be compiled with a C++ compiler without
warnings.

Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
2016-05-15 15:25:33 -07:00
Mark Pizzolato
e05de3e50c TMXR: Provide Modem RING signal to notify MUX line of potential connection
When a new connection arrives it will be bound to the first line found
which has DTR enabled (considering the line order rules).  If none is
available, then all currently unconnected lines will have the RING signal
enabled.  If no such lines exist, the incoming connection is rejected with
"All connections busy".   If a currently disconnected line (with RING
enabled) raises DTR within 3 seconds, then that line gets the pending
connection and all other lines with RING enabled have RING disabled.
If 3 seconds pass without DTR coming up on any line with RING enabled
coming on, all lines with RING enabled will have RING disabled and the
incoming connection will be rejected with "No answer on any connection"
2016-04-08 03:09:51 -07:00
Mark Pizzolato
ca4a690174 TMXR: Fix multi-line input rate limiting logic 2015-12-19 12:12:53 -08:00
Mark Pizzolato
de0d251c75 TIMER, SCP: Change the sim_activate_after APIs to pass the delay value as uint32.
Also change all sim_defs.h structure declarations and references of sim_
structures to use the typedef names everywhere.
2015-12-10 06:33:59 -08:00
Mark Pizzolato
0938d31e59 PDP11, VAX: MUX input rate limiting works correctly with input arriving on multiple lines concurrently. 2015-11-28 12:49:54 -08:00
Mark Pizzolato
f322f4b044 TMXR: Support input speed limits with a multiplier factor
Many simulators run instructions one or more orders of magnitude faster
than the original systems did.  Limiting simulated serial port input speeds
to legacy bits per second values presents the arriving data much slower
than the original systems ever saw it.  Given the processing capacity of the
simulated systems and the fact that the software and device interfaces
only know how to deal with the legacy speed values there is a need to
provide a way to allow input to arrive faster.  This problem is solved by
providing a speed factor as a part of a speed specification.  For example
a speed can be specified as "speed*factor" or "9600*10".
2015-11-27 13:47:53 -08:00
Mark Pizzolato
62e36241a4 PDP11, VAX: Support multiplexer input speeds greater than 9600bps for console, DZ, VH, DL and DC devices
Each of the speeds greater than 9600bps deliver a character in less than
1ms.  Computing inter-character delays in microseconds therefore can't
be precise enough to be well behaved.  Measuring the inter-character
delays in instructions (scalled by the calibrated clock) gets us the needed
precision.
2015-11-25 04:25:21 -08:00
Mark Pizzolato
53796ba961 TMXR, CONSOLE: Add optional ability to rate limit input data to approximate bps values
A SET CONSOLE SPEED=nnn, where legal values for nnn are common serial
port rates.  The speed value will attempt to limit the input data rates to a
simulator to approximately the specified bits per second.
2015-11-18 10:44:19 -08:00
Mark Pizzolato
73d7aee71f SCP: Add printf style format argument validation for all functions which take printf arguments.
These include: sim_printf(), sim_messagef(), Fprint() and sim_debug().

Fix current use of these functions which had invalid arguments.
2015-10-09 04:12:25 -07:00
Mark Pizzolato
e768629009 SCP: Added the capability for EXAMINE command output to be written directly to a socket. 2015-02-21 12:40:36 -08:00
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
c7131700c0 Remote Console: Enhancements
- Accept input comments
 - Allow leading and trailing spaces in remote console input commands
 - Force prompt to be "sim> " or "SIM> " when in a master mode console session. "SIM> " used during single command mode.
 - Enhance performance of single command mode input processing by processing all available input characters before actually flushing output buffers

TMXR API extension to add tmxr_input_pending_ln that reports the existence of additional input data

TMXR also now conforms to revised sim_sock API changes
2015-02-11 09:48:05 -08:00
Mark Pizzolato
d6e60b88b7 TMXR: Extend Telnet option negotiation to explicitly reject uninteresting options. Fix #177 2015-01-21 06:05:20 -08:00
Mark Pizzolato
11a72cef93 SCP: Cleanup redundant external declaration in sim_tmxr.h (found by Dave Bryan) 2015-01-08 06:17:40 -08:00
Mark Pizzolato
b8940f4e32 TMXR: Add default debug bits for SEND/EXPECT operations 2015-01-06 08:24:44 -08:00
Mark Pizzolato
c083b45c14 TMXR, SOCK: Properly declare as const string input only arguments. 2014-12-06 03:50:45 -08:00
Mark Pizzolato
4eed007607 SCP: Restructured timer/co-scheduling activities to support co-scheduling on specific timers 2014-12-02 05:33:59 -08:00
Mark Pizzolato
02e90de6a4 SCP: Added EXPECT and SEND commands to react to data from and inject data into the simulated console port (and other MUX ports)
Ideas based on Dave Bryan's console halt efforts.

	sim> SEND {<mux>:line} {DELAY=n,}"string"

Where <mux> is the name of the device pointed to by the TMXR structure.  If <mux>:line isn't specified, then the console device is implicitly being referenced.
Delay is optional and once set persists for subsequent SEND operations to the same device.  Delay defaults to 1000.  The DELAY value is a minimum number of instructions which must execute before the next character in the provided string will be injected to the console port.  The DELAY value has effect between the characters delivered as well.  "string" requires quotes and within the quoted string, common C escape character syntax is available (\r\r\t, etc.).

Each device (console, and each line in each mux) has a separate value for DELAY.

An arbitrary number of 'expect' conditions can be defined.  The command syntax is:

              sim> EXPECT {<mux>:line} {[cnt]} "matchstring" {actioncommand {; actioncommand ...}}

Where <mux> is the name of the device pointed to by the TMXR structure.  If <mux>:line isn't specified, then the console device is implicitly being referenced.
"matchstring" requires quotes and within the quoted string, common C escape character syntax is available (\r\r\t, etc.).  The quotes used can be single or double quotes, but the closing quote must match the opening quote.  The match string might be extended to allow the use of perl style regular expressions in the "matchstring" when a -R switch is specified on the command line.

              sim> EXPECT "Enter Color: "  SEND "Red\r"; g

A specific 'expect' condition can be removed with:

              sim> NOEXPECT {<mux>:line} "matchstring"

All 'expect' conditions can be removed with:

              sim> NOEXPECT {<mux>:line}

'expect' conditions can be examined with:

              sim> SHOW EXPECT {<mux>:line}

Expect rules are one-shots (i.e. they disappear once a match has occurred) unless they are explicitly described as persistent with the -P switch.
The -C switch is available when defining expect rules.  The effect of a rule defined with the -C flag is that when an expect match occurs for that rule, ALL rules are cleared for that device (console or <mux>:line).
2014-10-14 10:49:24 -07:00
Mark Pizzolato
b1fb809210 PDP10, PDP11, VAX: Added the DDCMP corruption troll to the DDCMP layer and removed it from the KDP device.
Now all DDCMP capable devices KDP, DUP and DMC/DMR have access to packet corruption generation to simulate real world imperfect data lines for protocol testing.
2014-02-10 17:22:19 -08:00
Mark Pizzolato
9ab6c4d1c1 SOCKET: Extended TMXR packet capabilities to disable the Nagle algorithm when TCP packets transports are used. 2014-01-23 09:31:05 -08:00
Mark Pizzolato
33248778cf TMXR: Correct const attributes for packet reading APIs. 2013-12-02 10:29:04 -08:00
Mark Pizzolato
54b92b878e TMXR: Support loopback when using packet APIs even if a connection is not active 2013-11-26 15:25:00 -08:00
Mark Pizzolato
c9f73eac90 H316: Rewrote h316_udp to use TMXR lines for UDP transport of data. Changed h316_mi to leverage built-in loopback mode in TMXR.
This gives UDP transport on all simh host platforms.
2013-11-26 13:30:11 -08:00
Mark Pizzolato
378e3e03a3 TMXR: Tolerate situations where independent devices are bound to different lines of a multi-line MUX. 2013-11-26 11:09:14 -08:00
Mark Pizzolato
4259b3c83a TMXR: Added option to use UDP transport for packet transport 2013-11-25 04:36:21 -08:00
Mark Pizzolato
00b77c8533 TMXR: Packet, Loopback and Half-Duplex enhancements
- Added halfduplex mode for network connections and corrected modem signal DSR to reflect connection status (vs original attach status), and DCD follows DSR (except in halfduplex mode where it follows CTS).

- Enhance tmxr_set_get_modem_bits to also return the modem DTR and RTS state.

- Separate RTS from DTR when manipulating modem state bits

- Minor fixes to loopback functionality after direct testing with the first loopback client device (DMC11).

- Fix clearing of break input buffer now that input buffers are dynamically allocated

- Changed Modem bit logic to have CTS reflect RTS as expected by devices which may expect this.

- Changed receive buffers to be dynamically allocated and the same size as transmit buffers when transmit buffers are non-default sized.

- Added TMXR line attach in loopback mode.  Fixed loopback buffer management

- Added loopback support to TMXR lines

- Added functioning connect poll capability to revised DMC

- Added connection destination display to connection status even when a connection has not yet been established.

- Added extended packet sending and receiving semantics to TMXR allowing for an optional frame byte to exist between length prefixed data packets
2013-11-20 12:18:02 -08:00
Mark Pizzolato
6f4e718fda PDP8: Refinement to prior fix for issue #86. Avoid data loss if prior character hasn't been read yet when a poll event happens. 2013-11-03 13:08:17 -08:00
Mark Pizzolato
784bc5daa2 Added new tmxr_line_attach_string API to return the attach string specific to a a particular multiplexer line.
Added parsing logic to allow tcp port and connect strings to end in either ";notelnet" or ";telnet" as desired to specifically describe a port setup.
Fixed bug in single line multiplexer attach which returned failed status when it should not have if a tcp connect destination was specified.
Relaxed parsing rules to allow a single line multiplexer to have a listen port specified at either the line level or the mux level.
2013-05-17 08:07:00 -07:00
Mark Pizzolato
145b5c6a00 Added per line Modem Control capabilities to TMXR 2013-05-15 05:42:36 -07:00