StageExecutor Class
Actor-style executor base class — implement to add a new runtime-graph stage. More...
Declaration
Included Headers
Derived Classes
| class | FanOut |
|
Stage executor that duplicates each incoming sample to multiple output ports. More... | |
| class | JoinBundle |
|
Stage executor that joins samples from multiple input ports into a single bundled output. More... | |
| class | JoinEncodedWithMeta |
|
Stage executor that bundles an encoded payload (e.g., H.264) with associated metadata. More... | |
| class | LambdaStage |
|
Generic stage executor whose behavior is supplied by user-provided callbacks. More... | |
| class | StageModelExecutor |
|
Stage executor that runs a Model's inference pipeline as a runtime-graph stage. More... | |
| class | StampFrameId |
|
Stage executor that assigns a monotonically-increasing frame id per stream. More... | |
| class | StreamMetadata |
|
Stage executor that fills in stream metadata defaults on passing samples. More... | |
| class | StreamScheduler |
|
Stage executor that round-robin-schedules samples across multiple streams. More... | |
Public Destructor Index
| ~StageExecutor ()=default | |
|
Virtual destructor — required for the abstract base. More... | |
Public Member Functions Index
| void | set_ports (const StagePorts &) |
|
Provide resolved port ids for caching. Optional — default is a no-op. More... | |
| void | set_emitter (StageEmitter *) |
|
Provide the runtime output emitter. Optional — default is a no-op. More... | |
| void | start () |
|
Start any background work. Called once before the first on_input. More... | |
| void | request_stop () |
|
Ask an active stage to cancel long-running work. Optional — default is a no-op. More... | |
| void | stop () |
|
Tear down. Called once after the last on_input/on_tick. More... | |
| void | on_input (StageMsg &&msg, std::vector< StageOutMsg > &out)=0 |
|
Handle one input message. More... | |
| void | on_tick (std::int64_t, std::vector< StageOutMsg > &) |
|
Optional periodic tick for timeout-driven stages. More... | |
Description
Actor-style executor base class — implement to add a new runtime-graph stage.
Subclass this to define a stage's behavior. The runtime owns the lifetime, the threads, the queues, and the routing; the stage just transforms incoming StageMsgs into outgoing StageOutMsgs.
Lifecycle: set_ports() → start() → repeated on_input() / on_tick() → stop() → destruction.
Threading: the runtime guarantees serial invocation per stage instance — on_input and on_tick will not be called concurrently on the same stage. Stages may keep non-atomic per-instance state without locks.
Definition at line 119 of file StageExecutor.h.
Public Destructor
~StageExecutor()
| virtual default |
Virtual destructor — required for the abstract base.
Definition at line 122 of file StageExecutor.h.
Public Member Functions
on_input()
|
Handle one input message.
Append zero or more outputs to out.
- Parameters
-
msg Input arriving on msg.in_port.
out Append outputs here; the runtime routes them on outgoing edges.
Definition at line 142 of file StageExecutor.h.
on_tick()
| inline virtual |
Optional periodic tick for timeout-driven stages.
The first argument is a monotonic timestamp (ns); the second is the same output vector convention as on_input — append outputs to it, the runtime routes them.
Definition at line 150 of file StageExecutor.h.
request_stop()
| inline virtual |
Ask an active stage to cancel long-running work. Optional — default is a no-op.
Definition at line 133 of file StageExecutor.h.
set_emitter()
| inline virtual |
Provide the runtime output emitter. Optional — default is a no-op.
Definition at line 128 of file StageExecutor.h.
set_ports()
| inline virtual |
Provide resolved port ids for caching. Optional — default is a no-op.
Definition at line 125 of file StageExecutor.h.
start()
| inline virtual |
Start any background work. Called once before the first on_input.
Definition at line 131 of file StageExecutor.h.
stop()
| inline virtual |
Tear down. Called once after the last on_input/on_tick.
Definition at line 135 of file StageExecutor.h.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.