update for spacepackets changes
Some checks failed
Rust/sat-rs/pipeline/pr-main There was a failure building this commit

This commit is contained in:
Robin Müller 2024-04-03 18:28:04 +02:00
parent cba4a29396
commit 8a6b56fd96
Signed by: muellerr
GPG Key ID: A649FB78196E3849
5 changed files with 6 additions and 11 deletions

View File

@ -153,7 +153,7 @@ impl<ComInterface: SpiInterface, TmSender: EcssTmSenderCore>
hk::Subservice::TmHkPacket as u8, hk::Subservice::TmHkPacket as u8,
0, 0,
0, 0,
Some(self.stamp_helper.stamp()), self.stamp_helper.stamp(),
); );
let mgm_snapshot = *self.shared_mgm_set.lock().unwrap(); let mgm_snapshot = *self.shared_mgm_set.lock().unwrap();
// Use binary serialization here. We want the data to be tightly packed. // Use binary serialization here. We want the data to be tightly packed.

View File

@ -13,7 +13,7 @@ fn main() {
let mut buf = [0; 32]; let mut buf = [0; 32];
let addr = SocketAddr::new(IpAddr::V4(OBSW_SERVER_ADDR), SERVER_PORT); let addr = SocketAddr::new(IpAddr::V4(OBSW_SERVER_ADDR), SERVER_PORT);
let mut sph = SpHeader::tc_unseg(0x02, 0, 0).unwrap(); let mut sph = SpHeader::tc_unseg(0x02, 0, 0).unwrap();
let pus_tc = PusTcCreator::new_simple(&mut sph, 17, 1, None, true); let pus_tc = PusTcCreator::new_simple(&mut sph, 17, 1, &[], true);
let client = UdpSocket::bind("127.0.0.1:7302").expect("Connecting to UDP server failed"); let client = UdpSocket::bind("127.0.0.1:7302").expect("Connecting to UDP server failed");
let tc_req_id = RequestId::new(&pus_tc); let tc_req_id = RequestId::new(&pus_tc);
println!("Packing and sending PUS ping command TC[17,1] with request ID {tc_req_id}"); println!("Packing and sending PUS ping command TC[17,1] with request ID {tc_req_id}");

View File

@ -80,13 +80,8 @@ impl PusReplyHandler<ActivePusRequestStd, ModeReply> for ModeReplyHandler {
let req_id = verification::RequestId::from(reply.request_id()); let req_id = verification::RequestId::from(reply.request_id());
let mut sp_header = SpHeader::tm_unseg(req_id.packet_id().apid(), 0, 0) let mut sp_header = SpHeader::tm_unseg(req_id.packet_id().apid(), 0, 0)
.expect("generating SP header failed"); .expect("generating SP header failed");
let sec_header = PusTmSecondaryHeader::new( let sec_header =
200, PusTmSecondaryHeader::new(200, Subservice::TmModeReply as u8, 0, 0, time_stamp);
Subservice::TmModeReply as u8,
0,
0,
Some(time_stamp),
);
let pus_tm = PusTmCreator::new(&mut sp_header, sec_header, &source_data, true); let pus_tm = PusTmCreator::new(&mut sp_header, sec_header, &source_data, true);
tm_sender.send_tm(self.owner_id, PusTmVariant::Direct(pus_tm))?; tm_sender.send_tm(self.owner_id, PusTmVariant::Direct(pus_tm))?;
verification_handler.completion_success(tm_sender, started_token, time_stamp)?; verification_handler.completion_success(tm_sender, started_token, time_stamp)?;

View File

@ -115,7 +115,7 @@ impl EventReportCreator {
source_buffer_large_enough(src_data_buf.len(), src_data_len)?; source_buffer_large_enough(src_data_buf.len(), src_data_len)?;
let mut sp_header = SpHeader::tm_unseg(self.apid, 0, 0).unwrap(); let mut sp_header = SpHeader::tm_unseg(self.apid, 0, 0).unwrap();
let sec_header = let sec_header =
PusTmSecondaryHeader::new(5, subservice.into(), 0, self.dest_id, Some(time_stamp)); PusTmSecondaryHeader::new(5, subservice.into(), 0, self.dest_id, time_stamp);
let mut current_idx = 0; let mut current_idx = 0;
event_id.write_to_be_bytes(&mut src_data_buf[0..event_id.size()])?; event_id.write_to_be_bytes(&mut src_data_buf[0..event_id.size()])?;
current_idx += event_id.size(); current_idx += event_id.size();

View File

@ -868,7 +868,7 @@ impl VerificationReportCreator {
source_data_len: usize, source_data_len: usize,
) -> PusTmCreator<'time, 'src_data> { ) -> PusTmCreator<'time, 'src_data> {
let tm_sec_header = let tm_sec_header =
PusTmSecondaryHeader::new(1, subservice, msg_counter, self.dest_id, Some(time_stamp)); PusTmSecondaryHeader::new(1, subservice, msg_counter, self.dest_id, time_stamp);
PusTmCreator::new( PusTmCreator::new(
sp_header, sp_header,
tm_sec_header, tm_sec_header,