Skip to main content

Module channel_manager

Module channel_manager 

Source

Structs§

ChannelManager
Manages EPICS Channel Access + pvAccess connections and dispatches archived samples to storage.
ConnectionInfo
Connection state tracked per PV.
PendingReports
Coalescing per-PV pending-timestamp map shared between every shard worker (incl. their spawn_blocking late-success closures) and the single global flush owner.
PvCounters
Per-PV diagnostic counters for the BPL drop / rate / connection reports. All counts are monotonic across the PV’s lifetime; the rate handlers compute deltas against first_event_unix_secs.
PvCountersSnapshot
Read-only snapshot of PvCounters — owned values so callers can move them across threads / serialise without reaching into Atomics.
PvSample
A sample ready to be written to storage.
ShardedWritePoolConfig
Tunables for run_sharded_write_pool.
WriteLoopConfig
Tunables for write_loop_with_config. Production uses the defaults via write_loop; tests dial the timeouts down to sub-second values so failure-injection cases finish in a few hundred milliseconds instead of minutes.

Enums§

PvConnectionState
Discrete connection state for getPVDetails (Java parity dea7acb). Distinguishes never-connected from connecting from confirmed-down.

Functions§

run_sharded_write_pool
Run an N-shard write pool: 1 dispatcher (hashes pv_name → shard) plus N parallel write_loop_with_config workers. Each shard has independent ts_updates, an independent flush ticker, and its own per-PV writer slots inside the shared storage plugin (so per-PV ordering is naturally preserved by the consistent-hash routing — samples for one PV always go to the same shard).
write_loop
Background writer task — drains samples and writes to storage.
write_loop_with_config
Same as write_loop but accepts the full WriteLoopConfig.