sat-rs/src/core/executable.rs

24 lines
478 B
Rust
Raw Normal View History

2022-05-16 11:24:59 +02:00
pub enum OpResult {
Ok,
}
pub enum ExecutionType {
Infinite,
Cycles(u32),
OneShot,
}
2022-05-26 18:53:07 +02:00
pub trait Executable: Send {
2022-05-16 11:24:59 +02:00
type Error;
2022-05-26 18:53:07 +02:00
//const EXEC_TYPE: ExecutionType;
//const TASK_NAME: &'static str;
2022-05-16 11:24:59 +02:00
2022-05-26 18:53:07 +02:00
fn exec_type(&self) -> ExecutionType;// {
// return Self::EXEC_TYPE;
//}
fn task_name(&self) -> &'static str;//{
// return Self::TASK_NAME;
//}
fn periodic_op(&mut self, op_code: i32) -> Result<OpResult, Self::Error>;
2022-05-16 11:24:59 +02:00
}