bump used spacepackets version
This commit is contained in:
parent
e03620542c
commit
1f27c23447
89
Cargo.lock
generated
89
Cargo.lock
generated
@ -72,9 +72,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.11.1"
|
||||
version = "3.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba"
|
||||
checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
|
||||
|
||||
[[package]]
|
||||
name = "bus"
|
||||
@ -151,9 +151,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "crc-catalog"
|
||||
version = "2.1.0"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff"
|
||||
checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484"
|
||||
|
||||
[[package]]
|
||||
name = "critical-section"
|
||||
@ -204,9 +204,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cxx"
|
||||
version = "1.0.86"
|
||||
version = "1.0.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579"
|
||||
checksum = "b61a7545f753a88bcbe0a70de1fcc0221e10bfc752f576754fa91e663db1622e"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cxxbridge-flags",
|
||||
@ -216,9 +216,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cxx-build"
|
||||
version = "1.0.86"
|
||||
version = "1.0.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70"
|
||||
checksum = "f464457d494b5ed6905c63b0c4704842aba319084a0a3561cdc1359536b53200"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"codespan-reporting",
|
||||
@ -231,15 +231,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cxxbridge-flags"
|
||||
version = "1.0.86"
|
||||
version = "1.0.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c"
|
||||
checksum = "43c7119ce3a3701ed81aca8410b9acf6fc399d2629d057b87e2efa4e63a3aaea"
|
||||
|
||||
[[package]]
|
||||
name = "cxxbridge-macro"
|
||||
version = "1.0.86"
|
||||
version = "1.0.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5"
|
||||
checksum = "65e07508b90551e610910fa648a1878991d367064997a596135b86df30daf07e"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -259,9 +259,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dissimilar"
|
||||
version = "1.0.5"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bd5f0c7e4bd266b8ab2550e6238d2e74977c23c15536ac7be45e9c95e2e3fbbb"
|
||||
checksum = "210ec60ae7d710bed8683e333e9d2855a8a56a3e9892b38bad3bb0d4d29b0d5e"
|
||||
|
||||
[[package]]
|
||||
name = "downcast-rs"
|
||||
@ -304,9 +304,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.13.1"
|
||||
version = "0.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038"
|
||||
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
]
|
||||
@ -474,9 +474,9 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot_core"
|
||||
version = "0.9.5"
|
||||
version = "0.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba"
|
||||
checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
@ -504,9 +504,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.49"
|
||||
version = "1.0.50"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5"
|
||||
checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
@ -568,7 +568,7 @@ dependencies = [
|
||||
"postcard",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"spacepackets 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"spacepackets 0.5.0 (git+https://egit.irs.uni-stuttgart.de/rust/spacepackets.git?rev=1e9079307273e414a6333bf575322c1eb302c93e)",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
@ -684,7 +684,7 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
|
||||
|
||||
[[package]]
|
||||
name = "spacepackets"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"crc",
|
||||
@ -697,9 +697,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "spacepackets"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9199251260fa674673a195bbe68703ba8d7ac0875d97df05cd4b5618218da054"
|
||||
version = "0.5.0"
|
||||
source = "git+https://egit.irs.uni-stuttgart.de/rust/spacepackets.git?rev=1e9079307273e414a6333bf575322c1eb302c93e#1e9079307273e414a6333bf575322c1eb302c93e"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"crc",
|
||||
@ -737,27 +736,27 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "termcolor"
|
||||
version = "1.1.3"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
|
||||
checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.5.10"
|
||||
version = "0.5.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f"
|
||||
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "trybuild"
|
||||
version = "1.0.75"
|
||||
version = "1.0.76"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1212c215a87a183687a7cc7065901b1a98da6b37277d51a1b5faedbb4efd4f3"
|
||||
checksum = "6ed2c57956f91546d4d33614265a85d55c8e1ab91484853a10335894786d7db6"
|
||||
dependencies = [
|
||||
"dissimilar",
|
||||
"glob",
|
||||
@ -889,45 +888,45 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
|
||||
checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
|
||||
checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
|
||||
checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
|
||||
checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed"
|
||||
checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
|
||||
checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.42.0"
|
||||
version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
|
||||
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
|
@ -53,8 +53,11 @@ default-features = false
|
||||
optional = true
|
||||
|
||||
[dependencies.spacepackets]
|
||||
# git = "https://egit.irs.uni-stuttgart.de/rust/spacepackets.git"
|
||||
version = "0.4.0"
|
||||
git = "https://egit.irs.uni-stuttgart.de/rust/spacepackets.git"
|
||||
# path = "../spacepackets"
|
||||
# version = "0.4.0"
|
||||
rev = "1e9079307273e414a6333bf575322c1eb302c93e"
|
||||
|
||||
default-features = false
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -181,7 +181,7 @@ impl EventReporterBase {
|
||||
subservice.into(),
|
||||
self.msg_count,
|
||||
self.dest_id,
|
||||
time_stamp,
|
||||
Some(time_stamp),
|
||||
);
|
||||
let mut current_idx = 0;
|
||||
event_id.write_to_be_bytes(&mut buf[0..event_id.byte_width()])?;
|
||||
|
@ -15,6 +15,8 @@ use spacepackets::{ByteConversionError, SizeMissmatch};
|
||||
pub mod event;
|
||||
pub mod event_man;
|
||||
pub mod hk;
|
||||
#[cfg(feature = "std")]
|
||||
pub mod scheduling;
|
||||
pub mod verification;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
27
satrs-core/src/pus/scheduling.rs
Normal file
27
satrs-core/src/pus/scheduling.rs
Normal file
@ -0,0 +1,27 @@
|
||||
use crate::pool::StoreAddr;
|
||||
use spacepackets::time::cds;
|
||||
use spacepackets::time::cds::TimeProvider;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
pub struct PusScheduler {
|
||||
tc_map: BTreeMap<cds::TimeProvider, StoreAddr>,
|
||||
}
|
||||
|
||||
impl PusScheduler {
|
||||
pub fn insert_tc(&mut self, time_stamp: TimeProvider, addr: StoreAddr) {
|
||||
self.tc_map.insert(time_stamp, addr);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::pus::scheduling::PusScheduler;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
#[test]
|
||||
fn wtf() {
|
||||
let scheduler = PusScheduler {
|
||||
tc_map: BTreeMap::new(),
|
||||
};
|
||||
}
|
||||
}
|
@ -260,14 +260,14 @@ impl<STATE> VerificationToken<STATE> {
|
||||
|
||||
/// Composite helper struct to pass failure parameters to the [VerificationReporter]
|
||||
pub struct FailParams<'stamp, 'fargs> {
|
||||
time_stamp: &'stamp [u8],
|
||||
time_stamp: Option<&'stamp [u8]>,
|
||||
failure_code: &'fargs dyn EcssEnumeration,
|
||||
failure_data: Option<&'fargs [u8]>,
|
||||
}
|
||||
|
||||
impl<'stamp, 'fargs> FailParams<'stamp, 'fargs> {
|
||||
pub fn new(
|
||||
time_stamp: &'stamp [u8],
|
||||
time_stamp: Option<&'stamp [u8]>,
|
||||
failure_code: &'fargs impl EcssEnumeration,
|
||||
failure_data: Option<&'fargs [u8]>,
|
||||
) -> Self {
|
||||
@ -287,7 +287,7 @@ pub struct FailParamsWithStep<'stamp, 'fargs> {
|
||||
|
||||
impl<'stamp, 'fargs> FailParamsWithStep<'stamp, 'fargs> {
|
||||
pub fn new(
|
||||
time_stamp: &'stamp [u8],
|
||||
time_stamp: Option<&'stamp [u8]>,
|
||||
step: &'fargs impl EcssEnumeration,
|
||||
failure_code: &'fargs impl EcssEnumeration,
|
||||
failure_data: Option<&'fargs [u8]>,
|
||||
@ -457,7 +457,7 @@ impl VerificationReporterCore {
|
||||
subservice: u8,
|
||||
token: VerificationToken<State>,
|
||||
seq_counter: &(impl SequenceCountProviderCore<u16> + ?Sized),
|
||||
time_stamp: &'src_data [u8],
|
||||
time_stamp: Option<&'src_data [u8]>,
|
||||
) -> Result<
|
||||
VerificationSendable<'src_data, State, VerifSuccess>,
|
||||
VerificationErrorWithToken<State>,
|
||||
@ -508,7 +508,7 @@ impl VerificationReporterCore {
|
||||
src_data_buf: &'src_data mut [u8],
|
||||
token: VerificationToken<TcStateNone>,
|
||||
seq_counter: &(impl SequenceCountProviderCore<u16> + ?Sized),
|
||||
time_stamp: &'src_data [u8],
|
||||
time_stamp: Option<&'src_data [u8]>,
|
||||
) -> Result<
|
||||
VerificationSendable<'src_data, TcStateNone, VerifSuccess>,
|
||||
VerificationErrorWithToken<TcStateNone>,
|
||||
@ -577,7 +577,7 @@ impl VerificationReporterCore {
|
||||
src_data_buf: &'src_data mut [u8],
|
||||
token: VerificationToken<TcStateAccepted>,
|
||||
seq_counter: &(impl SequenceCountProviderCore<u16> + ?Sized),
|
||||
time_stamp: &'src_data [u8],
|
||||
time_stamp: Option<&'src_data [u8]>,
|
||||
) -> Result<
|
||||
VerificationSendable<'src_data, TcStateAccepted, VerifSuccess>,
|
||||
VerificationErrorWithToken<TcStateAccepted>,
|
||||
@ -651,7 +651,7 @@ impl VerificationReporterCore {
|
||||
src_data_buf: &'src_data mut [u8],
|
||||
token: &VerificationToken<TcStateStarted>,
|
||||
seq_counter: &(impl SequenceCountProviderCore<u16> + ?Sized),
|
||||
time_stamp: &'src_data [u8],
|
||||
time_stamp: Option<&'src_data [u8]>,
|
||||
step: impl EcssEnumeration,
|
||||
) -> Result<VerificationSendable<'src_data, TcStateStarted, VerifSuccess>, EcssTmError> {
|
||||
Ok(VerificationSendable::new_no_token(
|
||||
@ -703,7 +703,7 @@ impl VerificationReporterCore {
|
||||
src_data_buf: &'src_data mut [u8],
|
||||
token: VerificationToken<TcStateStarted>,
|
||||
seq_counter: &(impl SequenceCountProviderCore<u16> + ?Sized),
|
||||
time_stamp: &'src_data [u8],
|
||||
time_stamp: Option<&'src_data [u8]>,
|
||||
) -> Result<
|
||||
VerificationSendable<'src_data, TcStateStarted, VerifSuccess>,
|
||||
VerificationErrorWithToken<TcStateStarted>,
|
||||
@ -773,7 +773,7 @@ impl VerificationReporterCore {
|
||||
subservice: u8,
|
||||
msg_counter: u16,
|
||||
req_id: &RequestId,
|
||||
time_stamp: &'src_data [u8],
|
||||
time_stamp: Option<&'src_data [u8]>,
|
||||
step: Option<&(impl EcssEnumeration + ?Sized)>,
|
||||
) -> Result<PusTm<'src_data>, EcssTmError> {
|
||||
let mut source_data_len = size_of::<u32>();
|
||||
@ -850,7 +850,7 @@ impl VerificationReporterCore {
|
||||
subservice: u8,
|
||||
msg_counter: u16,
|
||||
sp_header: &mut SpHeader,
|
||||
time_stamp: &'src_data [u8],
|
||||
time_stamp: Option<&'src_data [u8]>,
|
||||
source_data_len: usize,
|
||||
) -> PusTm<'src_data> {
|
||||
let tm_sec_header =
|
||||
@ -948,7 +948,7 @@ mod alloc_mod {
|
||||
&mut self,
|
||||
token: VerificationToken<TcStateNone>,
|
||||
sender: &mut (impl EcssTmSenderCore<Error = E> + ?Sized),
|
||||
time_stamp: &[u8],
|
||||
time_stamp: Option<&[u8]>,
|
||||
) -> Result<
|
||||
VerificationToken<TcStateAccepted>,
|
||||
VerificationOrSendErrorWithToken<E, TcStateNone>,
|
||||
@ -987,7 +987,7 @@ mod alloc_mod {
|
||||
&mut self,
|
||||
token: VerificationToken<TcStateAccepted>,
|
||||
sender: &mut (impl EcssTmSenderCore<Error = E> + ?Sized),
|
||||
time_stamp: &[u8],
|
||||
time_stamp: Option<&[u8]>,
|
||||
) -> Result<
|
||||
VerificationToken<TcStateStarted>,
|
||||
VerificationOrSendErrorWithToken<E, TcStateAccepted>,
|
||||
@ -1029,7 +1029,7 @@ mod alloc_mod {
|
||||
&mut self,
|
||||
token: &VerificationToken<TcStateStarted>,
|
||||
sender: &mut (impl EcssTmSenderCore<Error = E> + ?Sized),
|
||||
time_stamp: &[u8],
|
||||
time_stamp: Option<&[u8]>,
|
||||
step: impl EcssEnumeration,
|
||||
) -> Result<(), EcssTmErrorWithSend<E>> {
|
||||
let sendable = self.reporter.step_success(
|
||||
@ -1075,7 +1075,7 @@ mod alloc_mod {
|
||||
&mut self,
|
||||
token: VerificationToken<TcStateStarted>,
|
||||
sender: &mut (impl EcssTmSenderCore<Error = E> + ?Sized),
|
||||
time_stamp: &[u8],
|
||||
time_stamp: Option<&[u8]>,
|
||||
) -> Result<(), VerificationOrSendErrorWithToken<E, TcStateStarted>> {
|
||||
let sendable = self.reporter.completion_success(
|
||||
self.source_data_buf.as_mut_slice(),
|
||||
@ -1152,7 +1152,7 @@ mod alloc_mod {
|
||||
pub fn acceptance_success(
|
||||
&mut self,
|
||||
token: VerificationToken<TcStateNone>,
|
||||
time_stamp: &[u8],
|
||||
time_stamp: Option<&[u8]>,
|
||||
) -> Result<
|
||||
VerificationToken<TcStateAccepted>,
|
||||
VerificationOrSendErrorWithToken<E, TcStateNone>,
|
||||
@ -1173,7 +1173,7 @@ mod alloc_mod {
|
||||
pub fn start_success(
|
||||
&mut self,
|
||||
token: VerificationToken<TcStateAccepted>,
|
||||
time_stamp: &[u8],
|
||||
time_stamp: Option<&[u8]>,
|
||||
) -> Result<
|
||||
VerificationToken<TcStateStarted>,
|
||||
VerificationOrSendErrorWithToken<E, TcStateAccepted>,
|
||||
@ -1194,7 +1194,7 @@ mod alloc_mod {
|
||||
pub fn step_success(
|
||||
&mut self,
|
||||
token: &VerificationToken<TcStateStarted>,
|
||||
time_stamp: &[u8],
|
||||
time_stamp: Option<&[u8]>,
|
||||
step: impl EcssEnumeration,
|
||||
) -> Result<(), EcssTmErrorWithSend<E>> {
|
||||
self.reporter
|
||||
@ -1213,7 +1213,7 @@ mod alloc_mod {
|
||||
pub fn completion_success(
|
||||
&mut self,
|
||||
token: VerificationToken<TcStateStarted>,
|
||||
time_stamp: &[u8],
|
||||
time_stamp: Option<&[u8]>,
|
||||
) -> Result<(), VerificationOrSendErrorWithToken<E, TcStateStarted>> {
|
||||
self.reporter
|
||||
.completion_success(token, self.sender.as_mut(), time_stamp)
|
||||
|
@ -178,7 +178,7 @@ fn main() {
|
||||
let mut time_provider = TimeProvider::new_with_u16_days(0, 0);
|
||||
let mut report_completion = |event_req: EventRequestWithToken, timestamp: &[u8]| {
|
||||
reporter_event_handler
|
||||
.completion_success(event_req.token, timestamp)
|
||||
.completion_success(event_req.token, Some(timestamp))
|
||||
.expect("Sending completion success failed");
|
||||
};
|
||||
loop {
|
||||
@ -246,10 +246,10 @@ fn main() {
|
||||
},
|
||||
}
|
||||
let started_token = reporter_aocs
|
||||
.start_success(request.1, ×tamp)
|
||||
.start_success(request.1, Some(×tamp))
|
||||
.expect("Sending start success failed");
|
||||
reporter_aocs
|
||||
.completion_success(started_token, ×tamp)
|
||||
.completion_success(started_token, Some(×tamp))
|
||||
.expect("Sending completion success failed");
|
||||
}
|
||||
Err(e) => match e {
|
||||
|
@ -70,7 +70,7 @@ impl PusServiceProvider for PusReceiver {
|
||||
self.update_time_stamp();
|
||||
let accepted_token = self
|
||||
.verif_reporter
|
||||
.acceptance_success(init_token, &self.time_stamp)
|
||||
.acceptance_success(init_token, Some(&self.time_stamp))
|
||||
.expect("Acceptance success failure");
|
||||
if service == 17 {
|
||||
self.handle_test_service(pus_tc, accepted_token);
|
||||
@ -83,7 +83,7 @@ impl PusServiceProvider for PusReceiver {
|
||||
self.verif_reporter
|
||||
.start_failure(
|
||||
accepted_token,
|
||||
FailParams::new(&self.time_stamp, &tmtc_err::INVALID_PUS_SERVICE, None),
|
||||
FailParams::new(Some(&self.time_stamp), &tmtc_err::INVALID_PUS_SERVICE, None),
|
||||
)
|
||||
.expect("Start failure verification failed")
|
||||
}
|
||||
@ -100,20 +100,24 @@ impl PusReceiver {
|
||||
let addr = self.tm_store.add_pus_tm(&ping_reply);
|
||||
let start_token = self
|
||||
.verif_reporter
|
||||
.start_success(token, &self.time_stamp)
|
||||
.start_success(token, Some(&self.time_stamp))
|
||||
.expect("Error sending start success");
|
||||
self.tm_tx
|
||||
.send(addr)
|
||||
.expect("Sending TM to TM funnel failed");
|
||||
self.verif_reporter
|
||||
.completion_success(start_token, &self.time_stamp)
|
||||
.completion_success(start_token, Some(&self.time_stamp))
|
||||
.expect("Error sending completion success");
|
||||
} else {
|
||||
self.update_time_stamp();
|
||||
self.verif_reporter
|
||||
.start_failure(
|
||||
token,
|
||||
FailParams::new(&self.time_stamp, &tmtc_err::INVALID_PUS_SUBSERVICE, None),
|
||||
FailParams::new(
|
||||
Some(&self.time_stamp),
|
||||
&tmtc_err::INVALID_PUS_SUBSERVICE,
|
||||
None,
|
||||
),
|
||||
)
|
||||
.expect("Sending start failure TM failed");
|
||||
}
|
||||
@ -134,7 +138,7 @@ impl PusReceiver {
|
||||
self.verif_reporter
|
||||
.start_failure(
|
||||
token,
|
||||
FailParams::new(&self.time_stamp, &tmtc_err::NOT_ENOUGH_APP_DATA, None),
|
||||
FailParams::new(Some(&self.time_stamp), &tmtc_err::NOT_ENOUGH_APP_DATA, None),
|
||||
)
|
||||
.expect("Sending start failure TM failed");
|
||||
return;
|
||||
@ -148,7 +152,7 @@ impl PusReceiver {
|
||||
};
|
||||
self.update_time_stamp();
|
||||
self.verif_reporter
|
||||
.start_failure(token, FailParams::new(&self.time_stamp, err, None))
|
||||
.start_failure(token, FailParams::new(Some(&self.time_stamp), err, None))
|
||||
.expect("Sending start failure TM failed");
|
||||
return;
|
||||
}
|
||||
@ -158,7 +162,7 @@ impl PusReceiver {
|
||||
self.verif_reporter
|
||||
.start_failure(
|
||||
token,
|
||||
FailParams::new(&self.time_stamp, &hk_err::UNKNOWN_TARGET_ID, None),
|
||||
FailParams::new(Some(&self.time_stamp), &hk_err::UNKNOWN_TARGET_ID, None),
|
||||
)
|
||||
.expect("Sending start failure TM failed");
|
||||
return;
|
||||
@ -183,7 +187,7 @@ impl PusReceiver {
|
||||
.start_failure(
|
||||
token,
|
||||
FailParams::new(
|
||||
&self.time_stamp,
|
||||
Some(&self.time_stamp),
|
||||
&hk_err::COLLECTION_INTERVAL_MISSING,
|
||||
None,
|
||||
),
|
||||
@ -205,14 +209,14 @@ impl PusReceiver {
|
||||
verif_reporter
|
||||
.start_failure(
|
||||
token,
|
||||
FailParams::new(timestamp, failure_code, failure_data),
|
||||
FailParams::new(Some(timestamp), failure_code, failure_data),
|
||||
)
|
||||
.expect("Sending start failure TM failed");
|
||||
};
|
||||
let send_start_acceptance = |verif_reporter: &mut StdVerifReporterWithSender,
|
||||
timestamp: &[u8; 7]| {
|
||||
verif_reporter
|
||||
.start_success(token, timestamp)
|
||||
.start_success(token, Some(timestamp))
|
||||
.expect("Sending start success TM failed")
|
||||
};
|
||||
if pus_tc.user_data().is_none() {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 2385e7812b658ece079c90fdef14df422527f141
|
||||
Subproject commit 1e9079307273e414a6333bf575322c1eb302c93e
|
Loading…
x
Reference in New Issue
Block a user