pub struct Node {
id: String,
type_: Option<String>,
config: Option<ComponentConfig>,
missions: Option<Vec<String>>,
background: Option<bool>,
run_in_sim: Option<bool>,
logging: Option<NodeLogging>,
}
Expand description
A node in the configuration graph. A node represents a Task in the system Graph.
Fields§
§id: String
Unique node identifier.
type_: Option<String>
Task rust struct underlying type, e.g. “mymodule::Sensor”, etc.
config: Option<ComponentConfig>
Config passed to the task.
missions: Option<Vec<String>>
Missions for which this task is run.
background: Option<bool>
Run this task in the background:
ie. Will be set to run on a background thread and until it is finished CuTask::process
will return None.
run_in_sim: Option<bool>
Option to include/exclude stubbing for simulation. By default, sources and sinks are replaces (stubbed) by the runtime to avoid trying to compile hardware specific code for sensing or actuation. In some cases, for example a sink or source used as a middleware bridge, you might want to run the real code even in simulation. This option allows to control this behavior. Note: Normal tasks will be run in sim and this parameter ignored.
logging: Option<NodeLogging>
Config passed to the task.
Implementations§
Source§impl Node
impl Node
pub fn new(id: &str, ptype: &str) -> Self
pub fn get_id(&self) -> String
pub fn get_type(&self) -> &str
pub fn set_type(self, name: Option<String>) -> Self
pub fn is_background(&self) -> bool
pub fn get_instance_config(&self) -> Option<&ComponentConfig>
Sourcepub fn is_run_in_sim(&self) -> bool
pub fn is_run_in_sim(&self) -> bool
By default, assume a source or a sink is not run in sim. Normal tasks will be run in sim and this parameter ignored.