Commit graph

194 commits

Author SHA1 Message Date
Mark Pizzolato
d95d32b6d7 TMXR: Return reasonable error status when disconnecting a line without specifying the line 2015-11-01 20:19:59 -08:00
Mark Pizzolato
9fdd8a8706 TMXR: Fix debug output of remaining data after removing telnet negotiation from the input buffer 2015-09-02 16:49:47 -07:00
Mark Pizzolato
77152c6e20 MUX: Fix for connection establishment logic for virtual null modem connections.
Test case provided by Ed Marr using PDP11 DL devices.
2015-08-18 09:52:49 -07:00
Mark Pizzolato
9307fbdf54 MUX: Fix attach parsing of Log File names and no telnet options. Issue found by Ed Marr. 2015-08-16 11:05:44 -07:00
Mark Pizzolato
047a6b856f TMXR: Added delay to assure that simulator internally generated messages get fully transmitted on TMXR lines. 2015-06-26 11:46:49 -07:00
Mark Pizzolato
fa407e678b PDP10, PDP11, VAX, MUX: Fix allowed line attach syntax to accept UDP in any order among attach arguments 2015-05-23 17:08:51 -07:00
Mark Pizzolato
1d3ac294c4 SCP: Make sure that dynamically allocated print buffers have room for NUL character string terminator 2015-03-30 10:15:33 -07:00
Mark Pizzolato
137f825811 SCP: Removed unused conditional compile referenced to HAS_vsprintf_void and HAS_vsnprintf_void. Avoid emitting redundant \r characters when writing to stdout while a simulator is running. Suggestions from Bob Supnik. 2015-03-29 16:21:27 -07:00
Mark Pizzolato
71fe58b33a FRONTPANEL: Added better protocol debug support to debug simulator startup issues 2015-02-26 11:28:08 -08: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
9accae5905 BESM6 and VAX: Cleanup for building on VMS 2015-02-12 12:32:39 -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
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
c548b34772 Compiler suggested cleanups. 2014-10-27 17:14:28 -07:00
Mark Pizzolato
2e1167d4a0 Compiler suggested cleanups - mostly const fixups 2014-10-26 17:06:24 -07: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
f6eb4bc4f5 SCP: Fix buffered console implementation to correctly retain buffering attributes across independent SET CONSOLE commands 2014-05-11 06:16:46 -07:00
Mark Pizzolato
746e5ab88c SCP: Fix reporting of console's buffering status. Fix parsing of MUX settings which were simply interpreted by matching a single token. Reported by Mark Bensen. 2014-05-05 05:30:35 -07:00
Mark Pizzolato
84707acc7e Compiler suggested cleanup 2014-04-11 09:39:19 -07:00
Mark Pizzolato
74482ce448 PDP10, PDP11, VAX: Make sure that the DMC and DUP devices produce the right messages when an attach is attempted to an already attached line 2014-04-06 16:42:10 -07:00
Mark Pizzolato
ff0191cf29 TMXR: Properly enable packet mode (as inherited from the main mux) on each line. Only produce modem debug output when modem signals have changed. Cleanup the output of SHOW MUX. 2014-04-02 13:07:26 -07:00
Mark Pizzolato
edb475fcc1 PDP10, PDP11, VAX: Fix DMC & DUP unit attach strings for multi-line device configurations. 2014-04-02 08:47:35 -07:00
Mark Pizzolato
e79e41d9e4 TMXR: Change DSR to reflect attached state of line and DCD to reflect connected state of the line. 2014-04-01 19:45:47 -07:00
Mark Pizzolato
0f417ed4ca TMXR: Change modem DSR & DCD to never be indicated as on unless a connection is present. 2014-04-01 08:07:43 -07:00
Mark Pizzolato
017141c9a3 TMXR: Enable proper inheritance of mux global/default buffering value to individual lines. 2014-03-30 13:36:41 -07:00
Mark Pizzolato
6ce8d99cd8 SCP: Added generic output routine sim_printf to output to stdout and sim_log (and sim_deb when enabled)
The goals here being to simplify calling code while getting consistent output delivered everywhere it may be useful.

Modified most places which explicitly used sim_log or merely called printf to now avoid doing that and merely call sim_printf().
2014-03-28 08:20:05 -07:00
Mark Pizzolato
fc885f80dc TMXR: Be sure to correctly allocate the appropriate sized line transmit and receive buffers when a mux or line is attached. 2014-03-27 04:35:16 -07:00
Mark Pizzolato
66a02b877b TMXR: Avoid attempting to manage unit connect strings for never attached devices 2014-03-25 06:47:37 -07:00
Mark Pizzolato
090b2f83f2 PDP10, PDP11, VAX: Avoid corrupting a DMC/DMR unit attach string when a line state transitions 2014-03-17 08:48:02 -07:00
Mark Pizzolato
194b35f6e8 TMXR: avoid calling strcpy with overlapping arguments 2014-03-11 19:30:28 -07:00
Mark Pizzolato
44f66e90eb MUX: Added delay after closing a socket created to validate a port specification. Suggested by Mark Emmer
The network stack on Windows XP needs an opportunity to cleanup after closing a listening socket which was created but not used,
2014-02-23 08:54:00 -08:00
Mark Pizzolato
02cb5c2d88 Compiler suggested cleanups.
Mostly silencing noise warnings, but bugs were found in sim_console.c and pdp11_dmc.c
2014-02-14 17:07:45 -08:00
Mark Pizzolato
cde0be5573 TMXR: Added support to reasonably set modem bits when a line has dedicated listen port defined or uses datagram transport. 2014-02-06 17:08:38 -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
0f01e08a13 TMXR: Added loopback support for datagram configured lines to pass full packets in loopback mode. 2013-11-29 23:41:28 -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
db964d126c SCP/TMXR: Fix crashing bug when a multiplexer line has logging enabled before a mux attach, 2013-10-17 07:04:04 -07:00
Mark Pizzolato
5a21db5df6 Fix TMXR line transmit buffer allocation to always be allocated if a listening socket is open 2013-06-24 10:58:28 -07:00
Mark Pizzolato
486ef58595 Compiler warning cleanup 2013-06-01 23:04:45 -07:00
Mark Pizzolato
4d34547b05 Cleanup DUP11 implementation and refactor for shared use by another device (KMC11). 2013-05-31 11:58:09 -07:00