mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-22 06:47:56 +01:00
Sensor implementation draft
This commit is contained in:
parent
2686ea112f
commit
406cebadb8
16
src/registries/sensors.rs
Normal file
16
src/registries/sensors.rs
Normal file
@ -0,0 +1,16 @@
|
||||
use futures::{Future, Stream};
|
||||
|
||||
pub struct Sensors {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Implementing Sensors.
|
||||
//
|
||||
// Given the coroutine/task split stays as it is - Sensor input to machine update being one,
|
||||
// machine update signal to actor doing thing being another, a Sensor implementation would send a
|
||||
// Stream of futures - each future being an atomic Machine update.
|
||||
#[async_trait]
|
||||
pub trait Sensor: Stream<Item = Box<dyn Future<Output = ()>>> {
|
||||
async fn setup() -> Self;
|
||||
}
|
Loading…
Reference in New Issue
Block a user