that will be a lot of API changes
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
f6d2cfa042
commit
0b81198c03
@ -87,7 +87,7 @@ use delegate::delegate;
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use spacepackets::ecss::tc::IsPusTelecommand;
|
use spacepackets::ecss::tc::IsPusTelecommand;
|
||||||
use spacepackets::ecss::tm::{PusTmCreator, PusTmSecondaryHeader};
|
use spacepackets::ecss::tm::{PusTmCreator, PusTmSecondaryHeader};
|
||||||
use spacepackets::ecss::{EcssEnumeration, PusError, SerializablePusPacket};
|
use spacepackets::ecss::{EcssEnumeration, PusError, WritablePusPacket};
|
||||||
use spacepackets::{CcsdsPacket, PacketId, PacketSequenceCtrl};
|
use spacepackets::{CcsdsPacket, PacketId, PacketSequenceCtrl};
|
||||||
use spacepackets::{SpHeader, MAX_APID};
|
use spacepackets::{SpHeader, MAX_APID};
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ impl<'src_data, State, SuccessOrFailure> VerificationSendable<'src_data, State,
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn len_packed(&self) -> usize {
|
pub fn len_packed(&self) -> usize {
|
||||||
self.pus_tm.as_ref().unwrap().len_packed()
|
self.pus_tm.as_ref().unwrap().len_written()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pus_tm(&self) -> &PusTmCreator<'src_data> {
|
pub fn pus_tm(&self) -> &PusTmCreator<'src_data> {
|
||||||
|
@ -11,7 +11,7 @@ pub mod std_mod {
|
|||||||
use crate::pool::{ShareablePoolProvider, SharedPool, StoreAddr};
|
use crate::pool::{ShareablePoolProvider, SharedPool, StoreAddr};
|
||||||
use crate::pus::EcssTmtcError;
|
use crate::pus::EcssTmtcError;
|
||||||
use spacepackets::ecss::tm::PusTmCreator;
|
use spacepackets::ecss::tm::PusTmCreator;
|
||||||
use spacepackets::ecss::SerializablePusPacket;
|
use spacepackets::ecss::WritablePusPacket;
|
||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
@ -32,7 +32,7 @@ pub mod std_mod {
|
|||||||
|
|
||||||
pub fn add_pus_tm(&self, pus_tm: &PusTmCreator) -> Result<StoreAddr, EcssTmtcError> {
|
pub fn add_pus_tm(&self, pus_tm: &PusTmCreator) -> Result<StoreAddr, EcssTmtcError> {
|
||||||
let mut pg = self.pool.write().map_err(|_| EcssTmtcError::StoreLock)?;
|
let mut pg = self.pool.write().map_err(|_| EcssTmtcError::StoreLock)?;
|
||||||
let (addr, buf) = pg.free_element(pus_tm.len_packed())?;
|
let (addr, buf) = pg.free_element(pus_tm.len_written())?;
|
||||||
pus_tm
|
pus_tm
|
||||||
.write_to_bytes(buf)
|
.write_to_bytes(buf)
|
||||||
.expect("writing PUS TM to store failed");
|
.expect("writing PUS TM to store failed");
|
||||||
@ -59,7 +59,7 @@ impl PusTmWithCdsShortHelper {
|
|||||||
&'a mut self,
|
&'a mut self,
|
||||||
service: u8,
|
service: u8,
|
||||||
subservice: u8,
|
subservice: u8,
|
||||||
source_data: Option<&'a [u8]>,
|
source_data: &'a [u8],
|
||||||
seq_count: u16,
|
seq_count: u16,
|
||||||
) -> PusTmCreator {
|
) -> PusTmCreator {
|
||||||
let time_stamp = TimeProvider::from_now_with_u16_days().unwrap();
|
let time_stamp = TimeProvider::from_now_with_u16_days().unwrap();
|
||||||
@ -71,7 +71,7 @@ impl PusTmWithCdsShortHelper {
|
|||||||
&'a mut self,
|
&'a mut self,
|
||||||
service: u8,
|
service: u8,
|
||||||
subservice: u8,
|
subservice: u8,
|
||||||
source_data: Option<&'a [u8]>,
|
source_data: &'a [u8],
|
||||||
stamper: &TimeProvider,
|
stamper: &TimeProvider,
|
||||||
seq_count: u16,
|
seq_count: u16,
|
||||||
) -> PusTmCreator {
|
) -> PusTmCreator {
|
||||||
@ -83,7 +83,7 @@ impl PusTmWithCdsShortHelper {
|
|||||||
&'a self,
|
&'a self,
|
||||||
service: u8,
|
service: u8,
|
||||||
subservice: u8,
|
subservice: u8,
|
||||||
source_data: Option<&'a [u8]>,
|
source_data: &'a [u8],
|
||||||
seq_count: u16,
|
seq_count: u16,
|
||||||
) -> PusTmCreator {
|
) -> PusTmCreator {
|
||||||
let mut reply_header = SpHeader::tm_unseg(self.apid, seq_count, 0).unwrap();
|
let mut reply_header = SpHeader::tm_unseg(self.apid, seq_count, 0).unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user