bump spacepackets
This commit is contained in:
parent
dcccc62c7d
commit
b03f585661
27
Cargo.lock
generated
27
Cargo.lock
generated
@ -114,6 +114,7 @@ dependencies = [
|
||||
"iana-time-zone",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
"serde",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
@ -203,9 +204,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cxx"
|
||||
version = "1.0.82"
|
||||
version = "1.0.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d4a41a86530d0fe7f5d9ea779916b7cadd2d4f9add748b99c2c029cbbdfaf453"
|
||||
checksum = "bdf07d07d6531bfcdbe9b8b739b104610c6508dcc4d63b410585faf338241daf"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cxxbridge-flags",
|
||||
@ -215,9 +216,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cxx-build"
|
||||
version = "1.0.82"
|
||||
version = "1.0.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06416d667ff3e3ad2df1cd8cd8afae5da26cf9cec4d0825040f88b5ca659a2f0"
|
||||
checksum = "d2eb5b96ecdc99f72657332953d4d9c50135af1bac34277801cc3937906ebd39"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"codespan-reporting",
|
||||
@ -230,15 +231,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cxxbridge-flags"
|
||||
version = "1.0.82"
|
||||
version = "1.0.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "820a9a2af1669deeef27cb271f476ffd196a2c4b6731336011e0ba63e2c7cf71"
|
||||
checksum = "ac040a39517fd1674e0f32177648334b0f4074625b5588a64519804ba0553b12"
|
||||
|
||||
[[package]]
|
||||
name = "cxxbridge-macro"
|
||||
version = "1.0.82"
|
||||
version = "1.0.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a08a6e2fcc370a089ad3b4aaf54db3b1b4cee38ddabce5896b33eb693275f470"
|
||||
checksum = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -386,9 +387,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.137"
|
||||
version = "0.2.138"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
|
||||
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
||||
|
||||
[[package]]
|
||||
name = "link-cplusplus"
|
||||
@ -683,7 +684,7 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
|
||||
|
||||
[[package]]
|
||||
name = "spacepackets"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"crc",
|
||||
@ -711,9 +712,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.104"
|
||||
version = "1.0.105"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce"
|
||||
checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -38,7 +38,7 @@ use std::vec::Vec;
|
||||
/// let ping_receiver = PingReceiver::default();
|
||||
/// let mut udp_tc_server = UdpTcServer::new(dest_addr, 2048, Box::new(ping_receiver))
|
||||
/// .expect("Creating UDP TMTC server failed");
|
||||
/// let mut sph = SpHeader::tc(0x02, 0, 0).unwrap();
|
||||
/// let mut sph = SpHeader::tc_unseg(0x02, 0, 0).unwrap();
|
||||
/// let pus_tc = PusTc::new_simple(&mut sph, 17, 1, None, true);
|
||||
/// let len = pus_tc
|
||||
/// .write_to_bytes(&mut buf)
|
||||
@ -163,7 +163,7 @@ mod tests {
|
||||
let ping_receiver = PingReceiver::default();
|
||||
let mut udp_tc_server = UdpTcServer::new(dest_addr, 2048, Box::new(ping_receiver))
|
||||
.expect("Creating UDP TMTC server failed");
|
||||
let mut sph = SpHeader::tc(0x02, 0, 0).unwrap();
|
||||
let mut sph = SpHeader::tc_unseg(0x02, 0, 0).unwrap();
|
||||
let pus_tc = PusTc::new_simple(&mut sph, 17, 1, None, true);
|
||||
let len = pus_tc
|
||||
.write_to_bytes(&mut buf)
|
||||
|
@ -174,7 +174,7 @@ impl EventReporterBase {
|
||||
src_data_len += aux_data.len();
|
||||
}
|
||||
source_buffer_large_enough(buf.len(), src_data_len)?;
|
||||
let mut sp_header = SpHeader::tm(self.apid, 0, 0).unwrap();
|
||||
let mut sp_header = SpHeader::tm_unseg(self.apid, 0, 0).unwrap();
|
||||
let sec_header = PusTmSecondaryHeader::new(
|
||||
5,
|
||||
subservice.into(),
|
||||
|
@ -67,7 +67,7 @@ pub(crate) fn source_buffer_large_enough<E>(cap: usize, len: usize) -> Result<()
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use spacepackets::tm::{PusTm, PusTmSecondaryHeaderT};
|
||||
use spacepackets::tm::{PusTm, GenericPusTmSecondaryHeader};
|
||||
use spacepackets::CcsdsPacket;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Clone)]
|
||||
|
@ -33,7 +33,7 @@
|
||||
//! let cfg = VerificationReporterCfg::new(TEST_APID, Box::new(SimpleSeqCountProvider::default()), 1, 2, 8).unwrap();
|
||||
//! let mut reporter = VerificationReporterWithSender::new(&cfg , Box::new(sender));
|
||||
//!
|
||||
//! let mut sph = SpHeader::tc(TEST_APID, 0, 0).unwrap();
|
||||
//! let mut sph = SpHeader::tc_unseg(TEST_APID, 0, 0).unwrap();
|
||||
//! let tc_header = PusTcSecondaryHeader::new_simple(17, 1);
|
||||
//! let pus_tc_0 = PusTc::new(&mut sph, tc_header, None, true);
|
||||
//! let init_token = reporter.add_tc(&pus_tc_0);
|
||||
@ -580,7 +580,7 @@ impl VerificationReporterBasic {
|
||||
step.write_to_be_bytes(&mut buf[idx..idx + step.byte_width() as usize])
|
||||
.unwrap();
|
||||
}
|
||||
let mut sp_header = SpHeader::tm(self.apid(), 0, 0).unwrap();
|
||||
let mut sp_header = SpHeader::tm_unseg(self.apid(), 0, 0).unwrap();
|
||||
Ok(self.create_pus_verif_tm_base(
|
||||
buf,
|
||||
subservice,
|
||||
@ -625,7 +625,7 @@ impl VerificationReporterBasic {
|
||||
if let Some(failure_data) = params.failure_data {
|
||||
buf[idx..idx + failure_data.len()].copy_from_slice(failure_data);
|
||||
}
|
||||
let mut sp_header = SpHeader::tm(self.apid(), 0, 0).unwrap();
|
||||
let mut sp_header = SpHeader::tm_unseg(self.apid(), 0, 0).unwrap();
|
||||
Ok(self.create_pus_verif_tm_base(
|
||||
buf,
|
||||
subservice,
|
||||
@ -1250,7 +1250,7 @@ mod tests {
|
||||
}
|
||||
|
||||
fn base_tc_init(app_data: Option<&[u8]>) -> (PusTc, RequestId) {
|
||||
let mut sph = SpHeader::tc(TEST_APID, 0x34, 0).unwrap();
|
||||
let mut sph = SpHeader::tc_unseg(TEST_APID, 0x34, 0).unwrap();
|
||||
let tc_header = PusTcSecondaryHeader::new_simple(17, 1);
|
||||
let pus_tc = PusTc::new(&mut sph, tc_header, app_data, true);
|
||||
let req_id = RequestId::new(&pus_tc);
|
||||
|
@ -54,7 +54,7 @@
|
||||
//! let mut ccsds_distributor = CcsdsDistributor::new(Box::new(apid_handler));
|
||||
//!
|
||||
//! // Create and pass PUS telecommand with a valid APID
|
||||
//! let mut space_packet_header = SpHeader::tc(0x002, 0x34, 0).unwrap();
|
||||
//! let mut space_packet_header = SpHeader::tc_unseg(0x002, 0x34, 0).unwrap();
|
||||
//! let mut pus_tc = PusTc::new_simple(&mut space_packet_header, 17, 1, None, true);
|
||||
//! let mut test_buf: [u8; 32] = [0; 32];
|
||||
//! let mut size = pus_tc
|
||||
@ -199,7 +199,7 @@ pub(crate) mod tests {
|
||||
use std::vec::Vec;
|
||||
|
||||
pub fn generate_ping_tc(buf: &mut [u8]) -> &[u8] {
|
||||
let mut sph = SpHeader::tc(0x002, 0x34, 0).unwrap();
|
||||
let mut sph = SpHeader::tc_unseg(0x002, 0x34, 0).unwrap();
|
||||
let pus_tc = PusTc::new_simple(&mut sph, 17, 1, None, true);
|
||||
let size = pus_tc
|
||||
.write_to_bytes(buf)
|
||||
@ -312,7 +312,7 @@ pub(crate) mod tests {
|
||||
unknown_packet_queue: unknown_packet_queue.clone(),
|
||||
};
|
||||
let mut ccsds_distrib = CcsdsDistributor::new(Box::new(apid_handler));
|
||||
let mut sph = SpHeader::tc(0x004, 0x34, 0).unwrap();
|
||||
let mut sph = SpHeader::tc_unseg(0x004, 0x34, 0).unwrap();
|
||||
let pus_tc = PusTc::new_simple(&mut sph, 17, 1, None, true);
|
||||
let mut test_buf: [u8; 32] = [0; 32];
|
||||
pus_tc
|
||||
|
@ -43,7 +43,7 @@
|
||||
//! let mut pus_distributor = PusDistributor::new(Box::new(service_handler));
|
||||
//!
|
||||
//! // Create and pass PUS ping telecommand with a valid APID
|
||||
//! let mut space_packet_header = SpHeader::tc(0x002, 0x34, 0).unwrap();
|
||||
//! let mut space_packet_header = SpHeader::tc_unseg(0x002, 0x34, 0).unwrap();
|
||||
//! let mut pus_tc = PusTc::new_simple(&mut space_packet_header, 17, 1, None, true);
|
||||
//! let mut test_buf: [u8; 32] = [0; 32];
|
||||
//! let mut size = pus_tc
|
||||
|
@ -44,7 +44,7 @@ impl PusTmWithCdsShortHelper {
|
||||
subservice: u8,
|
||||
source_data: Option<&'a [u8]>,
|
||||
) -> PusTm {
|
||||
let mut reply_header = SpHeader::tm(self.apid, 0, 0).unwrap();
|
||||
let mut reply_header = SpHeader::tm_unseg(self.apid, 0, 0).unwrap();
|
||||
let tc_header = PusTmSecondaryHeader::new_simple(service, subservice, &self.cds_short_buf);
|
||||
PusTm::new(&mut reply_header, tc_header, source_data, true)
|
||||
}
|
||||
|
@ -56,14 +56,14 @@ fn test_shared_reporter() {
|
||||
let (tx_tc_1, rx_tc_1) = crossbeam_channel::bounded(3);
|
||||
{
|
||||
let mut tc_guard = shared_tc_pool_0.write().unwrap();
|
||||
let mut sph = SpHeader::tc(TEST_APID, 0, 0).unwrap();
|
||||
let mut sph = SpHeader::tc_unseg(TEST_APID, 0, 0).unwrap();
|
||||
let tc_header = PusTcSecondaryHeader::new_simple(17, 1);
|
||||
let pus_tc_0 = PusTc::new(&mut sph, tc_header, None, true);
|
||||
req_id_0 = RequestId::new(&pus_tc_0);
|
||||
let (addr, mut buf) = tc_guard.free_element(pus_tc_0.len_packed()).unwrap();
|
||||
pus_tc_0.write_to_bytes(&mut buf).unwrap();
|
||||
tx_tc_0.send(addr).unwrap();
|
||||
let mut sph = SpHeader::tc(TEST_APID, 1, 0).unwrap();
|
||||
let mut sph = SpHeader::tc_unseg(TEST_APID, 1, 0).unwrap();
|
||||
let tc_header = PusTcSecondaryHeader::new_simple(5, 1);
|
||||
let pus_tc_1 = PusTc::new(&mut sph, tc_header, None, true);
|
||||
req_id_1 = RequestId::new(&pus_tc_1);
|
||||
|
@ -10,7 +10,7 @@ use std::time::Duration;
|
||||
fn main() {
|
||||
let mut buf = [0; 32];
|
||||
let addr = SocketAddr::new(IpAddr::V4(OBSW_SERVER_ADDR), SERVER_PORT);
|
||||
let mut sph = SpHeader::tc(0x02, 0, 0).unwrap();
|
||||
let mut sph = SpHeader::tc_unseg(0x02, 0, 0).unwrap();
|
||||
let pus_tc = PusTc::new_simple(&mut sph, 17, 1, None, true);
|
||||
let client = UdpSocket::bind("127.0.0.1:7302").expect("Connecting to UDP server failed");
|
||||
let tc_req_id = RequestId::new(&pus_tc);
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 97c70bf03b769ce3aa100ae771342f6810113a80
|
||||
Subproject commit 13be7ca1e7b7cca8a9604fcbbf4bd8791ee02ac7
|
Loading…
x
Reference in New Issue
Block a user