This commit is contained in:
parent
75fda42f4f
commit
a7ca00317f
@ -340,7 +340,13 @@ pub fn generate_insert_telecommand_app_data(
|
|||||||
|
|
||||||
#[cfg(feature = "alloc")]
|
#[cfg(feature = "alloc")]
|
||||||
pub mod alloc_mod {
|
pub mod alloc_mod {
|
||||||
use alloc::{collections::{btree_map::{Entry, Range}, BTreeMap}, vec::Vec};
|
use alloc::{
|
||||||
|
collections::{
|
||||||
|
btree_map::{Entry, Range},
|
||||||
|
BTreeMap,
|
||||||
|
},
|
||||||
|
vec::Vec,
|
||||||
|
};
|
||||||
use spacepackets::time::cds::{self, DaysLen24Bits};
|
use spacepackets::time::cds::{self, DaysLen24Bits};
|
||||||
|
|
||||||
use crate::pool::StoreAddr;
|
use crate::pool::StoreAddr;
|
||||||
@ -569,8 +575,7 @@ pub mod alloc_mod {
|
|||||||
pub fn retrieve_by_time_filter<TimeProvider: CcsdsTimeProvider>(
|
pub fn retrieve_by_time_filter<TimeProvider: CcsdsTimeProvider>(
|
||||||
&mut self,
|
&mut self,
|
||||||
time_window: TimeWindow<TimeProvider>,
|
time_window: TimeWindow<TimeProvider>,
|
||||||
) -> Range<'_, UnixTimestamp, alloc::vec::Vec<TcInfo>>
|
) -> Range<'_, UnixTimestamp, alloc::vec::Vec<TcInfo>> {
|
||||||
{
|
|
||||||
match time_window.time_window_type() {
|
match time_window.time_window_type() {
|
||||||
TimeWindowType::SelectAll => self.tc_map.range(..),
|
TimeWindowType::SelectAll => self.tc_map.range(..),
|
||||||
TimeWindowType::TimeTagToTimeTag => {
|
TimeWindowType::TimeTagToTimeTag => {
|
||||||
@ -776,10 +781,7 @@ pub mod alloc_mod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Retrieve all telecommands which should be release based on the current time.
|
/// Retrieve all telecommands which should be release based on the current time.
|
||||||
pub fn telecommands_to_release(
|
pub fn telecommands_to_release(&self) -> Range<'_, UnixTimestamp, Vec<TcInfo>> {
|
||||||
&self,
|
|
||||||
) -> Range<'_, UnixTimestamp, Vec<TcInfo>>
|
|
||||||
{
|
|
||||||
self.tc_map.range(..=self.current_time)
|
self.tc_map.range(..=self.current_time)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user