serial: pipe:vrio named-pipe transport, no com0com needed
NamedPipeTransport connects as a client to vRIO's \\.\pipe\vrio (the DOSBox-X fork's role) and speaks the shared typed-frame contract (PipeFraming: 0x00 data / 0x01 modem lines, null-modem crossed). The COM path's DTR reset pulse is replayed in-band on connect. Peer disconnects and framing violations surface as the 0-byte transport-closed read the link already understands. RioTransportFactory routes endpoint strings — pipe:name (vRIO's own picker syntax) to the pipe transport, everything else to SerialPortTransport — and is wired into RioCoordinator and all three RioSerialMonitor modes, so profiles (RioComPort/DefaultRioComPort) and the bench tools take pipe endpoints anywhere a COM name went. Gotcha baked into the design: named pipes here have 0-byte buffers, so a write blocks until the peer reads it, and vRIO also writes its lines frame before reading — the on-connect pulse frames are therefore queued as overlapped writes (pipe writes drain in issue order, preserving the edge positions) instead of blocking the constructor into a mutual write-first deadlock. Verified end-to-end against the real VRioDevice + VRioPipeService over \\.\pipe\vrio: version 4.2 + check replies, 137 analog polls, lamp commands ACKed, zero framing errors. 322 tests green, both flavors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,11 @@ namespace RioJoy.Core.Profiles;
|
||||
/// </summary>
|
||||
public sealed class AppConfig
|
||||
{
|
||||
/// <summary>Default RIO COM port when a profile doesn't specify one.</summary>
|
||||
/// <summary>
|
||||
/// Default RIO endpoint when a profile doesn't specify one: a COM port
|
||||
/// name ("COM1"), or "pipe:vrio" to reach the vRIO emulator over its
|
||||
/// named pipe (no com0com pair; see RioTransportFactory).
|
||||
/// </summary>
|
||||
public string DefaultRioComPort { get; set; } = "COM1";
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -15,7 +15,7 @@ public sealed class RioProfile
|
||||
/// <summary>Display name (unique within a library).</summary>
|
||||
public string Name { get; set; } = "Unnamed";
|
||||
|
||||
/// <summary>RIO serial port (e.g. "COM3"); null = use the app default.</summary>
|
||||
/// <summary>RIO endpoint ("COM3", or "pipe:vrio" for the emulator); null = use the app default.</summary>
|
||||
public string? RioComPort { get; set; }
|
||||
|
||||
/// <summary>Plasma/VFD serial port; null = use the app default or none.</summary>
|
||||
|
||||
Reference in New Issue
Block a user