33 lines
649 B
Rust
33 lines
649 B
Rust
|
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
|
||
|
}
|