pub trait ExecutionContextOperations {
// Required methods
fn is_running(&self) -> bool;
fn start(&mut self) -> ReturnCode;
fn stop(&mut self) -> ReturnCode;
fn get_rate(&self) -> f64;
fn set_rate(&mut self, rate: f64) -> ReturnCode;
fn add_component(
&mut self,
component: &mut LightweightRtObject,
) -> Result<ExecutionContextHandle, ReturnCode>;
fn remove_component(
&mut self,
component: &mut LightweightRtObject,
handle: ExecutionContextHandle,
) -> ReturnCode;
fn activate_component(
&mut self,
component: &mut LightweightRtObject,
handle: ExecutionContextHandle,
) -> ReturnCode;
fn deactivate_component(
&mut self,
component: &mut LightweightRtObject,
handle: ExecutionContextHandle,
) -> ReturnCode;
fn reset_component(
&mut self,
component: &mut LightweightRtObject,
handle: ExecutionContextHandle,
) -> ReturnCode;
fn get_component_state(
&self,
component: &LightweightRtObject,
handle: ExecutionContextHandle,
) -> LifeCycleState;
fn get_kind(&self) -> ExecutionKind;
}Expand description
ExecutionContext Trait — Spec §5.2.2.5 (S. 22-23).
“An ExecutionContext allows the business logic of an RTC to be decoupled from the thread of control in which it is executed.”
Diese Trait definiert die externe Sicht; konkrete Realisationen
erben davon. Der Body der Trait ist die ExecutionContextOperations-
Iface aus Spec §5.2.2.6.
Required Methods§
Sourcefn is_running(&self) -> bool
fn is_running(&self) -> bool
Spec §5.2.2.6.1 — is_running.
Sourcefn start(&mut self) -> ReturnCode
fn start(&mut self) -> ReturnCode
Spec §5.2.2.6.2 — start. Stopped → Running.
Sourcefn stop(&mut self) -> ReturnCode
fn stop(&mut self) -> ReturnCode
Spec §5.2.2.6.3 — stop. Running → Stopped.
Sourcefn set_rate(&mut self, rate: f64) -> ReturnCode
fn set_rate(&mut self, rate: f64) -> ReturnCode
Sourcefn add_component(
&mut self,
component: &mut LightweightRtObject,
) -> Result<ExecutionContextHandle, ReturnCode>
fn add_component( &mut self, component: &mut LightweightRtObject, ) -> Result<ExecutionContextHandle, ReturnCode>
Spec §5.2.2.6.6 — add_component.
§Errors
Liefert ReturnCode::Err wenn das RTC nicht alive ist oder
schon im Context registriert.
Sourcefn remove_component(
&mut self,
component: &mut LightweightRtObject,
handle: ExecutionContextHandle,
) -> ReturnCode
fn remove_component( &mut self, component: &mut LightweightRtObject, handle: ExecutionContextHandle, ) -> ReturnCode
Spec §5.2.2.6.7 — remove_component.
Sourcefn activate_component(
&mut self,
component: &mut LightweightRtObject,
handle: ExecutionContextHandle,
) -> ReturnCode
fn activate_component( &mut self, component: &mut LightweightRtObject, handle: ExecutionContextHandle, ) -> ReturnCode
Spec §5.2.2.6.8 — activate_component.
Sourcefn deactivate_component(
&mut self,
component: &mut LightweightRtObject,
handle: ExecutionContextHandle,
) -> ReturnCode
fn deactivate_component( &mut self, component: &mut LightweightRtObject, handle: ExecutionContextHandle, ) -> ReturnCode
Spec §5.2.2.6.9 — deactivate_component.
Sourcefn reset_component(
&mut self,
component: &mut LightweightRtObject,
handle: ExecutionContextHandle,
) -> ReturnCode
fn reset_component( &mut self, component: &mut LightweightRtObject, handle: ExecutionContextHandle, ) -> ReturnCode
Spec §5.2.2.6.10 — reset_component.
Sourcefn get_component_state(
&self,
component: &LightweightRtObject,
handle: ExecutionContextHandle,
) -> LifeCycleState
fn get_component_state( &self, component: &LightweightRtObject, handle: ExecutionContextHandle, ) -> LifeCycleState
Spec §5.2.2.6.11 — get_component_state.
Sourcefn get_kind(&self) -> ExecutionKind
fn get_kind(&self) -> ExecutionKind
Spec §5.2.2.6.12 — get_kind.