diff --git a/satrs-example/src/events.rs b/satrs-example/src/events.rs index b8f019b..2496b9a 100644 --- a/satrs-example/src/events.rs +++ b/satrs-example/src/events.rs @@ -2,7 +2,7 @@ use std::sync::mpsc::{self}; use crate::pus::create_verification_reporter; use satrs::event_man::{EventMessageU32, EventRoutingError}; -use satrs::pus::event::EventTmHookProvider; +use satrs::pus::event::EventTmHook; use satrs::pus::verification::VerificationReporter; use satrs::pus::EcssTmSender; use satrs::request::UniqueApidTargetId; @@ -26,7 +26,7 @@ pub struct EventApidSetter { pub next_apid: u16, } -impl EventTmHookProvider for EventApidSetter { +impl EventTmHook for EventApidSetter { fn modify_tm(&self, tm: &mut satrs::spacepackets::ecss::tm::PusTmCreator) { tm.set_apid(self.next_apid); } @@ -219,7 +219,7 @@ impl EventHandler { mod tests { use satrs::{ events::EventU32, - pus::verification::VerificationReporterCfg, + pus::verification::VerificationReporterConfig, spacepackets::{ ecss::{tm::PusTmReader, PusPacket}, CcsdsPacket, @@ -244,7 +244,7 @@ mod tests { let (event_tx, event_rx) = mpsc::sync_channel(10); let (_event_req_tx, event_req_rx) = mpsc::sync_channel(10); let (tm_sender, tm_receiver) = mpsc::channel(); - let verif_reporter_cfg = VerificationReporterCfg::new(0x05, 2, 2, 128).unwrap(); + let verif_reporter_cfg = VerificationReporterConfig::new(0x05, 2, 2, 128).unwrap(); let verif_reporter = VerificationReporter::new(PUS_EVENT_MANAGEMENT.id(), &verif_reporter_cfg); let mut event_manager = EventManagerWithBoundedMpsc::new(event_rx); diff --git a/satrs-example/src/main.rs b/satrs-example/src/main.rs index 3f6e165..82ed30c 100644 --- a/satrs-example/src/main.rs +++ b/satrs-example/src/main.rs @@ -33,7 +33,7 @@ use satrs::{ hal::std::{tcp_server::ServerConfig, udp_server::UdpTcServer}, mode::{Mode, ModeAndSubmode, ModeRequest, ModeRequestHandlerMpscBounded}, mode_tree::connect_mode_nodes, - pus::{event_man::EventRequestWithToken, EcssTcInMemConverter, HandlingStatus}, + pus::{event_man::EventRequestWithToken, EcssTcInMemConverterWrapper, HandlingStatus}, request::{GenericMessage, MessageMetadata}, spacepackets::time::{cds::CdsTime, TimeWriter}, }; @@ -145,7 +145,7 @@ fn main() { let tc_in_mem_converter = EcssTcInMemConverter::Static(EcssTcInSharedPoolConverter::new(shared_tc_pool, 4096)); } else if #[cfg(feature = "heap_tmtc")] { - let tc_in_mem_converter = EcssTcInMemConverter::Heap(EcssTcInVecConverter::default()); + let tc_in_mem_converter = EcssTcInMemConverterWrapper::Heap(EcssTcInVecConverter::default()); } } diff --git a/satrs-example/src/pus/action.rs b/satrs-example/src/pus/action.rs index 8f4df96..0c0bced 100644 --- a/satrs-example/src/pus/action.rs +++ b/satrs-example/src/pus/action.rs @@ -9,7 +9,7 @@ use satrs::pus::verification::{ VerificationReportingProvider, VerificationToken, }; use satrs::pus::{ - ActiveRequestProvider, EcssTcAndToken, EcssTcInMemConverter, EcssTmSender, EcssTmtcError, + ActiveRequest, EcssTcAndToken, EcssTcInMemConverterWrapper, EcssTmSender, EcssTmtcError, GenericConversionError, MpscTcReceiver, PusPacketHandlingError, PusReplyHandler, PusServiceHelper, PusTcToRequestConverter, }; @@ -208,7 +208,7 @@ impl PusTcToRequestConverter for Actio pub fn create_action_service( tm_sender: TmTcSender, - tc_in_mem_converter: EcssTcInMemConverter, + tc_in_mem_converter: EcssTcInMemConverterWrapper, pus_action_rx: mpsc::Receiver, action_router: GenericRequestRouter, reply_receiver: mpsc::Receiver>, @@ -325,7 +325,7 @@ mod tests { pus_action_rx, TmTcSender::Heap(tm_funnel_tx.clone()), verif_reporter, - EcssTcInMemConverter::Heap(EcssTcInVecConverter::default()), + EcssTcInMemConverterWrapper::Heap(EcssTcInVecConverter::default()), ), ActionRequestConverter::default(), DefaultActiveActionRequestMap::default(), diff --git a/satrs-example/src/pus/event.rs b/satrs-example/src/pus/event.rs index 64972da..6d9a6e4 100644 --- a/satrs-example/src/pus/event.rs +++ b/satrs-example/src/pus/event.rs @@ -6,7 +6,7 @@ use satrs::pus::event_man::EventRequestWithToken; use satrs::pus::event_srv::PusEventServiceHandler; use satrs::pus::verification::VerificationReporter; use satrs::pus::{ - DirectPusPacketHandlerResult, EcssTcAndToken, EcssTcInMemConverter, MpscTcReceiver, + DirectPusPacketHandlerResult, EcssTcAndToken, EcssTcInMemConverterWrapper, MpscTcReceiver, PartialPusHandlingError, PusServiceHelper, }; use satrs::spacepackets::ecss::PusServiceId; @@ -16,7 +16,7 @@ use super::{DirectPusService, HandlingStatus}; pub fn create_event_service( tm_sender: TmTcSender, - tm_in_pool_converter: EcssTcInMemConverter, + tm_in_pool_converter: EcssTcInMemConverterWrapper, pus_event_rx: mpsc::Receiver, event_request_tx: mpsc::Sender, ) -> EventServiceWrapper { @@ -39,7 +39,7 @@ pub struct EventServiceWrapper { pub handler: PusEventServiceHandler< MpscTcReceiver, TmTcSender, - EcssTcInMemConverter, + EcssTcInMemConverterWrapper, VerificationReporter, >, } diff --git a/satrs-example/src/pus/hk.rs b/satrs-example/src/pus/hk.rs index 60d5b69..1f96c68 100644 --- a/satrs-example/src/pus/hk.rs +++ b/satrs-example/src/pus/hk.rs @@ -5,9 +5,10 @@ use satrs::pus::verification::{ VerificationReportingProvider, VerificationToken, }; use satrs::pus::{ - ActivePusRequestStd, ActiveRequestProvider, DefaultActiveRequestMap, EcssTcAndToken, - EcssTcInMemConverter, EcssTmSender, EcssTmtcError, GenericConversionError, MpscTcReceiver, - PusPacketHandlingError, PusReplyHandler, PusServiceHelper, PusTcToRequestConverter, + ActivePusRequestStd, ActiveRequest, DefaultActiveRequestMap, EcssTcAndToken, + EcssTcInMemConverterWrapper, EcssTmSender, EcssTmtcError, GenericConversionError, + MpscTcReceiver, PusPacketHandlingError, PusReplyHandler, PusServiceHelper, + PusTcToRequestConverter, }; use satrs::request::{GenericMessage, UniqueApidTargetId}; use satrs::res_code::ResultU16; @@ -242,7 +243,7 @@ impl PusTcToRequestConverter for HkRequestConver pub fn create_hk_service( tm_sender: TmTcSender, - tc_in_mem_converter: EcssTcInMemConverter, + tc_in_mem_converter: EcssTcInMemConverterWrapper, pus_hk_rx: mpsc::Receiver, request_router: GenericRequestRouter, reply_receiver: mpsc::Receiver>, diff --git a/satrs-example/src/pus/mod.rs b/satrs-example/src/pus/mod.rs index d1be121..6e9462c 100644 --- a/satrs-example/src/pus/mod.rs +++ b/satrs-example/src/pus/mod.rs @@ -4,13 +4,13 @@ use log::warn; use satrs::pool::PoolAddr; use satrs::pus::verification::{ self, FailParams, TcStateAccepted, TcStateStarted, VerificationReporter, - VerificationReporterCfg, VerificationReportingProvider, VerificationToken, + VerificationReporterConfig, VerificationReportingProvider, VerificationToken, }; use satrs::pus::{ - ActiveRequestMapProvider, ActiveRequestProvider, EcssTcAndToken, EcssTcInMemConversionProvider, - EcssTcInMemConverter, EcssTcReceiver, EcssTmSender, EcssTmtcError, GenericConversionError, - GenericRoutingError, HandlingStatus, PusPacketHandlingError, PusReplyHandler, PusRequestRouter, - PusServiceHelper, PusTcToRequestConverter, TcInMemory, + ActiveRequest, ActiveRequestStore, CacheAndReadRawEcssTc, EcssTcAndToken, + EcssTcInMemConverterWrapper, EcssTcReceiver, EcssTmSender, EcssTmtcError, + GenericConversionError, GenericRoutingError, HandlingStatus, PusPacketHandlingError, + PusReplyHandler, PusRequestRouter, PusServiceHelper, PusTcToRequestConverter, TcInMemory, }; use satrs::queue::{GenericReceiveError, GenericSendError}; use satrs::request::{Apid, GenericMessage, MessageMetadata}; @@ -33,7 +33,7 @@ pub mod stack; pub mod test; pub fn create_verification_reporter(owner_id: ComponentId, apid: Apid) -> VerificationReporter { - let verif_cfg = VerificationReporterCfg::new(apid, 1, 2, 8).unwrap(); + let verif_cfg = VerificationReporterConfig::new(apid, 1, 2, 8).unwrap(); // Every software component which needs to generate verification telemetry, gets a cloned // verification reporter. VerificationReporter::new(owner_id, &verif_cfg) @@ -269,16 +269,16 @@ pub struct PusTargetedRequestService< VerificationReporter: VerificationReportingProvider, RequestConverter: PusTcToRequestConverter, ReplyHandler: PusReplyHandler, - ActiveRequestMap: ActiveRequestMapProvider, - ActiveRequestInfo: ActiveRequestProvider, + ActiveRequestMapInstance: ActiveRequestStore, + ActiveRequestInfo: ActiveRequest, RequestType, ReplyType, > { pub service_helper: - PusServiceHelper, + PusServiceHelper, pub request_router: GenericRequestRouter, pub request_converter: RequestConverter, - pub active_request_map: ActiveRequestMap, + pub active_request_map: ActiveRequestMapInstance, pub reply_handler: ReplyHandler, pub reply_receiver: mpsc::Receiver>, phantom: std::marker::PhantomData<(RequestType, ActiveRequestInfo, ReplyType)>, @@ -289,8 +289,8 @@ impl< VerificationReporter: VerificationReportingProvider, RequestConverter: PusTcToRequestConverter, ReplyHandler: PusReplyHandler, - ActiveRequestMap: ActiveRequestMapProvider, - ActiveRequestInfo: ActiveRequestProvider, + ActiveRequestMapInstance: ActiveRequestStore, + ActiveRequestInfo: ActiveRequest, RequestType, ReplyType, > @@ -299,7 +299,7 @@ impl< VerificationReporter, RequestConverter, ReplyHandler, - ActiveRequestMap, + ActiveRequestMapInstance, ActiveRequestInfo, RequestType, ReplyType, @@ -311,11 +311,11 @@ where service_helper: PusServiceHelper< TcReceiver, TmTcSender, - EcssTcInMemConverter, + EcssTcInMemConverterWrapper, VerificationReporter, >, request_converter: RequestConverter, - active_request_map: ActiveRequestMap, + active_request_map: ActiveRequestMapInstance, reply_hook: ReplyHandler, request_router: GenericRequestRouter, reply_receiver: mpsc::Receiver>, @@ -509,7 +509,7 @@ where /// and also log the error. pub fn generic_pus_request_timeout_handler( sender: &(impl EcssTmSender + ?Sized), - active_request: &(impl ActiveRequestProvider + Debug), + active_request: &(impl ActiveRequest + Debug), verification_handler: &impl VerificationReportingProvider, time_stamp: &[u8], service_str: &'static str, @@ -537,7 +537,7 @@ pub(crate) mod tests { use satrs::{ pus::{ verification::test_util::TestVerificationReporter, ActivePusRequestStd, - ActiveRequestMapProvider, MpscTcReceiver, + ActiveRequestStore, MpscTcReceiver, }, request::UniqueApidTargetId, spacepackets::{ @@ -556,7 +556,7 @@ pub(crate) mod tests { // Testbench dedicated to the testing of [PusReplyHandler]s pub struct ReplyHandlerTestbench< ReplyHandler: PusReplyHandler, - ActiveRequestInfo: ActiveRequestProvider, + ActiveRequestInfo: ActiveRequest, Reply, > { pub id: ComponentId, @@ -570,7 +570,7 @@ pub(crate) mod tests { impl< ReplyHandler: PusReplyHandler, - ActiveRequestInfo: ActiveRequestProvider, + ActiveRequestInfo: ActiveRequest, Reply, > ReplyHandlerTestbench { @@ -671,7 +671,7 @@ pub(crate) mod tests { // Testbench dedicated to the testing of [PusTcToRequestConverter]s pub struct PusConverterTestbench< Converter: PusTcToRequestConverter, - ActiveRequestInfo: ActiveRequestProvider, + ActiveRequestInfo: ActiveRequest, Request, > { pub id: ComponentId, @@ -685,7 +685,7 @@ pub(crate) mod tests { impl< Converter: PusTcToRequestConverter, - ActiveRequestInfo: ActiveRequestProvider, + ActiveRequestInfo: ActiveRequest, Request, > PusConverterTestbench { @@ -751,8 +751,8 @@ pub(crate) mod tests { pub struct TargetedPusRequestTestbench< RequestConverter: PusTcToRequestConverter, ReplyHandler: PusReplyHandler, - ActiveRequestMap: ActiveRequestMapProvider, - ActiveRequestInfo: ActiveRequestProvider, + ActiveRequestMapInstance: ActiveRequestStore, + ActiveRequestInfo: ActiveRequest, RequestType, ReplyType, > { @@ -761,7 +761,7 @@ pub(crate) mod tests { TestVerificationReporter, RequestConverter, ReplyHandler, - ActiveRequestMap, + ActiveRequestMapInstance, ActiveRequestInfo, RequestType, ReplyType, diff --git a/satrs-example/src/pus/mode.rs b/satrs-example/src/pus/mode.rs index 5ce78a7..5c2912a 100644 --- a/satrs-example/src/pus/mode.rs +++ b/satrs-example/src/pus/mode.rs @@ -8,7 +8,7 @@ use crate::requests::GenericRequestRouter; use crate::tmtc::sender::TmTcSender; use satrs::pus::verification::VerificationReporter; use satrs::pus::{ - DefaultActiveRequestMap, EcssTcAndToken, EcssTcInMemConverter, MpscTcReceiver, + DefaultActiveRequestMap, EcssTcAndToken, EcssTcInMemConverterWrapper, MpscTcReceiver, PusPacketHandlingError, PusServiceHelper, }; use satrs::request::GenericMessage; @@ -20,8 +20,8 @@ use satrs::{ self, FailParams, TcStateAccepted, TcStateStarted, VerificationReportingProvider, VerificationToken, }, - ActivePusRequestStd, ActiveRequestProvider, EcssTmSender, EcssTmtcError, - GenericConversionError, PusReplyHandler, PusTcToRequestConverter, PusTmVariant, + ActivePusRequestStd, ActiveRequest, EcssTmSender, EcssTmtcError, GenericConversionError, + PusReplyHandler, PusTcToRequestConverter, PusTmVariant, }, request::UniqueApidTargetId, spacepackets::{ @@ -210,7 +210,7 @@ impl PusTcToRequestConverter for ModeRequestCo pub fn create_mode_service( tm_sender: TmTcSender, - tc_in_mem_converter: EcssTcInMemConverter, + tc_in_mem_converter: EcssTcInMemConverterWrapper, pus_action_rx: mpsc::Receiver, mode_router: GenericRequestRouter, reply_receiver: mpsc::Receiver>, diff --git a/satrs-example/src/pus/scheduler.rs b/satrs-example/src/pus/scheduler.rs index 81d069e..fc5f957 100644 --- a/satrs-example/src/pus/scheduler.rs +++ b/satrs-example/src/pus/scheduler.rs @@ -9,7 +9,7 @@ use satrs::pus::scheduler::{PusScheduler, TcInfo}; use satrs::pus::scheduler_srv::PusSchedServiceHandler; use satrs::pus::verification::VerificationReporter; use satrs::pus::{ - DirectPusPacketHandlerResult, EcssTcAndToken, EcssTcInMemConverter, MpscTcReceiver, + DirectPusPacketHandlerResult, EcssTcAndToken, EcssTcInMemConverterWrapper, MpscTcReceiver, PartialPusHandlingError, PusServiceHelper, }; use satrs::spacepackets::ecss::PusServiceId; @@ -84,7 +84,7 @@ pub struct SchedulingServiceWrapper { pub pus_11_handler: PusSchedServiceHandler< MpscTcReceiver, TmTcSender, - EcssTcInMemConverter, + EcssTcInMemConverterWrapper, VerificationReporter, PusScheduler, >, @@ -174,7 +174,7 @@ impl SchedulingServiceWrapper { pub fn create_scheduler_service( tm_sender: TmTcSender, - tc_in_mem_converter: EcssTcInMemConverter, + tc_in_mem_converter: EcssTcInMemConverterWrapper, tc_releaser: TcReleaser, pus_sched_rx: mpsc::Receiver, sched_tc_pool: StaticMemoryPool, diff --git a/satrs-example/src/pus/test.rs b/satrs-example/src/pus/test.rs index 873a859..b914121 100644 --- a/satrs-example/src/pus/test.rs +++ b/satrs-example/src/pus/test.rs @@ -6,8 +6,8 @@ use satrs::pus::test::PusService17TestHandler; use satrs::pus::verification::{FailParams, VerificationReporter, VerificationReportingProvider}; use satrs::pus::PartialPusHandlingError; use satrs::pus::{ - DirectPusPacketHandlerResult, EcssTcAndToken, EcssTcInMemConversionProvider, - EcssTcInMemConverter, MpscTcReceiver, PusServiceHelper, + CacheAndReadRawEcssTc, DirectPusPacketHandlerResult, EcssTcAndToken, + EcssTcInMemConverterWrapper, MpscTcReceiver, PusServiceHelper, }; use satrs::spacepackets::ecss::tc::PusTcReader; use satrs::spacepackets::ecss::{PusPacket, PusServiceId}; @@ -19,7 +19,7 @@ use super::{DirectPusService, HandlingStatus}; pub fn create_test_service( tm_sender: TmTcSender, - tc_in_mem_converter: EcssTcInMemConverter, + tc_in_mem_converter: EcssTcInMemConverterWrapper, event_sender: mpsc::SyncSender, pus_test_rx: mpsc::Receiver, ) -> TestCustomServiceWrapper { @@ -40,7 +40,7 @@ pub struct TestCustomServiceWrapper { pub handler: PusService17TestHandler< MpscTcReceiver, TmTcSender, - EcssTcInMemConverter, + EcssTcInMemConverterWrapper, VerificationReporter, >, pub event_tx: mpsc::SyncSender, diff --git a/satrs-example/src/requests.rs b/satrs-example/src/requests.rs index 94af446..b5f817e 100644 --- a/satrs-example/src/requests.rs +++ b/satrs-example/src/requests.rs @@ -8,7 +8,7 @@ use satrs::mode::ModeRequest; use satrs::pus::verification::{ FailParams, TcStateAccepted, VerificationReportingProvider, VerificationToken, }; -use satrs::pus::{ActiveRequestProvider, EcssTmSender, GenericRoutingError, PusRequestRouter}; +use satrs::pus::{ActiveRequest, EcssTmSender, GenericRoutingError, PusRequestRouter}; use satrs::queue::GenericSendError; use satrs::request::{GenericMessage, MessageMetadata, UniqueApidTargetId}; use satrs::spacepackets::ecss::tc::PusTcReader; @@ -46,7 +46,7 @@ impl Default for GenericRequestRouter { impl GenericRequestRouter { pub(crate) fn handle_error_generic( &self, - active_request: &impl ActiveRequestProvider, + active_request: &impl ActiveRequest, tc: &PusTcReader, error: GenericRoutingError, tm_sender: &(impl EcssTmSender + ?Sized), diff --git a/satrs/CHANGELOG.md b/satrs/CHANGELOG.md index 7e8d095..fec9937 100644 --- a/satrs/CHANGELOG.md +++ b/satrs/CHANGELOG.md @@ -10,6 +10,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Bump `sat-rs` edition to 2024. +## Changed + +Some trait renaming to be more in-line with Rust naming conventions. + +- `EventTmHookProvider` -> `EventTmHook` +- `ActiveRequestProvider` -> `ActiveRequest` +- `EcssTcInMemConversionProvider` -> `CacheAndReadRawEcssTc` +- `ActiveRequestMapProvider` -> `ActiveRequestStore` +- `CountdownProvider` -> `Countdown` + # [v0.3.0-alpha.2] 2025-07-22 `satrs-shared` update diff --git a/satrs/src/event_man.rs b/satrs/src/event_man.rs index e7a7c9b..e430002 100644 --- a/satrs/src/event_man.rs +++ b/satrs/src/event_man.rs @@ -71,18 +71,14 @@ pub enum ListenerKey { } #[derive(Debug)] -pub struct EventMessage { +pub struct EventMessage { sender_id: ComponentId, event: Event, - params: Option, + params: Option, } -impl EventMessage { - pub fn new_generic( - sender_id: ComponentId, - event: Event, - params: Option<&ParamProvider>, - ) -> Self { +impl EventMessage { + pub fn new_generic(sender_id: ComponentId, event: Event, params: Option<&Parameters>) -> Self { Self { sender_id, event, @@ -98,7 +94,7 @@ impl EventMessage Option<&ParamProvider> { + pub fn params(&self) -> Option<&Parameters> { self.params.as_ref() } @@ -106,7 +102,7 @@ impl EventMessage Self { + pub fn new_with_params(sender_id: ComponentId, event: Event, params: &Parameters) -> Self { Self::new_generic(sender_id, event, Some(params)) } } diff --git a/satrs/src/pool.rs b/satrs/src/pool.rs index 576b445..95bdeca 100644 --- a/satrs/src/pool.rs +++ b/satrs/src/pool.rs @@ -222,7 +222,7 @@ impl Error for PoolError { } } -/// Generic trait for pool providers which provide memory pools for variable sized data. +/// Generic trait for pool providers which provide memory pools for variable sized packet data. /// /// It specifies a basic API to [Self::add], [Self::modify], [Self::read] and [Self::delete] data /// in the store at its core. The API was designed so internal optimizations can be performed diff --git a/satrs/src/pus/action.rs b/satrs/src/pus/action.rs index 24dbaac..eb84b94 100644 --- a/satrs/src/pus/action.rs +++ b/satrs/src/pus/action.rs @@ -143,7 +143,7 @@ pub mod std_mod { use crate::{ ComponentId, pus::{ - ActivePusRequestStd, ActiveRequestProvider, DefaultActiveRequestMap, + ActivePusRequestStd, ActiveRequest, DefaultActiveRequestMap, verification::{self, TcStateToken}, }, request::{MessageSenderMap, OneMessageSender}, @@ -157,7 +157,7 @@ pub mod std_mod { common: ActivePusRequestStd, } - impl ActiveRequestProvider for ActivePusActionRequestStd { + impl ActiveRequest for ActivePusActionRequestStd { delegate::delegate! { to self.common { fn target_id(&self) -> ComponentId; diff --git a/satrs/src/pus/event.rs b/satrs/src/pus/event.rs index 08b57bc..90cc767 100644 --- a/satrs/src/pus/event.rs +++ b/satrs/src/pus/event.rs @@ -139,24 +139,24 @@ mod alloc_mod { use core::cell::RefCell; use spacepackets::ecss::PusError; - pub trait EventTmHookProvider { + pub trait EventTmHook { fn modify_tm(&self, tm: &mut PusTmCreator); } #[derive(Default)] pub struct DummyEventHook {} - impl EventTmHookProvider for DummyEventHook { + impl EventTmHook for DummyEventHook { fn modify_tm(&self, _tm: &mut PusTmCreator) {} } - pub struct EventReporter { + pub struct EventReporter { id: ComponentId, // Use interior mutability pattern here. This is just an intermediate buffer to the PUS event packet // generation. source_data_buf: RefCell>, pub report_creator: EventReportCreator, - pub tm_hook: EventTmHook, + pub tm_hook: EventTmHookInstance, } impl EventReporter { @@ -175,13 +175,13 @@ mod alloc_mod { }) } } - impl EventReporter { + impl EventReporter { pub fn new_with_hook( id: ComponentId, default_apid: u16, default_dest_id: u16, max_event_id_and_aux_data_size: usize, - tm_hook: EventTmHook, + tm_hook: EventTmHookInstance, ) -> Option { let reporter = EventReportCreator::new(default_apid, default_dest_id)?; Some(Self { diff --git a/satrs/src/pus/event_man.rs b/satrs/src/pus/event_man.rs index 15e1ffa..086e9d5 100644 --- a/satrs/src/pus/event_man.rs +++ b/satrs/src/pus/event_man.rs @@ -102,7 +102,7 @@ pub mod alloc_mod { use crate::{ events::EventU16, params::{Params, WritableToBeBytes}, - pus::event::{DummyEventHook, EventTmHookProvider}, + pus::event::{DummyEventHook, EventTmHook}, }; use super::*; @@ -151,9 +151,9 @@ pub mod alloc_mod { pub struct PusEventTmCreatorWithMap< ReportingMap: PusEventReportingMapProvider, Event: GenericEvent, - EventTmHook: EventTmHookProvider = DummyEventHook, + EventTmHookInstance: EventTmHook = DummyEventHook, > { - pub reporter: EventReporter, + pub reporter: EventReporter, reporting_map: ReportingMap, phantom: PhantomData, } @@ -161,10 +161,10 @@ pub mod alloc_mod { impl< ReportingMap: PusEventReportingMapProvider, Event: GenericEvent, - EventTmHook: EventTmHookProvider, - > PusEventTmCreatorWithMap + EventTmHookInstance: EventTmHook, + > PusEventTmCreatorWithMap { - pub fn new(reporter: EventReporter, backend: ReportingMap) -> Self { + pub fn new(reporter: EventReporter, backend: ReportingMap) -> Self { Self { reporter, reporting_map: backend, @@ -262,10 +262,10 @@ pub mod alloc_mod { } } - impl - PusEventTmCreatorWithMap, Event, EventTmHook> + impl + PusEventTmCreatorWithMap, Event, EventTmHookInstance> { - pub fn new_with_default_backend(reporter: EventReporter) -> Self { + pub fn new_with_default_backend(reporter: EventReporter) -> Self { Self { reporter, reporting_map: DefaultPusEventReportingMap::default(), diff --git a/satrs/src/pus/event_srv.rs b/satrs/src/pus/event_srv.rs index d669388..c811b17 100644 --- a/satrs/src/pus/event_srv.rs +++ b/satrs/src/pus/event_srv.rs @@ -9,14 +9,14 @@ use std::sync::mpsc::Sender; use super::verification::VerificationReportingProvider; use super::{ - EcssTcInMemConversionProvider, EcssTcReceiver, EcssTmSender, GenericConversionError, + CacheAndReadRawEcssTc, EcssTcReceiver, EcssTmSender, GenericConversionError, GenericRoutingError, HandlingStatus, PusServiceHelper, }; pub struct PusEventServiceHandler< TcReceiver: EcssTcReceiver, TmSender: EcssTmSender, - TcInMemConverter: EcssTcInMemConversionProvider, + TcInMemConverter: CacheAndReadRawEcssTc, VerificationReporter: VerificationReportingProvider, > { pub service_helper: @@ -27,7 +27,7 @@ pub struct PusEventServiceHandler< impl< TcReceiver: EcssTcReceiver, TmSender: EcssTmSender, - TcInMemConverter: EcssTcInMemConversionProvider, + TcInMemConverter: CacheAndReadRawEcssTc, VerificationReporter: VerificationReportingProvider, > PusEventServiceHandler { diff --git a/satrs/src/pus/mod.rs b/satrs/src/pus/mod.rs index fa4021d..d9d5780 100644 --- a/satrs/src/pus/mod.rs +++ b/satrs/src/pus/mod.rs @@ -296,7 +296,7 @@ pub trait PacketSenderPusTc: Send { ) -> Result<(), Self::Error>; } -pub trait ActiveRequestMapProvider: Sized { +pub trait ActiveRequestStore: Sized { fn insert(&mut self, request_id: &RequestId, request_info: V); fn get(&self, request_id: RequestId) -> Option<&V>; fn get_mut(&mut self, request_id: RequestId) -> Option<&mut V>; @@ -309,7 +309,7 @@ pub trait ActiveRequestMapProvider: Sized { fn for_each_mut(&mut self, f: F); } -pub trait ActiveRequestProvider { +pub trait ActiveRequest { fn target_id(&self) -> ComponentId; fn token(&self) -> TcStateToken; fn set_token(&mut self, token: TcStateToken); @@ -330,7 +330,7 @@ pub trait PusRequestRouter { ) -> Result<(), Self::Error>; } -pub trait PusReplyHandler { +pub trait PusReplyHandler { type Error; /// This function handles a reply for a given PUS request and returns whether that request @@ -459,7 +459,7 @@ pub mod alloc_mod { /// /// A [VerificationReportingProvider] instance is passed to the user to also allow handling /// of the verification process as part of the PUS standard requirements. - pub trait PusTcToRequestConverter { + pub trait PusTcToRequestConverter { type Error; fn convert( &mut self, @@ -480,7 +480,7 @@ pub mod alloc_mod { } } - impl ActiveRequestMapProvider for DefaultActiveRequestMap { + impl ActiveRequestStore for DefaultActiveRequestMap { fn insert(&mut self, request_id: &RequestId, request: V) { self.0.insert(*request_id, request); } @@ -680,7 +680,7 @@ pub mod std_mod { pub use cb_mod::*; use super::verification::{TcStateToken, VerificationReportingProvider}; - use super::{AcceptedEcssTcAndToken, ActiveRequestProvider, TcInMemory}; + use super::{AcceptedEcssTcAndToken, ActiveRequest, TcInMemory}; use crate::tmtc::PacketInPool; impl From> for EcssTmtcError { @@ -845,7 +845,7 @@ pub mod std_mod { } } - impl ActiveRequestProvider for ActivePusRequestStd { + impl ActiveRequest for ActivePusRequestStd { fn target_id(&self) -> ComponentId { self.target_id } @@ -947,7 +947,9 @@ pub mod std_mod { } } - pub trait EcssTcInMemConversionProvider { + /// This trait provides an abstraction for caching a raw ECSS telecommand and then + /// providing the [PusTcReader] abstraction to read the cache raw telecommand. + pub trait CacheAndReadRawEcssTc { fn cache(&mut self, possible_packet: &TcInMemory) -> Result<(), PusTcFromMemError>; fn tc_slice_raw(&self) -> &[u8]; @@ -976,7 +978,7 @@ pub mod std_mod { pub pus_tc_raw: Option>, } - impl EcssTcInMemConversionProvider for EcssTcInVecConverter { + impl CacheAndReadRawEcssTc for EcssTcInVecConverter { fn cache(&mut self, tc_in_memory: &TcInMemory) -> Result<(), PusTcFromMemError> { self.pus_tc_raw = None; match tc_in_memory { @@ -1045,7 +1047,7 @@ pub mod std_mod { } } - impl EcssTcInMemConversionProvider for EcssTcInSharedPoolConverter { + impl CacheAndReadRawEcssTc for EcssTcInSharedPoolConverter { fn cache(&mut self, tc_in_memory: &TcInMemory) -> Result<(), PusTcFromMemError> { match tc_in_memory { super::TcInMemory::Pool(packet_in_pool) => { @@ -1070,38 +1072,38 @@ pub mod std_mod { // TODO: alloc feature flag? #[derive(Clone)] - pub enum EcssTcInMemConverter { + pub enum EcssTcInMemConverterWrapper { Static(EcssTcInSharedPoolConverter), Heap(EcssTcInVecConverter), } - impl EcssTcInMemConverter { + impl EcssTcInMemConverterWrapper { pub fn new_static(static_store_converter: EcssTcInSharedPoolConverter) -> Self { - EcssTcInMemConverter::Static(static_store_converter) + Self::Static(static_store_converter) } pub fn new_heap(heap_converter: EcssTcInVecConverter) -> Self { - EcssTcInMemConverter::Heap(heap_converter) + Self::Heap(heap_converter) } } - impl EcssTcInMemConversionProvider for EcssTcInMemConverter { + impl CacheAndReadRawEcssTc for EcssTcInMemConverterWrapper { fn cache(&mut self, tc_in_memory: &TcInMemory) -> Result<(), PusTcFromMemError> { match self { - EcssTcInMemConverter::Static(converter) => converter.cache(tc_in_memory), - EcssTcInMemConverter::Heap(converter) => converter.cache(tc_in_memory), + Self::Static(converter) => converter.cache(tc_in_memory), + Self::Heap(converter) => converter.cache(tc_in_memory), } } fn tc_slice_raw(&self) -> &[u8] { match self { - EcssTcInMemConverter::Static(converter) => converter.tc_slice_raw(), - EcssTcInMemConverter::Heap(converter) => converter.tc_slice_raw(), + Self::Static(converter) => converter.tc_slice_raw(), + Self::Heap(converter) => converter.tc_slice_raw(), } } fn sender_id(&self) -> Option { match self { - EcssTcInMemConverter::Static(converter) => converter.sender_id(), - EcssTcInMemConverter::Heap(converter) => converter.sender_id(), + Self::Static(converter) => converter.sender_id(), + Self::Heap(converter) => converter.sender_id(), } } } @@ -1129,7 +1131,7 @@ pub mod std_mod { pub struct PusServiceHelper< TcReceiver: EcssTcReceiver, TmSender: EcssTmSender, - TcInMemConverter: EcssTcInMemConversionProvider, + TcInMemConverter: CacheAndReadRawEcssTc, VerificationReporter: VerificationReportingProvider, > { pub common: PusServiceBase, @@ -1139,7 +1141,7 @@ pub mod std_mod { impl< TcReceiver: EcssTcReceiver, TmSender: EcssTmSender, - TcInMemConverter: EcssTcInMemConversionProvider, + TcInMemConverter: CacheAndReadRawEcssTc, VerificationReporter: VerificationReportingProvider, > PusServiceHelper { @@ -1314,7 +1316,8 @@ pub mod tests { use super::verification::test_util::TestVerificationReporter; use super::verification::{ - TcStateAccepted, VerificationReporterCfg, VerificationReportingProvider, VerificationToken, + TcStateAccepted, VerificationReporterConfig, VerificationReportingProvider, + VerificationToken, }; use super::*; @@ -1404,7 +1407,7 @@ pub mod tests { let (test_srv_tc_tx, test_srv_tc_rx) = mpsc::sync_channel(10); let (tm_tx, tm_rx) = mpsc::sync_channel(10); - let verif_cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, 8).unwrap(); + let verif_cfg = VerificationReporterConfig::new(TEST_APID, 1, 2, 8).unwrap(); let verification_handler = VerificationReporter::new(TEST_COMPONENT_ID_0.id(), &verif_cfg); let test_srv_tm_sender = @@ -1501,7 +1504,7 @@ pub mod tests { let (test_srv_tc_tx, test_srv_tc_rx) = mpsc::channel(); let (tm_tx, tm_rx) = mpsc::channel(); - let verif_cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, 8).unwrap(); + let verif_cfg = VerificationReporterConfig::new(TEST_APID, 1, 2, 8).unwrap(); let verification_handler = VerificationReporter::new(TEST_COMPONENT_ID_0.id(), &verif_cfg); let in_store_converter = EcssTcInVecConverter::default(); diff --git a/satrs/src/pus/scheduler.rs b/satrs/src/pus/scheduler.rs index 9509892..a03325f 100644 --- a/satrs/src/pus/scheduler.rs +++ b/satrs/src/pus/scheduler.rs @@ -878,22 +878,22 @@ mod tests { ) } - fn scheduled_tc(timestamp: UnixTime, buf: &mut [u8]) -> PusTcCreator { + fn scheduled_tc(timestamp: UnixTime, buf: &mut [u8]) -> PusTcCreator<'_> { let (sph, len_app_data) = pus_tc_base(timestamp, buf); PusTcCreator::new_simple(sph, 11, 4, &buf[..len_app_data], true) } - fn wrong_tc_service(timestamp: UnixTime, buf: &mut [u8]) -> PusTcCreator { + fn wrong_tc_service(timestamp: UnixTime, buf: &mut [u8]) -> PusTcCreator<'_> { let (sph, len_app_data) = pus_tc_base(timestamp, buf); PusTcCreator::new_simple(sph, 12, 4, &buf[..len_app_data], true) } - fn wrong_tc_subservice(timestamp: UnixTime, buf: &mut [u8]) -> PusTcCreator { + fn wrong_tc_subservice(timestamp: UnixTime, buf: &mut [u8]) -> PusTcCreator<'_> { let (sph, len_app_data) = pus_tc_base(timestamp, buf); PusTcCreator::new_simple(sph, 11, 5, &buf[..len_app_data], true) } - fn double_wrapped_time_tagged_tc(timestamp: UnixTime, buf: &mut [u8]) -> PusTcCreator { + fn double_wrapped_time_tagged_tc(timestamp: UnixTime, buf: &mut [u8]) -> PusTcCreator<'_> { let cds_time = cds::CdsTime::from_unix_time_with_u16_days(×tamp, cds::SubmillisPrecision::Absent) .unwrap(); diff --git a/satrs/src/pus/scheduler_srv.rs b/satrs/src/pus/scheduler_srv.rs index ccef475..cf9e45a 100644 --- a/satrs/src/pus/scheduler_srv.rs +++ b/satrs/src/pus/scheduler_srv.rs @@ -1,7 +1,7 @@ use super::scheduler::PusSchedulerProvider; use super::verification::{VerificationReporter, VerificationReportingProvider}; use super::{ - DirectPusPacketHandlerResult, EcssTcInMemConversionProvider, EcssTcInSharedPoolConverter, + CacheAndReadRawEcssTc, DirectPusPacketHandlerResult, EcssTcInSharedPoolConverter, EcssTcInVecConverter, EcssTcReceiver, EcssTmSender, HandlingStatus, MpscTcReceiver, PartialPusHandlingError, PusServiceHelper, }; @@ -24,7 +24,7 @@ use std::sync::mpsc; pub struct PusSchedServiceHandler< TcReceiver: EcssTcReceiver, TmSender: EcssTmSender, - TcInMemConverter: EcssTcInMemConversionProvider, + TcInMemConverter: CacheAndReadRawEcssTc, VerificationReporter: VerificationReportingProvider, PusScheduler: PusSchedulerProvider, > { @@ -36,7 +36,7 @@ pub struct PusSchedServiceHandler< impl< TcReceiver: EcssTcReceiver, TmSender: EcssTmSender, - TcInMemConverter: EcssTcInMemConversionProvider, + TcInMemConverter: CacheAndReadRawEcssTc, VerificationReporter: VerificationReportingProvider, Scheduler: PusSchedulerProvider, > PusSchedServiceHandler diff --git a/satrs/src/pus/test.rs b/satrs/src/pus/test.rs index 10905c9..a505995 100644 --- a/satrs/src/pus/test.rs +++ b/satrs/src/pus/test.rs @@ -9,9 +9,8 @@ use std::sync::mpsc; use super::verification::{VerificationReporter, VerificationReportingProvider}; use super::{ - EcssTcInMemConversionProvider, EcssTcInSharedPoolConverter, EcssTcInVecConverter, - EcssTcReceiver, EcssTmSender, GenericConversionError, HandlingStatus, MpscTcReceiver, - PusServiceHelper, + CacheAndReadRawEcssTc, EcssTcInSharedPoolConverter, EcssTcInVecConverter, EcssTcReceiver, + EcssTmSender, GenericConversionError, HandlingStatus, MpscTcReceiver, PusServiceHelper, }; /// This is a helper class for [std] environments to handle generic PUS 17 (test service) packets. @@ -19,7 +18,7 @@ use super::{ pub struct PusService17TestHandler< TcReceiver: EcssTcReceiver, TmSender: EcssTmSender, - TcInMemConverter: EcssTcInMemConversionProvider, + TcInMemConverter: CacheAndReadRawEcssTc, VerificationReporter: VerificationReportingProvider, > { pub service_helper: @@ -29,7 +28,7 @@ pub struct PusService17TestHandler< impl< TcReceiver: EcssTcReceiver, TmSender: EcssTmSender, - TcInMemConverter: EcssTcInMemConversionProvider, + TcInMemConverter: CacheAndReadRawEcssTc, VerificationReporter: VerificationReportingProvider, > PusService17TestHandler { diff --git a/satrs/src/pus/verification.rs b/satrs/src/pus/verification.rs index b248be1..2db42c4 100644 --- a/satrs/src/pus/verification.rs +++ b/satrs/src/pus/verification.rs @@ -17,7 +17,7 @@ //! use std::time::Duration; //! use satrs::pool::{PoolProviderWithGuards, StaticMemoryPool, StaticPoolConfig}; //! use satrs::pus::verification::{ -//! VerificationReportingProvider, VerificationReporterCfg, VerificationReporter +//! VerificationReportingProvider, VerificationReporterConfig, VerificationReporter //! }; //! use satrs::tmtc::{SharedStaticMemoryPool, PacketSenderWithSharedPool}; //! use satrs::spacepackets::seq_count::SeqCountProviderSimple; @@ -38,7 +38,7 @@ //! let shared_tm_pool = SharedStaticMemoryPool::new(RwLock::new(tm_pool)); //! let (verif_tx, verif_rx) = mpsc::sync_channel(10); //! let sender = PacketSenderWithSharedPool::new_with_shared_packet_pool(verif_tx, &shared_tm_pool); -//! let cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, 8).unwrap(); +//! let cfg = VerificationReporterConfig::new(TEST_APID, 1, 2, 8).unwrap(); //! let mut reporter = VerificationReporter::new(TEST_COMPONENT_ID.id(), &cfg); //! //! let tc_header = PusTcSecondaryHeader::new_simple(17, 1); @@ -846,14 +846,14 @@ pub mod alloc_mod { use core::cell::RefCell; #[derive(Clone)] - pub struct VerificationReporterCfg { + pub struct VerificationReporterConfig { apid: u16, pub step_field_width: usize, pub fail_code_field_width: usize, pub max_fail_data_len: usize, } - impl VerificationReporterCfg { + impl VerificationReporterConfig { pub fn new( apid: u16, step_field_width: usize, @@ -876,7 +876,7 @@ pub mod alloc_mod { /// /// The [Self::modify_tm] function is called before the TM is sent. This allows users to change /// fields like the message count or sequence counter before the TM is sent. - pub trait VerificationHookProvider { + pub trait VerificationHook { fn modify_tm(&self, tm: &mut PusTmCreator); } @@ -886,7 +886,7 @@ pub mod alloc_mod { #[derive(Default, Copy, Clone)] pub struct DummyVerificationHook {} - impl VerificationHookProvider for DummyVerificationHook { + impl VerificationHook for DummyVerificationHook { fn modify_tm(&self, _tm: &mut PusTmCreator) {} } @@ -899,16 +899,16 @@ pub mod alloc_mod { /// destination fields are assumed to be constant for a given repoter instance. #[derive(Clone)] pub struct VerificationReporter< - VerificationHook: VerificationHookProvider = DummyVerificationHook, + VerificationHookInstance: VerificationHook = DummyVerificationHook, > { owner_id: ComponentId, source_data_buf: RefCell>, pub reporter_creator: VerificationReportCreator, - pub tm_hook: VerificationHook, + pub tm_hook: VerificationHookInstance, } impl VerificationReporter { - pub fn new(owner_id: ComponentId, cfg: &VerificationReporterCfg) -> Self { + pub fn new(owner_id: ComponentId, cfg: &VerificationReporterConfig) -> Self { let reporter = VerificationReportCreator::new(cfg.apid).unwrap(); Self { owner_id, @@ -925,13 +925,13 @@ pub mod alloc_mod { } } - impl VerificationReporter { + impl VerificationReporter { /// The provided [VerificationHookProvider] can be used to modify a verification packet /// before it is sent. pub fn new_with_hook( owner_id: ComponentId, - cfg: &VerificationReporterCfg, - tm_hook: VerificationHook, + cfg: &VerificationReporterConfig, + tm_hook: VerificationHookInstance, ) -> Self { let reporter = VerificationReportCreator::new(cfg.apid).unwrap(); Self { @@ -978,8 +978,8 @@ pub mod alloc_mod { } } - impl VerificationReportingProvider - for VerificationReporter + impl VerificationReportingProvider + for VerificationReporter { delegate!( to self.reporter_creator { @@ -1693,7 +1693,7 @@ pub mod tests { use crate::pus::tests::CommonTmInfo; use crate::pus::verification::{ EcssTmSender, EcssTmtcError, FailParams, FailParamsWithStep, RequestId, TcStateNone, - VerificationReporter, VerificationReporterCfg, VerificationToken, + VerificationReporter, VerificationReporterConfig, VerificationToken, handle_step_failure_with_generic_params, }; use crate::pus::{ChannelWithId, PusTmVariant}; @@ -1717,8 +1717,8 @@ pub mod tests { use super::{ DummyVerificationHook, FailParamHelper, SeqCountProviderSimple, TcStateAccepted, - TcStateStarted, VerificationHookProvider, VerificationReportingProvider, - WasAtLeastAccepted, handle_completion_failure_with_generic_params, + TcStateStarted, VerificationHook, VerificationReportingProvider, WasAtLeastAccepted, + handle_completion_failure_with_generic_params, }; fn is_send(_: &T) {} @@ -1787,7 +1787,7 @@ pub mod tests { pub msg_counter: SeqCountProviderSimple, } - impl VerificationHookProvider for SequenceCounterHook { + impl VerificationHook for SequenceCounterHook { fn modify_tm(&self, tm: &mut spacepackets::ecss::tm::PusTmCreator) { tm.set_seq_count(self.seq_counter.get_and_increment()); tm.set_msg_counter(self.msg_counter.get_and_increment()); @@ -1795,29 +1795,29 @@ pub mod tests { } struct VerificationReporterTestbench< - VerificationHook: VerificationHookProvider = DummyVerificationHook, + VerificationHookInstance: VerificationHook = DummyVerificationHook, > { pub id: ComponentId, sender: TestSender, - reporter: VerificationReporter, + reporter: VerificationReporter, pub request_id: RequestId, tc: Vec, } fn base_reporter(id: ComponentId, max_fail_data_len: usize) -> VerificationReporter { - let cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, max_fail_data_len).unwrap(); + let cfg = VerificationReporterConfig::new(TEST_APID, 1, 2, max_fail_data_len).unwrap(); VerificationReporter::new(id, &cfg) } - fn reporter_with_hook( + fn reporter_with_hook( id: ComponentId, - hook: VerificationHook, - ) -> VerificationReporter { - let cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, 8).unwrap(); + hook: VerificationHookInstance, + ) -> VerificationReporter { + let cfg = VerificationReporterConfig::new(TEST_APID, 1, 2, 8).unwrap(); VerificationReporter::new_with_hook(id, &cfg, hook) } - impl VerificationReporterTestbench { + impl VerificationReporterTestbench { fn new_with_hook(id: ComponentId, tc: PusTcCreator, tm_hook: VerificiationHook) -> Self { let reporter = reporter_with_hook(id, tm_hook); Self { diff --git a/satrs/src/time.rs b/satrs/src/time.rs index abd3fac..df70b0d 100644 --- a/satrs/src/time.rs +++ b/satrs/src/time.rs @@ -1,7 +1,7 @@ use core::fmt::Debug; /// Generic abstraction for a check/countdown timer. -pub trait CountdownProvider: Debug { +pub trait Countdown: Debug { fn has_expired(&self) -> bool; fn reset(&mut self); } diff --git a/satrs/tests/pus_verification.rs b/satrs/tests/pus_verification.rs index 86a161e..64358db 100644 --- a/satrs/tests/pus_verification.rs +++ b/satrs/tests/pus_verification.rs @@ -4,7 +4,7 @@ pub mod crossbeam_test { use satrs::pool::{PoolProvider, PoolProviderWithGuards, StaticMemoryPool, StaticPoolConfig}; use satrs::pus::test_util::{TEST_APID, TEST_COMPONENT_ID_0}; use satrs::pus::verification::{ - FailParams, RequestId, VerificationReporter, VerificationReporterCfg, + FailParams, RequestId, VerificationReporter, VerificationReporterConfig, VerificationReportingProvider, }; use satrs::tmtc::{PacketSenderWithSharedPool, SharedStaticMemoryPool}; @@ -31,7 +31,7 @@ pub mod crossbeam_test { // We use a synced sequence count provider here because both verification reporters have the // the same APID. If they had distinct APIDs, the more correct approach would be to have // each reporter have an own sequence count provider. - let cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, 8).unwrap(); + let cfg = VerificationReporterConfig::new(TEST_APID, 1, 2, 8).unwrap(); // Shared pool object to store the verification PUS telemetry let pool_cfg = StaticPoolConfig::new_from_subpool_cfg_tuples( vec![(10, 32), (10, 64), (10, 128), (10, 1024)],