bump spacepackets dependency
This commit is contained in:
parent
8a5fae1a95
commit
46039b8d1d
@ -148,7 +148,8 @@ impl<E: 'static> ReceivesTc for CcsdsDistributor<E> {
|
||||
}),
|
||||
));
|
||||
}
|
||||
let (sp_header, _) = SpHeader::from_be_bytes(tc_raw).map_err(|e| CcsdsError::PacketError(e))?;
|
||||
let (sp_header, _) =
|
||||
SpHeader::from_be_bytes(tc_raw).map_err(|e| CcsdsError::PacketError(e))?;
|
||||
self.dispatch_ccsds(&sp_header, tc_raw)
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
use spacepackets::time::{CdsShortTimeProvider, TimeWriter};
|
||||
use spacepackets::time::cds::TimeProvider;
|
||||
use spacepackets::time::TimeWriter;
|
||||
use spacepackets::tm::{PusTm, PusTmSecondaryHeader};
|
||||
use spacepackets::SpHeader;
|
||||
|
||||
@ -22,7 +23,7 @@ impl PusTmWithCdsShortHelper {
|
||||
subservice: u8,
|
||||
source_data: Option<&'a [u8]>,
|
||||
) -> PusTm {
|
||||
let time_stamp = CdsShortTimeProvider::from_now().unwrap();
|
||||
let time_stamp = TimeProvider::from_now_with_u16_days().unwrap();
|
||||
time_stamp.write_to_bytes(&mut self.cds_short_buf).unwrap();
|
||||
self.create_pus_tm_common(service, subservice, source_data)
|
||||
}
|
||||
@ -32,7 +33,7 @@ impl PusTmWithCdsShortHelper {
|
||||
service: u8,
|
||||
subservice: u8,
|
||||
source_data: Option<&'a [u8]>,
|
||||
stamper: &CdsShortTimeProvider,
|
||||
stamper: &TimeProvider,
|
||||
) -> PusTm {
|
||||
stamper.write_to_bytes(&mut self.cds_short_buf).unwrap();
|
||||
self.create_pus_tm_common(service, subservice, source_data)
|
||||
|
@ -20,7 +20,8 @@ use satrs_core::pus::{EcssTmError, EcssTmSender};
|
||||
use satrs_core::seq_count::SimpleSeqCountProvider;
|
||||
use satrs_core::tmtc::CcsdsError;
|
||||
use satrs_example::{OBSW_SERVER_ADDR, SERVER_PORT};
|
||||
use spacepackets::time::{CdsShortTimeProvider, TimeWriter};
|
||||
use spacepackets::time::cds::TimeProvider;
|
||||
use spacepackets::time::TimeWriter;
|
||||
use spacepackets::tm::PusTm;
|
||||
use std::net::{IpAddr, SocketAddr};
|
||||
use std::sync::mpsc::channel;
|
||||
@ -132,7 +133,7 @@ fn main() {
|
||||
let jh2 = thread::spawn(move || {
|
||||
let mut timestamp: [u8; 7] = [0; 7];
|
||||
let mut sender = EventTmSender::new(tm_store_helper, tm_funnel_tx);
|
||||
let mut time_provider = CdsShortTimeProvider::new(0, 0);
|
||||
let mut time_provider = TimeProvider::new_with_u16_days(0, 0);
|
||||
let mut report_completion = |event_req: EventRequestWithToken, timestamp: &[u8]| {
|
||||
reporter1
|
||||
.completion_success(event_req.token, timestamp)
|
||||
@ -171,7 +172,7 @@ fn main() {
|
||||
jh2.join().expect("Joining Event Manager thread failed");
|
||||
}
|
||||
|
||||
pub fn update_time(time_provider: &mut CdsShortTimeProvider, timestamp: &mut [u8]) {
|
||||
pub fn update_time(time_provider: &mut TimeProvider, timestamp: &mut [u8]) {
|
||||
time_provider
|
||||
.update_from_now()
|
||||
.expect("Could not get current time");
|
||||
|
@ -12,7 +12,8 @@ use satrs_core::tmtc::PusServiceProvider;
|
||||
use satrs_example::{INVALID_PUS_SERVICE, INVALID_PUS_SUBSERVICE, NOT_ENOUGH_APP_DATA};
|
||||
use spacepackets::ecss::PusPacket;
|
||||
use spacepackets::tc::PusTc;
|
||||
use spacepackets::time::{CdsShortTimeProvider, TimeWriter};
|
||||
use spacepackets::time::cds::TimeProvider;
|
||||
use spacepackets::time::TimeWriter;
|
||||
use spacepackets::SpHeader;
|
||||
use std::sync::mpsc;
|
||||
|
||||
@ -22,7 +23,7 @@ pub struct PusReceiver {
|
||||
pub tm_store: TmStore,
|
||||
pub verif_reporter: StdVerifReporterWithSender,
|
||||
event_request_tx: mpsc::Sender<EventRequestWithToken>,
|
||||
stamper: CdsShortTimeProvider,
|
||||
stamper: TimeProvider,
|
||||
time_stamp: [u8; 7],
|
||||
}
|
||||
|
||||
@ -40,7 +41,7 @@ impl PusReceiver {
|
||||
tm_store,
|
||||
verif_reporter,
|
||||
event_request_tx,
|
||||
stamper: CdsShortTimeProvider::default(),
|
||||
stamper: TimeProvider::default(),
|
||||
time_stamp: [0; 7],
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 038755e56eb4f43f5959687180fa98c80cd16b59
|
||||
Subproject commit 4d643946373a86b45e71d6cda0d535e29005f9ba
|
Loading…
x
Reference in New Issue
Block a user