eurosim-obsw/src/can.rs

33 lines
649 B
Rust
Raw Normal View History

2022-12-21 18:44:33 +01:00
use std::sync::Receiver;
use std::sync::Sender;
use satrs_core::pool::StoreAddr;
#[cfg(feature = "can")]
use socketcan;
use crate::tmtc::TmStore;
struct CanThreadArgs {
rx_can_request: Receiver<HkRequest>,
tm_sender: Sender<StoreAddr>,
tm_store: TmStore,
}
pub type CollInterval = u32;
pub enum HkIds {
AcsHk = 0
}
pub enum HkRequest {
OneShot(HkIds),
Enable(HkIds, CollInterval), // periodic
Disable(HkIds, CollInterval)
}
// impl CanThreadArgs {
// fn operation(&self) {
//
// }
// }
fn can_thread(canthreadargs: CanThreadArgs) {
// handle tc requests
// request from devices
// send tms
}