namespace RioJoy.Core.Serial; /// Tunables for . public sealed record RioSerialLinkOptions { /// /// How often to request an analog update while the link runs. The legacy /// watch thread polls on a ~55 ms timeout (riovjoy2.cpp#L1069). /// public TimeSpan AnalogPollInterval { get; init; } = TimeSpan.FromMilliseconds(55); /// /// If no arrives within this /// window, issue a general reset to recover (legacy >5 s rule, /// riovjoy2.cpp#L1096). /// public TimeSpan AnalogRecoveryTimeout { get; init; } = TimeSpan.FromSeconds(5); /// Whether the link should automatically poll for analog updates. public bool AutoPollAnalog { get; init; } = true; /// /// When , a button packet that fails its checksum is /// NAK'd (the documented protocol). When (default), /// every framed packet is ACK'd regardless of checksum, matching the legacy /// receive path which force-accepts (see docs/PROTOCOL.md §2 ⚠️). /// public bool VerifyInboundChecksum { get; init; } /// Read buffer size for the receive loop. public int ReadBufferSize { get; init; } = 256; }