another small update
This commit is contained in:
parent
df72676c0d
commit
8313a0b26c
12
Cargo.lock
generated
12
Cargo.lock
generated
@ -150,9 +150,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chrono"
|
name = "chrono"
|
||||||
version = "0.4.37"
|
version = "0.4.38"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e"
|
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android-tzdata",
|
"android-tzdata",
|
||||||
"iana-time-zone",
|
"iana-time-zone",
|
||||||
@ -590,7 +590,7 @@ checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "satrs"
|
name = "satrs"
|
||||||
version = "0.2.0-rc.0"
|
version = "0.2.0-rc.0"
|
||||||
source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=rework-tmtc-modules#301a7a19a62a4f4541e8c7299cd67ab347c44352"
|
source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=rework-tmtc-modules#794094ae9fc948cc1575c48d2d57cfe0deb8c799"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bus",
|
"bus",
|
||||||
"cobs",
|
"cobs",
|
||||||
@ -615,7 +615,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "satrs-mib"
|
name = "satrs-mib"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=rework-tmtc-modules#301a7a19a62a4f4541e8c7299cd67ab347c44352"
|
source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=rework-tmtc-modules#794094ae9fc948cc1575c48d2d57cfe0deb8c799"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"csv",
|
"csv",
|
||||||
"satrs-mib-codegen",
|
"satrs-mib-codegen",
|
||||||
@ -627,7 +627,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "satrs-mib-codegen"
|
name = "satrs-mib-codegen"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=rework-tmtc-modules#301a7a19a62a4f4541e8c7299cd67ab347c44352"
|
source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=rework-tmtc-modules#794094ae9fc948cc1575c48d2d57cfe0deb8c799"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -637,7 +637,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "satrs-shared"
|
name = "satrs-shared"
|
||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=rework-tmtc-modules#301a7a19a62a4f4541e8c7299cd67ab347c44352"
|
source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=rework-tmtc-modules#794094ae9fc948cc1575c48d2d57cfe0deb8c799"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"spacepackets",
|
"spacepackets",
|
||||||
|
@ -8,10 +8,9 @@ use log::{info, warn};
|
|||||||
use ops_sat_rs::config::tasks::STOP_CHECK_FREQUENCY;
|
use ops_sat_rs::config::tasks::STOP_CHECK_FREQUENCY;
|
||||||
use satrs::{
|
use satrs::{
|
||||||
hal::std::tcp_server::{HandledConnectionHandler, ServerConfig, TcpSpacepacketsServer},
|
hal::std::tcp_server::{HandledConnectionHandler, ServerConfig, TcpSpacepacketsServer},
|
||||||
pus::PacketAsVec,
|
|
||||||
queue::GenericSendError,
|
queue::GenericSendError,
|
||||||
spacepackets::PacketId,
|
spacepackets::PacketId,
|
||||||
tmtc::PacketSource,
|
tmtc::{PacketAsVec, PacketSource},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Default, Clone)]
|
#[derive(Default, Clone)]
|
||||||
|
@ -8,8 +8,8 @@ use mio::{Events, Interest, Poll, Token};
|
|||||||
use ops_sat_rs::config::tasks::STOP_CHECK_FREQUENCY;
|
use ops_sat_rs::config::tasks::STOP_CHECK_FREQUENCY;
|
||||||
use ops_sat_rs::config::{EXPERIMENT_PACKET_ID, TCP_SPP_SERVER_PORT};
|
use ops_sat_rs::config::{EXPERIMENT_PACKET_ID, TCP_SPP_SERVER_PORT};
|
||||||
use satrs::encoding::ccsds::parse_buffer_for_ccsds_space_packets;
|
use satrs::encoding::ccsds::parse_buffer_for_ccsds_space_packets;
|
||||||
use satrs::pus::PacketAsVec;
|
|
||||||
use satrs::queue::GenericSendError;
|
use satrs::queue::GenericSendError;
|
||||||
|
use satrs::tmtc::PacketAsVec;
|
||||||
use satrs::ComponentId;
|
use satrs::ComponentId;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ use std::sync::mpsc;
|
|||||||
|
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
use satrs::hal::std::udp_server::{ReceiveResult, UdpTcServer};
|
use satrs::hal::std::udp_server::{ReceiveResult, UdpTcServer};
|
||||||
use satrs::pus::PacketAsVec;
|
|
||||||
use satrs::queue::GenericSendError;
|
use satrs::queue::GenericSendError;
|
||||||
|
use satrs::tmtc::PacketAsVec;
|
||||||
|
|
||||||
use crate::pus::HandlingStatus;
|
use crate::pus::HandlingStatus;
|
||||||
|
|
||||||
|
@ -12,12 +12,13 @@ use satrs::pus::verification::{
|
|||||||
};
|
};
|
||||||
use satrs::pus::{
|
use satrs::pus::{
|
||||||
ActiveRequestProvider, EcssTcAndToken, EcssTcInVecConverter, EcssTmSender, EcssTmtcError,
|
ActiveRequestProvider, EcssTcAndToken, EcssTcInVecConverter, EcssTmSender, EcssTmtcError,
|
||||||
GenericConversionError, PacketAsVec, PusPacketHandlerResult, PusReplyHandler, PusServiceHelper,
|
GenericConversionError, PusPacketHandlerResult, PusReplyHandler, PusServiceHelper,
|
||||||
PusTcToRequestConverter,
|
PusTcToRequestConverter,
|
||||||
};
|
};
|
||||||
use satrs::request::{GenericMessage, UniqueApidTargetId};
|
use satrs::request::{GenericMessage, UniqueApidTargetId};
|
||||||
use satrs::spacepackets::ecss::tc::PusTcReader;
|
use satrs::spacepackets::ecss::tc::PusTcReader;
|
||||||
use satrs::spacepackets::ecss::{EcssEnumU16, PusPacket};
|
use satrs::spacepackets::ecss::{EcssEnumU16, PusPacket};
|
||||||
|
use satrs::tmtc::PacketAsVec;
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
@ -468,8 +468,9 @@ pub(crate) mod tests {
|
|||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use satrs::pus::test_util::TEST_COMPONENT_ID_0;
|
use satrs::pus::test_util::TEST_COMPONENT_ID_0;
|
||||||
use satrs::pus::{MpscTmAsVecSender, PacketAsVec, PusTmVariant};
|
use satrs::pus::{MpscTmAsVecSender, PusTmVariant};
|
||||||
use satrs::request::RequestId;
|
use satrs::request::RequestId;
|
||||||
|
use satrs::tmtc::PacketAsVec;
|
||||||
use satrs::{
|
use satrs::{
|
||||||
pus::{
|
pus::{
|
||||||
verification::test_util::TestVerificationReporter, ActivePusRequestStd,
|
verification::test_util::TestVerificationReporter, ActivePusRequestStd,
|
||||||
|
@ -7,12 +7,13 @@ use satrs::pus::test::PusService17TestHandler;
|
|||||||
use satrs::pus::verification::{FailParams, VerificationReporter, VerificationReportingProvider};
|
use satrs::pus::verification::{FailParams, VerificationReporter, VerificationReportingProvider};
|
||||||
use satrs::pus::{
|
use satrs::pus::{
|
||||||
EcssTcAndToken, EcssTcInMemConverter, EcssTcInVecConverter, MpscTcReceiver, MpscTmAsVecSender,
|
EcssTcAndToken, EcssTcInMemConverter, EcssTcInVecConverter, MpscTcReceiver, MpscTmAsVecSender,
|
||||||
PacketAsVec, PusPacketHandlerResult, PusServiceHelper,
|
PusPacketHandlerResult, PusServiceHelper,
|
||||||
};
|
};
|
||||||
use satrs::spacepackets::ecss::tc::PusTcReader;
|
use satrs::spacepackets::ecss::tc::PusTcReader;
|
||||||
use satrs::spacepackets::ecss::PusPacket;
|
use satrs::spacepackets::ecss::PusPacket;
|
||||||
use satrs::spacepackets::time::cds::CdsTime;
|
use satrs::spacepackets::time::cds::CdsTime;
|
||||||
use satrs::spacepackets::time::TimeWriter;
|
use satrs::spacepackets::time::TimeWriter;
|
||||||
|
use satrs::tmtc::PacketAsVec;
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
|
|
||||||
use super::HandlingStatus;
|
use super::HandlingStatus;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
use std::sync::mpsc::{self, TryRecvError};
|
use std::sync::mpsc::{self, TryRecvError};
|
||||||
|
|
||||||
use satrs::pus::{MpscTmAsVecSender, PacketAsVec};
|
use satrs::{pus::MpscTmAsVecSender, tmtc::PacketAsVec};
|
||||||
|
|
||||||
use crate::pus::PusTcDistributor;
|
use crate::pus::{HandlingStatus, PusTcDistributor};
|
||||||
|
|
||||||
// TC source components where the heap is the backing memory of the received telecommands.
|
// TC source components where the heap is the backing memory of the received telecommands.
|
||||||
pub struct TcSourceTaskDynamic {
|
pub struct TcSourceTaskDynamic {
|
||||||
@ -25,7 +25,7 @@ impl TcSourceTaskDynamic {
|
|||||||
self.poll_tc();
|
self.poll_tc();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn poll_tc(&mut self) -> bool {
|
pub fn poll_tc(&mut self) -> HandlingStatus {
|
||||||
// Right now, we only expect PUS packets. If any other protocols like CFDP are added at
|
// Right now, we only expect PUS packets. If any other protocols like CFDP are added at
|
||||||
// a later stage, we probably need to check for the APID before routing the packet.
|
// a later stage, we probably need to check for the APID before routing the packet.
|
||||||
match self.tc_receiver.try_recv() {
|
match self.tc_receiver.try_recv() {
|
||||||
@ -33,13 +33,13 @@ impl TcSourceTaskDynamic {
|
|||||||
self.pus_distrib
|
self.pus_distrib
|
||||||
.handle_tc_packet(packet_with_sender.sender_id, packet_with_sender.packet)
|
.handle_tc_packet(packet_with_sender.sender_id, packet_with_sender.packet)
|
||||||
.ok();
|
.ok();
|
||||||
true
|
HandlingStatus::HandledOne
|
||||||
}
|
}
|
||||||
Err(e) => match e {
|
Err(e) => match e {
|
||||||
TryRecvError::Empty => false,
|
TryRecvError::Empty => HandlingStatus::Empty,
|
||||||
TryRecvError::Disconnected => {
|
TryRecvError::Disconnected => {
|
||||||
log::warn!("tmtc thread: sender disconnected");
|
log::warn!("tmtc thread: sender disconnected");
|
||||||
false
|
HandlingStatus::Empty
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ use std::{collections::HashMap, sync::mpsc, time::Duration};
|
|||||||
|
|
||||||
use log::info;
|
use log::info;
|
||||||
use ops_sat_rs::config::tasks::STOP_CHECK_FREQUENCY;
|
use ops_sat_rs::config::tasks::STOP_CHECK_FREQUENCY;
|
||||||
use satrs::pus::PacketAsVec;
|
use satrs::tmtc::PacketAsVec;
|
||||||
use satrs::{
|
use satrs::{
|
||||||
seq_count::{CcsdsSimpleSeqCountProvider, SequenceCountProviderCore},
|
seq_count::{CcsdsSimpleSeqCountProvider, SequenceCountProviderCore},
|
||||||
spacepackets::{
|
spacepackets::{
|
||||||
|
Loading…
Reference in New Issue
Block a user