forgot to push..
Some checks failed
Rust/sat-rs/pipeline/pr-main There was a failure building this commit
Some checks failed
Rust/sat-rs/pipeline/pr-main There was a failure building this commit
This commit is contained in:
parent
e0fa0ca7f7
commit
195a7513ec
@ -167,7 +167,10 @@ impl<TcInMemConverter: EcssTcInMemConverter, Scheduler: PusSchedulerInterface>
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::pool::StaticMemoryPool;
|
||||
use core::time::Duration;
|
||||
|
||||
use crate::pool::{StaticMemoryPool, StaticPoolConfig};
|
||||
use crate::pus::tests::TEST_APID;
|
||||
use crate::{
|
||||
events::EventU32,
|
||||
pus::{
|
||||
@ -179,6 +182,10 @@ mod tests {
|
||||
};
|
||||
use alloc::collections::VecDeque;
|
||||
use delegate::delegate;
|
||||
use spacepackets::ecss::scheduling::Subservice;
|
||||
use spacepackets::ecss::tc::PusTcSecondaryHeader;
|
||||
use spacepackets::ecss::tm::{PusTmCreator, PusTmSecondaryHeader};
|
||||
use spacepackets::SpHeader;
|
||||
use spacepackets::{
|
||||
ecss::{tc::PusTcCreator, tm::PusTmReader},
|
||||
time::cds,
|
||||
@ -195,7 +202,9 @@ mod tests {
|
||||
}
|
||||
|
||||
impl Pus11HandlerWithStoreTester {
|
||||
pub fn new(sched_tc_pool: StaticMemoryPool, scheduler: PusScheduler) -> Self {
|
||||
pub fn new(scheduler: PusScheduler) -> Self {
|
||||
let pool_cfg = StaticPoolConfig::new(alloc::vec![(16, 16), (8, 32), (4, 64)]);
|
||||
let sched_tc_pool = StaticMemoryPool::new(pool_cfg.clone());
|
||||
let (common, srv_handler) = PusServiceHandlerWithSharedStoreCommon::new();
|
||||
Self {
|
||||
common,
|
||||
@ -261,5 +270,14 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_scheduling_tc() {}
|
||||
fn test_scheduling_tc() {
|
||||
let scheduler = PusScheduler::new_with_current_init_time(Duration::from_secs(5))
|
||||
.expect("Error creating scheduler");
|
||||
let mut test_harness = Pus11HandlerWithStoreTester::new(scheduler);
|
||||
|
||||
let mut reply_header = SpHeader::tm_unseg(TEST_APID, 0, 0).unwrap();
|
||||
let tc_header = PusTcSecondaryHeader::new_simple(11, Subservice::TcEnableSubschedule as u8);
|
||||
let enable_scheduling = PusTcCreator::new(&mut reply_header, tc_header, &[], true);
|
||||
let token = test_harness.send_tc(&enable_scheduling);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user