melvin_ob/mode_control/
signal.rs1use chrono::{DateTime, Utc};
2use tokio::task::JoinHandle;
3use crate::objective::KnownImgObjective;
4use super::mode::GlobalMode;
5
6pub(super) enum TaskEndSignal {
7 Timestamp(DateTime<Utc>),
8 Join(JoinHandle<()>),
9}
10
11#[derive(Debug)]
12pub(crate) enum PeriodicImagingEndSignal {
13 KillNow,
14 KillLastImage,
15}
16
17pub(crate) enum OpExitSignal {
18 ReInit(Box<dyn GlobalMode>),
19 Continue,
20}
21
22pub(crate) enum ExecExitSignal {
23 Continue,
24 SafeEvent,
25 NewZOEvent(KnownImgObjective),
26}
27
28pub(crate) enum WaitExitSignal {
29 Continue,
30 SafeEvent,
31 NewZOEvent(KnownImgObjective),
32 BOEvent,
33}
34
35pub(super) type OptOpExitSignal = Option<OpExitSignal>;