pub trait GlobalMode: Sync + Send {
Show 16 methods
// Required methods
fn type_name(&self) -> &'static str;
fn init_mode<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = OpExitSignal> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn exec_task_wait<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
due: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = WaitExitSignal> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn exec_task<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
task: Task,
) -> Pin<Box<dyn Future<Output = ExecExitSignal> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn safe_handler<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = OpExitSignal> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn zo_handler<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Arc<ModeContext>,
obj: KnownImgObjective,
) -> Pin<Box<dyn Future<Output = Option<OpExitSignal>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn bo_event_handler<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = Option<OpExitSignal>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn exit_mode<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = Box<dyn GlobalMode>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn safe_mode_rationale(&self) -> &'static str { ... }
fn new_zo_rationale(&self) -> &'static str { ... }
fn new_bo_rationale(&self) -> &'static str { ... }
fn tasks_done_rationale(&self) -> &'static str { ... }
fn tasks_done_exit_rationale(&self) -> &'static str { ... }
fn out_of_orbit_rationale(&self) -> &'static str { ... }
fn bo_done_rationale(&self) -> &'static str { ... }
fn exec_task_queue<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = OpExitSignal> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Trait representing a high-level operational mode within the onboard Finite-State-Machine (FSM) architecture.
Implementors of GlobalMode encapsulate full behavioral logic for mode-specific task scheduling,
signal handling, and state transitions.
Required Methods§
Sourcefn init_mode<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = OpExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init_mode<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = OpExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initializes the mode with the provided context.
§Arguments
context- Shared reference to the current mode context.
§Returns
OpExitSignal - Signal indicating what action to take after initialization.
Sourcefn exec_task_wait<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
due: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = WaitExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exec_task_wait<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
due: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = WaitExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn exec_task<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
task: Task,
) -> Pin<Box<dyn Future<Output = ExecExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exec_task<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
task: Task,
) -> Pin<Box<dyn Future<Output = ExecExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn safe_handler<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = OpExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn safe_handler<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = OpExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn zo_handler<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Arc<ModeContext>,
obj: KnownImgObjective,
) -> Pin<Box<dyn Future<Output = Option<OpExitSignal>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn zo_handler<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Arc<ModeContext>,
obj: KnownImgObjective,
) -> Pin<Box<dyn Future<Output = Option<OpExitSignal>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn bo_event_handler<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = Option<OpExitSignal>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bo_event_handler<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = Option<OpExitSignal>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn exit_mode<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = Box<dyn GlobalMode>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exit_mode<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = Box<dyn GlobalMode>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn safe_mode_rationale(&self) -> &'static str
fn safe_mode_rationale(&self) -> &'static str
Returns the rationale string for finishing the current phase due to safe mode entry.
Sourcefn new_zo_rationale(&self) -> &'static str
fn new_zo_rationale(&self) -> &'static str
Returns the rationale string for finishing the current phase due to a new Zoned Objective.
Sourcefn new_bo_rationale(&self) -> &'static str
fn new_bo_rationale(&self) -> &'static str
Returns the rationale string for finishing the current phase due to a new Beacon Objective.
Sourcefn tasks_done_rationale(&self) -> &'static str
fn tasks_done_rationale(&self) -> &'static str
Returns the rationale string used when the task queue has completed.
Sourcefn tasks_done_exit_rationale(&self) -> &'static str
fn tasks_done_exit_rationale(&self) -> &'static str
Returns the rationale for finishing the task queue and exiting the orbit for ZO Retrieval.
Sourcefn out_of_orbit_rationale(&self) -> &'static str
fn out_of_orbit_rationale(&self) -> &'static str
Returns the rationale for finishing the current phase due to being outside of orbit without a valid reason.
Sourcefn bo_done_rationale(&self) -> &'static str
fn bo_done_rationale(&self) -> &'static str
Returns the rationale used for finishing the current phase when a beacon objective has been completed or expired.
Sourcefn exec_task_queue<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = OpExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exec_task_queue<'life0, 'async_trait>(
&'life0 self,
context: Arc<ModeContext>,
) -> Pin<Box<dyn Future<Output = OpExitSignal> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Executes all tasks in the current task queue in sequence. Waits for each task’s scheduled time and handles early exit signals such as safe transitions or new objectives.
§Arguments
context- Shared reference to the current mode context.
§Returns
OpExitSignal- Signal indicating whether to continue or exit the mode.