22 lines
603 B
Rust
22 lines
603 B
Rust
use trigger_logic::scene::ESceneType;
|
|
|
|
#[derive(Debug)]
|
|
pub enum ServerlessStateData {
|
|
FreshScene { procedure_id: i32 },
|
|
}
|
|
|
|
impl ServerlessStateData {
|
|
pub fn protocol_scene_data(&self) -> trigger_protocol::SceneData {
|
|
use trigger_protocol::*;
|
|
|
|
match self {
|
|
Self::FreshScene { procedure_id } => SceneData {
|
|
scene_type: ESceneType::Fresh.into(),
|
|
fresh_scene_info: Some(FreshSceneInfo {
|
|
last_procedure_id: *procedure_id as u32,
|
|
}),
|
|
..Default::default()
|
|
},
|
|
}
|
|
}
|
|
}
|