mod emgauwa_now; mod emgauwa_uid; mod request; mod schedule_uid; mod relay_state; use actix::Message; pub use emgauwa_now::EmgauwaNow; pub use emgauwa_uid::EmgauwaUid; pub use relay_state::{RelayState, RelayStates}; pub use request::*; pub use schedule_uid::ScheduleUid; use serde_derive::{Deserialize, Serialize}; use crate::db::DbSchedule; use crate::errors::EmgauwaError; use crate::models::{Controller, Relay}; #[derive(Debug, Serialize, Deserialize, Message)] #[rtype(result = "Result<(), EmgauwaError>")] pub enum ControllerWsAction { Register(Controller), Disconnect, Schedules(Vec<DbSchedule>), Relays(Vec<Relay>), Controller(Controller), RelayStates((EmgauwaUid, RelayStates)), RelayPulse((i64, Option<u32>)), }