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).
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().
- 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
1) retain the buffered/unbuffered line specific details across save/restore
2) retain modem control outgoing bits (CTS and DTR) accross line resets which may occur due to carrier/connection loss.
3) change the behavior which sends the prior contents of the transmit buffer on a line reconnect to only happen for buffered telnet lines.
4) avoid crash in SHOW MULTIPLEXER output when only specific lines have been attached instead of
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.
Extended debugging to describe the socket endpoints when connections are established.
Extended XMT and RCV debugging to include the line number in debug messages.