Skip to main content

Module config

Module config 

Source
Expand description

This module defines the configuration of the copper runtime. The configuration is a directed graph where nodes are tasks and edges are connections between tasks. The configuration is serialized in the RON format. The configuration is used to generate the runtime code at compile time.

Re-exportsΒ§

pub use petgraph::Direction::Incoming;
pub use petgraph::Direction::Outgoing;

ModulesΒ§

imp πŸ”’

MacrosΒ§

impl_from_numeric_for_value πŸ”’
impl_from_value_for_int πŸ”’
impl_try_from_value_for_int πŸ”’

StructsΒ§

AnytimeConfig
Refinement policy for an anytime node (anytime: on a task).
BridgeConfig
Declarative definition of a bridge component with a list of channels.
Cnx
This represents a connection between 2 tasks (nodes) in the configuration graph.
ComponentConfig
This is the configuration of a component (like a task config or a monitoring config):w It is a map of key-value pairs. It is given to the new method of the task implementation.
ConfigError
CuConfig
CuConfig is the programmatic representation of the configuration graph. It is a directed graph where nodes are tasks and edges are connections between tasks.
CuConfigRepresentation πŸ”’
This is the main Copper configuration representation.
CuGraph
IncludesConfig
Includes are used to include other configuration files.
InstanceConfigOverridesRepresentation πŸ”’
InstanceConfigSetOperation
One path-based config overlay applied to a parsed local Copper config.
LoggingCodecSpec
LoggingConfig
MissionsConfig
Missions are used to generate alternative DAGs within the same configuration.
MonitorConfig
MultiCopperChannelContract πŸ”’
MultiCopperConfig
Strict umbrella configuration describing multiple Copper subsystems and their explicit links.
MultiCopperConfigRepresentation πŸ”’
MultiCopperEndpoint
Typed endpoint reference used by validated multi-Copper interconnects.
MultiCopperInterconnect
Validated explicit interconnect between two subsystem endpoints.
MultiCopperInterconnectConfig
One explicit interconnect between two subsystem bridge channels.
MultiCopperSubsystem
Validated subsystem entry with its compiler-assigned numeric subsystem code and parsed local Copper config.
MultiCopperSubsystemConfig
One subsystem participating in a multi-Copper deployment.
Node
A node in the configuration graph. A node represents a Task in the system Graph.
NodeLogging
Configuration for logging in the node.
PlannerConfig
Selects the planner that orders the steps of every mission graph, plus its config. Mirrors MonitorConfig: type names a CuPlanner implementation. Copper ships cu29::planner::Linearity (the default when this section is absent) and cu29::planner::Pinned; any other type is an out-of-tree planner resolved at build time by cu29::planner::emit_plan in the application’s build.rs.
PortLookup πŸ”’
RenderConnection πŸ”’
RenderNode πŸ”’
RenderSection πŸ”’
RenderTopology πŸ”’
ResourceBundleConfig
Declarative definition of a resource bundle.
RuntimeConfig
SerializedCnx πŸ”’
Serialized representation of a connection used for the RON config.
ThreadPoolConfig
Declarative definition of a single thread pool.
Value
Wrapper around the ron::Value to allow for custom serialization.

EnumsΒ§

BackgroundConfig
How a task is backgrounded.
BridgeChannelConfigRepresentation
Directional mapping for bridge channels.
ConfigGraphs
ConfigPredicate
A compile-time predicate controlling whether a configuration fragment is included.
CuDirection
A simple wrapper enum for petgraph::Direction, designed to be converted into it via the From trait.
EndpointRole πŸ”’
Flavor
Distinguishes regular tasks from bridge nodes so downstream stages can apply bridge-specific instantiation rules.
HandleContent
Logging policy for a CuHandle’s payload content.
InstanceConfigTargetKind πŸ”’
MultiCopperChannelDirection πŸ”’
OnError
What to do when a pool’s affinity or scheduling request cannot be applied (for example, setting a real-time priority without CAP_SYS_NICE).
OneOrManyMonitorConfig πŸ”’
SchedulingPolicy
Scheduling policy applied to every worker thread of a ThreadPoolConfig.
TaskKind
Declares which Copper task trait a task node implements.

