Expand description
Plugin runtime: control plane (PortActor) + data plane (processing thread).
§Single-threaded data plane (intentional, G4)
C++ NDPluginDriver runs numThreads worker threads sharing one input
queue (createCallbackThreads). The Rust port deliberately runs exactly
one per-plugin data thread driving a tokio::select! loop. This is an
intentional design choice: a single owner of the processing state removes
the C++ worker-pool races (shared prevUniqueId_, sort-buffer contention)
and keeps array ordering trivially correct. The NUM_THREADS / MAX_THREADS
PVs are therefore not backed by a real worker pool — instead NumThreads
is validated and clamped to [1, MaxThreads] on write and the clamped
value is written back, so the PV is honest about the accepted value rather
than silently inert.
Structs§
- Param
Change Result - Result of handling a control-plane param change.
- Plugin
Param Snapshot - Read-only snapshot of param values available to the processing thread.
- Plugin
Port Driver - PortDriver implementation for a plugin’s control plane.
- Plugin
Runtime Handle - Handle to a running plugin runtime. Provides access to sender and port handle.
- Process
Result - Result of processing one array: output arrays + param updates to write back.
Enums§
- Param
Change Value - Value sent through the param change channel from control plane to data plane.
- Param
Update - A single parameter update produced by a plugin’s process_array.
Traits§
- NDPlugin
Process - Pure processing logic. No threading concerns.
Functions§
- create_
plugin_ runtime - Create a plugin runtime with control plane (PortActor) and data plane (processing thread).
- create_
plugin_ runtime_ multi_ addr - Create a plugin runtime with multi-addr support.
- create_
plugin_ runtime_ with_ output - Create a plugin runtime with a pre-wired output (for testing and direct wiring).
- wire_
downstream - Connect a downstream plugin’s sender to a plugin runtime’s output.