Commit graph

228 commits

Author SHA1 Message Date
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
67b0f38242 TMXR: Give priority to pending transfer delays prior to considering queued data 2018-07-07 21:57:23 -07:00
Mark Pizzolato
58ccb38d7b SCP: Add ability to ECHOF output to TMXR lines 2018-07-06 17:57:05 -07:00
Mark Pizzolato
4f61cd3a11 TMXR: Properly adjust speed delays when the factor is dynamically changed 2018-06-23 14:43:39 -07:00
Mark Pizzolato
d3da865e9b TMXR: Fix MUX transmit scheduling when buffer is empty
Also:
- Enhance SHOW MUX to support "SHOW MUX <dev>"
- Fix potential null pointer dereference with unusual ATTACH combinations
- Allow BPS factor to change without specifying an explicit speed.
2018-06-23 11:30:02 -07:00
Mark Pizzolato
53792d6261 TMXR: Describe TMXR API a little better 2018-06-19 22:05:12 -07:00
Mark Pizzolato
775d9f2453 TMXR: Minor attach error path and performance enhancements 2018-06-19 16:39:47 -07:00
Mark Pizzolato
b5537796ea TMXR: Add EXPECT/SEND support for BUFFERED lines
- Provide consistent behavior for connected OR BUFFERED lines
   BUFFERED lines can be used with MUX EXPECT/SEND scripting
   without an active connection.
- Fix SHOW MUX to display useful info for BUFFERED lines.
2018-06-19 16:13:22 -07:00
Mark Pizzolato
ffb6d4b269 TMXR: Fix ATTACH <dev> SPEED= to apply speed (or factor) if it is specified 2018-06-19 16:02:26 -07:00
Mark Pizzolato
215a71d608 TMXR: Make tmxr_rqln() only return count times tmxr_getc_ln() can be called 2018-06-19 15:59:19 -07:00
Mark Pizzolato
440bbfd307 TMXR: Consider pending SEND input when scheduling MUX input polling delays
Also consider pending SEND input when returning queued data count
2018-06-17 23:02:39 -07:00
Mark Pizzolato
d35b19a8ba TMXR: purge any unprocessed EXPECT rules and SEND data on a MUX detach 2018-06-17 21:55:55 -07:00
Mark Pizzolato
4428d49b08 TMXR: Properly determine wait time when multiple lines are active 2018-06-16 20:07:38 -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
a3d8cc6118 TMXR: Actively flush output prior to assessing wait time 2018-06-13 04:06:20 -07:00
Mark Pizzolato
2bf523dea0 TMXR: Allow tmxr_init_line() to be called even if not attached (Dave Bryan) 2018-06-12 19:45:27 -07:00
Mark Pizzolato
ed2abaa2d8 SCP: Enhance debug output while tracking event and timer activity 2018-06-11 03:13:29 -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
b007669ad5 TMXR: Don't allow 0 speed specifier for speed programmable mux devices
As reported in #587
2018-06-05 08:51:19 -07:00
Mark Pizzolato
584147fb64 TMXR: Remove output unit from delay consideration after poll has nothing queued
The goal of the logic in _tmxr_activate_delay() is to properly schedule the next
poll activity considering input and/or output data rates that may be in effect.
We need to make sure that one more poll is scheduled after output data has
been sent since simulation logic may have deferred queuing output data for
other reasons and handles its reactivation in the same context that it polls for
output.
2018-05-20 08:07:30 -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
3671ef1d87 TMXR: Add speed factor validation check and display in SHOW MUX 2018-05-17 13:32:37 -07:00
Mark Pizzolato
f2f4bfa8fb TMXR: Fix potential uninitialized variable reference Coverity warning
The uninitialized case would never occur since the routing containing that
code would never be called when the conditions that would leave the variable
uninitialized.
2018-04-25 14:15:45 -07:00
Mark Pizzolato
4c62583d13 TMXR: Add ability to disable specific lines on multi-line multiplexers.
sim> ATTACH <dev> Line=n,DISABLE
2018-04-18 02:14:28 -07:00
Mark Pizzolato
309598e2cd SCP: Fix declaration duplications and indentation issues 2018-04-16 16:57:06 -07:00
Mark Pizzolato
81bcd6d319 CONSOLE/SERIAL: Properly rate limit output to console port
When the console is connected to a serial port or telnet sessions enable
speed setting, the bits being output are now paced a the desired speed.
Multi-line mux I/O is also correctly rate limited on all lines.

