Continue CFDP handlers #90
@ -87,7 +87,7 @@ use delegate::delegate;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use spacepackets::ecss::tc::IsPusTelecommand;
|
||||
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::{SpHeader, MAX_APID};
|
||||
|
||||
@ -353,7 +353,7 @@ impl<'src_data, State, SuccessOrFailure> VerificationSendable<'src_data, State,
|
||||
}
|
||||
|
||||
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> {
|
||||
|
@ -11,7 +11,7 @@ pub mod std_mod {
|
||||
use crate::pool::{ShareablePoolProvider, SharedPool, StoreAddr};
|
||||
use crate::pus::EcssTmtcError;
|
||||
use spacepackets::ecss::tm::PusTmCreator;
|
||||
use spacepackets::ecss::SerializablePusPacket;
|
||||
use spacepackets::ecss::WritablePusPacket;
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
||||
#[derive(Clone)]
|
||||
@ -32,7 +32,7 @@ pub mod std_mod {
|
||||
|
||||
pub fn add_pus_tm(&self, pus_tm: &PusTmCreator) -> Result<StoreAddr, EcssTmtcError> {
|
||||
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
|
||||
.write_to_bytes(buf)
|
||||
.expect("writing PUS TM to store failed");
|
||||
@ -59,7 +59,7 @@ impl PusTmWithCdsShortHelper {
|
||||
&'a mut self,
|
||||
service: u8,
|
||||
subservice: u8,
|
||||
source_data: Option<&'a [u8]>,
|
||||
source_data: &'a [u8],
|
||||
seq_count: u16,
|
||||
) -> PusTmCreator {
|
||||
let time_stamp = TimeProvider::from_now_with_u16_days().unwrap();
|
||||
@ -71,7 +71,7 @@ impl PusTmWithCdsShortHelper {
|
||||
&'a mut self,
|
||||
service: u8,
|
||||
subservice: u8,
|
||||
source_data: Option<&'a [u8]>,
|
||||
source_data: &'a [u8],
|
||||
stamper: &TimeProvider,
|
||||
seq_count: u16,
|
||||
) -> PusTmCreator {
|
||||
@ -83,7 +83,7 @@ impl PusTmWithCdsShortHelper {
|
||||
&'a self,
|
||||
service: u8,
|
||||
subservice: u8,
|
||||
source_data: Option<&'a [u8]>,
|
||||
source_data: &'a [u8],
|
||||
seq_count: u16,
|
||||
) -> PusTmCreator {
|
||||
let mut reply_header = SpHeader::tm_unseg(self.apid, seq_count, 0).unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user