Skip to main content

ComponentAction

Trait ComponentAction 

Source
pub trait ComponentAction {
    // Provided methods
    fn on_initialize(&mut self) -> ReturnCode { ... }
    fn on_finalize(&mut self) -> ReturnCode { ... }
    fn on_startup(&mut self, _exec_handle: u32) -> ReturnCode { ... }
    fn on_shutdown(&mut self, _exec_handle: u32) -> ReturnCode { ... }
    fn on_activated(&mut self, _exec_handle: u32) -> ReturnCode { ... }
    fn on_deactivated(&mut self, _exec_handle: u32) -> ReturnCode { ... }
    fn on_aborting(&mut self, _exec_handle: u32) -> ReturnCode { ... }
    fn on_error(&mut self, _exec_handle: u32) -> ReturnCode { ... }
    fn on_reset(&mut self, _exec_handle: u32) -> ReturnCode { ... }
}
Expand description

ComponentAction Trait — Spec §5.2.2.4 (S. 20-21).

Spec-Zitat: “ComponentAction interface provides callbacks corresponding to the execution of the lifecycle operations of LightweightRTObject and ExecutionContext.”

Default-Implementations geben ReturnCode::Ok zurueck — Anwender implementieren nur die Callbacks, die fuer ihre Domaene relevant sind (Spec §5.2.2.4: “An RTC developer may implement these callback operations in order to execute application-specific logic”).

Provided Methods§

Source

fn on_initialize(&mut self) -> ReturnCode

Spec §5.2.2.4.1 — RTC has been initialized and entered Alive state.

Source

fn on_finalize(&mut self) -> ReturnCode

Spec §5.2.2.4.2 — RTC is being destroyed.

Source

fn on_startup(&mut self, _exec_handle: u32) -> ReturnCode

Spec §5.2.2.4.3 — Execution-Context transitioned Stopped → Running.

Source

fn on_shutdown(&mut self, _exec_handle: u32) -> ReturnCode

Spec §5.2.2.4.4 — Execution-Context transitioned Running → Stopped.

Source

fn on_activated(&mut self, _exec_handle: u32) -> ReturnCode

Spec §5.2.2.4.5 — RTC has been activated.

Source

fn on_deactivated(&mut self, _exec_handle: u32) -> ReturnCode

Spec §5.2.2.4.6 — RTC has been deactivated.

Source

fn on_aborting(&mut self, _exec_handle: u32) -> ReturnCode

Spec §5.2.2.4.7 — RTC transitions Active → Error (single invocation).

Source

fn on_error(&mut self, _exec_handle: u32) -> ReturnCode

Spec §5.2.2.4.8 — RTC remains in Error state (repeated per tick wenn ExecutionKind::Periodic).

Source

fn on_reset(&mut self, _exec_handle: u32) -> ReturnCode

Spec §5.2.2.4.9 — Reset-Versuch aus Error-State zurueck zu Inactive.

Implementors§