Commit graph

263 commits

Author SHA1 Message Date
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
Mark Pizzolato
e776a37e08 TMXR: Fix tmxr_clock_coschedule() to properly convert to ticks 2016-12-12 12:50:49 -08:00
Mark Pizzolato
180b03107e TMXR: Properly accept ticks rather than instructions in coschedule APIs 2016-12-12 01:51:18 -08:00
Mark Pizzolato
89e372ba92 TIMER: Restore functionality for clocks devices that don't use sim_activate_after
Clock devices which call sim_register_clock_unit or sim_register_clock_unit_tmr
are best behaved if they use sim_activate_after to schedule their tick events.
2016-11-22 01:24:26 -08:00
Mark Pizzolato
39d2944ede TIMER: Add support for catchup clock ticks and cleaned up asynchronous clocks
Asynchronous clocks are now built for all simulators which are built with
SIM_ASYNCH_IO defined.  The default behavior has asynchronous clocks
disabled since this is still experimental, but it can be enabled with
SET TIMER ASYNC.

Catchup clock ticks are now available, but since they're experimental,
they aren't enabled by default.  Catchup ticks are only available if the
simulators clock device calls sim_rtcn_tick_ack to acknowledge processing
of clock ticks.  The VAX simulators have been modified to leverage this.
Catchup clock ticks can be enabled with SET TIMER CATCHUP

Additionally, an idle threshold is provided which can be used to
influence when clock calibration may be suppressed.  The default is not
to suppress calibration activities.

The various timer behaviors are visible with the SHOW TIMER command.

The state of the operating timer facilities is visible with: SHOW CLOCK

Timer events which are queued are visible with the SHOW QUEUE command.
2016-11-16 23:50:53 -08:00
Mark Pizzolato
6e0c26d85a TMXR: simplify #if expression conditions for SIM_ASYNCH_MUX 2016-11-12 13:21:45 -08:00
Mark Pizzolato
afad8ad374 TMXR: Add help indicating speed factor specification for console and mux lines 2016-11-05 02:52:58 -07:00
Mark Pizzolato
c1ca3d4612 SCP: Add missing help mentioning SET CONSOLE SPEED 2016-09-24 05:04:44 -07:00
Mark Pizzolato
b8b95c7b20 TMXR: Avoid closing file descriptor 0 when disabling serial port console output
Properly initialize TMXR structure when attaching to a serial port so a
subsequent close will not attempt to close the uninitialized ring_sock.
2016-07-15 03:58:52 -07: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
553bc357b9 TMXR: Fix logic to use single character output buffer for serial ports 2016-07-14 08:01:03 -07:00
Mark Pizzolato
f2656acb38 TMXR: Fix logic which interprets DTR transitions 2016-06-19 08:08:19 -07:00
Mark Pizzolato
a24aba69ae VIDEO: Added priority boost to thread performing SDL processing and updates
Reworked all priority adjustment code to leverage a new
sim_os_set_thread_priority API which is coded to use pthreads or OS
priority adjustment APIs as necessary.
2016-06-11 09:52:33 -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
451b53daeb TMXR: Allow Line based logging to be both disabled and enabled before attach
Previously attempts to disable logging for an unattached mux (or line) could
crash the simulator.
2016-05-24 08:53:05 -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