Expand description
CuRuntime is the heart of what copper is running on the robot.
It is exposed to the user via the copper_runtime macro injecting it as a field in their application struct.
Structs§
- CuExecution
Loop - This structure represents a loop in the execution plan. It is used to represent a sequence of Execution units (loop or steps) that are executed multiple times. if loop_count is None, the loop is infinite.
- CuExecution
Step - This structure represents a step in the execution plan.
- CuInput
Msg - CuOutput
Pack - CuRuntime
- This is the main structure that will be injected as a member of the Application struct. CT is the tuple of all the tasks in order of execution. CL is the type of the copper list, representing the input/output messages for all the tasks.
- CuRuntime
Builder - CuRuntime
Parts - KeyFrame
- A KeyFrame is recording a snapshot of the tasks state before a given copperlist. It is a double encapsulation: this one recording the culistid and another even in bincode in the serialized_tasks.
- KeyFrames
Manager - Manages the frozen tasks state and logging.
- Loop
Rate Limiter - Runtime loop limiter that preserves phase with absolute deadlines.
- Runtime
Lifecycle Record - One event record persisted in the
UnifiedLogType::RuntimeLifecyclesection. - Runtime
Lifecycle Stack Info - Stack and process identification metadata persisted in the runtime lifecycle log.
- Sync
Copper Lists Manager - Manages the lifecycle of the copper lists and logging on the synchronous path.
Enums§
- CuExecution
Unit - This structure represents a step in the execution plan.
- CuTask
Type - Copper tasks can be of 3 types:
- Owned
Copper List Submission - Result of handing an owned boxed CopperList to the runtime-side CL I/O path.
- Process
Step Outcome - Control-flow result returned by one generated process stage.
- Runtime
Lifecycle Config Source - Identifies where the effective runtime configuration came from.
- Runtime
Lifecycle Event - Runtime lifecycle events emitted in the dedicated lifecycle section.
Functions§
- compute_
runtime_ plan - This is the main heuristics to compute an execution plan at compilation time. TODO(gbin): Make that heuristic pluggable.
- find_
task_ type_ for_ id - perf_
now - Returns a monotonic instant used for local runtime performance timing.
- rate_
target_ period - Convert a configured runtime rate target to an integer-nanosecond period.
Type Aliases§
- Bridges
Instantiator - Copper
Lists Manager - Monitor
Instantiator - Process
Step Result - Result type used by generated process-step functions.
- Tasks
Instantiator