ForeignSrdoMonitor Class¶
Passive continuous SRDO/GFC analysis (FR-CO-061), independent of any CANopen node or object dictionary.
Inheritance Object → ForeignSrdoMonitor
Implements IDisposable
Remarks¶
This monitor has only a receive subscription. It sends nothing, performs no SDO acquisition, and never actuates process data. Polls are serialized with replacement and disposal.
HostArrivalTimestamp must be captured before buffering, in the same process's Stopwatch clock. Adapter timestamps are retained only as metadata. Poll drains captured frames before advancing to the current clock, so UI scheduling does not change pair timing. Missing, late, future or backward timestamps explicitly invalidate timing. Upstream driver latency and losses are not measurable here. Results are diagnostics, never remote-failure confirmation or safety approval.
The input must have one exclusive reader for its entire lifetime. Ordered loss metadata is used when available; legacy subscriptions remain of unknown capture quality. Even a contiguous subscription cannot prove complete capture at the adapter or on the bus.
Constructors¶
ForeignSrdoMonitor(ISubscription, string, IEnumerable<ForeignSrdoConfiguration>, bool) Constructor¶
Uses an existing, exclusively read subscription. Ownership is explicit; the caller must include all configured identifiers and 001h, including malformed candidates.
public ForeignSrdoMonitor(CanKit.Pro.RawCan.ISubscription subscription, string busIdentity, System.Collections.Generic.IEnumerable<CanKit.Pro.CANopen.Safety.ForeignSrdoConfiguration> configurations, bool ownsSubscription=false);
Parameters¶
subscription ISubscription
busIdentity String
configurations IEnumerable<ForeignSrdoConfiguration>
ownsSubscription Boolean
Methods¶
ForeignSrdoMonitor.Dispose() Method¶
Stops analysis and, if owned, disposes its subscription. Idempotent.
Implements Dispose()
ForeignSrdoMonitor.Open(ICanBusService, string, IEnumerable<ForeignSrdoConfiguration>, Nullable<int>) Method¶
Opens and owns a private subscription, including host echoes (the monitor has no transmissions of its own). Disposal closes only that subscription, never the shared service.
public static CanKit.Pro.CANopen.Safety.ForeignSrdoMonitor Open(CanKit.Pro.RawCan.ICanBusService service, string busIdentity, System.Collections.Generic.IEnumerable<CanKit.Pro.CANopen.Safety.ForeignSrdoConfiguration> configurations, System.Nullable<int> bufferCapacity=null);
Parameters¶
service ICanBusService
busIdentity String
configurations IEnumerable<ForeignSrdoConfiguration>
bufferCapacity Nullable<Int32>
Returns¶
ForeignSrdoMonitor.Poll(int) Method¶
Drains at most maxFrames captured inputs, returning all observations directly. A full batch conservatively reports backlog and does not advance deadlines to wall time; poll again until HasBacklog is false. No callbacks run on the capture thread.
Parameters¶
maxFrames Int32
Returns¶
ForeignSrdoMonitor.ReplaceConfigurations(IEnumerable<ForeignSrdoConfiguration>) Method¶
Atomically replaces prepared input and starts a fresh evaluation period. Queued SRDOs captured before replacement are reported and discarded; GFC trace items are retained. Invalid/ambiguous configurations throw before changing the running session.
public void ReplaceConfigurations(System.Collections.Generic.IEnumerable<CanKit.Pro.CANopen.Safety.ForeignSrdoConfiguration> configurations);
Parameters¶
configurations IEnumerable<ForeignSrdoConfiguration>