This should address the problems described in #545
2018-04-06 04:12:38 -07:00
Mark Pizzolato
95f5a1c371 TMXR: Properly display serial configuration and allow unconfigured serial ports 2018-04-05 21:14:56 -07:00
Mark Pizzolato
d7b1707b45 TMXR: Properly set transmit wait time when speed changes are made.
- Display Input, Output and Connection Polling units properly.
2018-04-02 13:30:38 -07:00
Mark Pizzolato
3f7f92682d TMXR, SERIAL: Properly set serial port speed on attach. 2018-03-20 20:52:26 -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
cfbfac03bb TMXR: Set character delay times when changing serial port speeds
As discussed in #504
2018-03-03 01:14:51 -08:00
Mark Pizzolato
ba962252b0 TMXR: Properly initialize TMXR and UNIT connections
This will fix the SEGFAULT discussed in #528
2018-03-02 17:26:45 -08:00
Mark Pizzolato
d91d47d1f4 SCP: Silence compiler warnings 2018-02-13 12:27:18 -08: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
305ce5b598 TMXR: Fix potential SegFault while negotiating telnet options
If a telnet session sends options just prior to closing a session, the response
traffic might get dropped which isn't a problem, but we need to make sure
that we stop referencing the now invalid line structure after that happens.
2017-12-22 03:20:32 -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
6e4d315c77 TMXR: Detach serial ports which are explicitly disconnected by a user command 2017-11-07 13:08:52 -08:00
Mark Pizzolato
1a86dfa0dd TMXR: Fix to allow serial port to operate after attach with -V 2017-11-01 17:52:44 -07:00
Mark Pizzolato
daf8382cf2 TMXR: Properly announce attach connection on serial lines when -V option is set 2017-10-30 18:24:19 -07:00
Mark Pizzolato
cb21246f6e SERIAL, MUX: General fix for Windows Platform physical serial port output
Avoid Windows specific serial I/O behaviors which might not always have
hardware state reported to user level code.  The TMXR layer code already
paces mux output so that reasonable behavior is observed.
2017-10-28 09:28:39 -07:00
Mark Pizzolato
3d1f092573 SCP: Provide command context for messages emitted during ATTACH and DETACH
Context and non error messages will be suppressed in quiet mode or when -Q
switch is explicitly supplied on command line
2017-10-22 08:33:21 -07:00
Mark Pizzolato
5b248cf7f4 SCP: Fix Coverity identified warning and migrate away from strncpy to strlcpy 2017-10-19 20:04:08 -07: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
d0bd4fbdff TMXR: Enforce output rate limiting when output is produced by instructions
Calls to tmxr_putc_ln() executed directly within instruction simulation code
(as opposed to during event servicing) will delay reasonable times
2017-05-11 08:42:31 -07:00
Mark Pizzolato
1cc845b26c TMXR: Fix various potential buffer overruns (COVERITY) 2017-03-10 11:55:29 -08:00
Mark Pizzolato
0046905f72 TMXR: Added ability to quiet attach message confirmations
-Q switch or SET QUIET will suppress the attach message confirmation
2017-01-23 10:39:41 -08:00
Mark Pizzolato
34ffe98605 TIMER: Fixed generic coscheduling and extended details in debug information 2017-01-17 16:29:55 -08:00
Mark Pizzolato
d5a56e0ab4 SCP: Take care to only write to a socket a single time and when appropriate 2017-01-16 14:25:38 -08:00
Mark Pizzolato
11c0251059 SCP: Make sure that log and debug file I/O use a large (64K) buffer 2017-01-16 12:56:33 -08:00
Mark Pizzolato
c9276407e6 TIMER: Timing corrections and enhancements
- Add support to query remaining usecs on pending events.
- Generalized the sim_interval adjustment in sim_idle to allow more than
   a single decrement.
- More overhead reduction when idling.
- Carry usec values as double through out to fully support long wall clock
   delays.
2016-12-30 10:26:59 -08:00