ConstantsΒ§

DEFAULT_BACKGROUND_POOL
Default thread pool name used by background: true tasks.
DEFAULT_KEYFRAME_INTERVAL
DEFAULT_MISSION_ID
MAX_NICE
Highest valid niceness for SchedulingPolicy::Nice (least favorable).
MAX_RATE_TARGET_HZ
Maximum representable Copper runtime rate target in whole Hertz.
MAX_RT_PRIORITY
Largest valid real-time priority for SchedulingPolicy::Fifo/SchedulingPolicy::RoundRobin.
MIN_NICE
Lowest valid niceness for SchedulingPolicy::Nice (most favorable).
MIN_RT_PRIORITY
Smallest valid real-time priority for SchedulingPolicy::Fifo/SchedulingPolicy::RoundRobin.
NC_ENDPOINT
Special destination endpoint used to mark an output as intentionally not connected.
RT_POOL
Reserved thread pool name driving the parallel-rt execution engine. Applied to each stage worker at startup; never task-bound nor built as a rayon pool.

FunctionsΒ§

apply_bridge_node_config_override_to_graph πŸ”’
apply_instance_config_set_operation πŸ”’
apply_instance_overrides πŸ”’
apply_instance_overrides_from_file πŸ”’
apply_task_config_override_to_graph πŸ”’
build_bridge_lookup πŸ”’
build_config_table πŸ”’
build_multi_bridge_channel_contracts πŸ”’
build_port_table πŸ”’
build_render_topology πŸ”’
config_representation_to_config πŸ”’
Convert a CuConfigRepresentation to a CuConfig. Uses the deserialize_impl method and validates the logging configuration.
default_as_true πŸ”’
default_keyframe_interval πŸ”’
deserialize_config_representation πŸ”’
Shared implementation for deserializing a CuConfigRepresentation into a CuConfig
deserialize_constant_module πŸ”’
deserialize_monitor_configs πŸ”’
escape_dot_id πŸ”’
format_endpoint πŸ”’
infer_task_kind_for_id
insert_bridge_node πŸ”’
is_default_handle_content πŸ”’
merge_component_config πŸ”’
merge_connection_missions πŸ”’
mission_applies πŸ”’
multi_channel_key πŸ”’
parse_config_string πŸ”’
Read a copper configuration from a String. Parse a RON string into a CuConfigRepresentation, using the standard options. Returns an error if the parsing fails.
parse_endpoint πŸ”’
parse_instance_config_overrides_string πŸ”’
parse_instance_override_target πŸ”’
parse_multi_config_string πŸ”’
parse_multi_endpoint πŸ”’
process_includes πŸ”’
Returns a merged CuConfigRepresentation.
read_configuration
Read a copper configuration from a file.
read_configuration_content πŸ”’
read_configuration_str
read_configuration_str_with_features
Read a Copper configuration string using the supplied compile-time Cargo features.
read_configuration_with_features
Read a Copper configuration using the supplied compile-time Cargo features.
read_multi_configuration
Read a strict multi-Copper umbrella configuration from a file.
read_multi_configuration_str
Read a strict multi-Copper umbrella configuration from a string.
read_multi_configuration_str_with_features
Read a multi-Copper configuration string using the supplied compile-time Cargo features.
read_multi_configuration_with_features
Read a multi-Copper configuration using the supplied compile-time Cargo features.
register_multi_channel_msg πŸ”’
register_nc_output πŸ”’
resolve_configuration_representation πŸ”’
resolve_relative_config_path πŸ”’
resolve_task_kind_for_id
ron_value_to_cu_value πŸ”’
sanitize_identifier πŸ”’
substitute_parameters πŸ”’
validate_anytime_graph πŸ”’
Checks every anytime: node of one graph: local bounds, regular-task kind, single-input/single-output arity, and the foreground fit-the-period rule (see CuConfig::validate_anytime_configs).
validate_bridge_channel πŸ”’
validate_multi_config_representation πŸ”’
validate_task_kind πŸ”’
validate_thread_pools πŸ”’
Validates the declarative thread pool definitions of a runtime config.

Type AliasesΒ§

NodeId
NodeId is the unique identifier of a node in the configuration graph for petgraph and the code generation.