Skip to main content

ExecutionContext

Struct ExecutionContext 

Source
pub struct ExecutionContext { /* private fields */ }
Expand description

Konkrete ExecutionContext-Implementation — Spec §5.2.2.5 (Local-PSM-Variante).

Verwaltet:

  • Running/Stopped-State (Spec Fig 5.7).
  • Tick-Rate (Hz, Spec §5.2.2.6.4-§5.2.2.6.5).
  • Liste der teilnehmenden RTCs (durch Handle gekennzeichnet — die RTCs selbst werden vom Caller gehalten).
  • ExecutionKind (Spec §5.2.2.7).

Implementations§

Source§

impl ExecutionContext

Source

pub const fn new(kind: ExecutionKind) -> Self

Konstruiert ein neues, gestopptes ExecutionContext mit dem gegebenen ExecutionKind und Default-Rate 1.0 Hz.

Source

pub fn with_rate(kind: ExecutionKind, rate_hz: f64) -> Result<Self, ReturnCode>

Konstruiert mit expliziter Rate.

§Errors

Err(BAD_PARAMETER) wenn rate <= 0.0 oder NaN.

Trait Implementations§

Source§

impl Debug for ExecutionContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ExecutionContextOperations for ExecutionContext

Source§

fn is_running(&self) -> bool

Spec §5.2.2.6.1 — is_running.
Source§

fn start(&mut self) -> ReturnCode

Spec §5.2.2.6.2 — start. Stopped → Running.
Source§

fn stop(&mut self) -> ReturnCode

Spec §5.2.2.6.3 — stop. Running → Stopped.
Source§

fn get_rate(&self) -> f64

Spec §5.2.2.6.4 — get_rate. Tick-Rate in Hz.
Source§

fn set_rate(&mut self, rate: f64) -> ReturnCode

Spec §5.2.2.6.5 — set_rate(rate). Read more
Source§

fn add_component( &mut self, component: &mut LightweightRtObject, ) -> Result<ExecutionContextHandle, ReturnCode>

Spec §5.2.2.6.6 — add_component. Read more
Source§

fn remove_component( &mut self, component: &mut LightweightRtObject, handle: ExecutionContextHandle, ) -> ReturnCode

Spec §5.2.2.6.7 — remove_component.
Source§

fn activate_component( &mut self, component: &mut LightweightRtObject, handle: ExecutionContextHandle, ) -> ReturnCode

Spec §5.2.2.6.8 — activate_component.
Source§

fn deactivate_component( &mut self, component: &mut LightweightRtObject, handle: ExecutionContextHandle, ) -> ReturnCode

Spec §5.2.2.6.9 — deactivate_component.
Source§

fn reset_component( &mut self, component: &mut LightweightRtObject, handle: ExecutionContextHandle, ) -> ReturnCode

Spec §5.2.2.6.10 — reset_component.
Source§

fn get_component_state( &self, component: &LightweightRtObject, handle: ExecutionContextHandle, ) -> LifeCycleState

Spec §5.2.2.6.11 — get_component_state.
Source§

fn get_kind(&self) -> ExecutionKind

Spec §5.2.2.6.12 — get_kind.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.