updated STM32F3 RTICv2 example

This commit is contained in:
Robin Mueller
2025-09-10 18:06:50 +02:00
parent 526254851a
commit 2bb8a89e8b
22 changed files with 2063 additions and 40155 deletions

View File

@@ -507,9 +507,7 @@ impl VerificationReportCreator {
self.dest_id = dest_id;
}
/// Initialize verification handling by passing a TC reference. This returns a token required
/// to call the acceptance functions
pub fn read_request_id_from_tc(pus_tc: &(impl CcsdsPacket + IsPusTelecommand)) -> RequestId {
pub fn read_request_id(&self, pus_tc: &(impl CcsdsPacket + IsPusTelecommand)) -> RequestId {
RequestId::new(pus_tc)
}
@@ -897,7 +895,7 @@ pub mod alloc_mod {
> {
owner_id: ComponentId,
source_data_buf: RefCell<alloc::vec::Vec<u8>>,
pub reporter_creator: VerificationReportCreator,
pub report_creator: VerificationReportCreator,
pub tm_hook: VerificationHookInstance,
}
@@ -913,7 +911,7 @@ pub mod alloc_mod {
+ cfg.fail_code_field_width
+ cfg.max_fail_data_len
]),
reporter_creator: reporter,
report_creator: reporter,
tm_hook: DummyVerificationHook::default(),
}
}
@@ -937,7 +935,7 @@ pub mod alloc_mod {
+ cfg.fail_code_field_width
+ cfg.max_fail_data_len
]),
reporter_creator: reporter,
report_creator: reporter,
tm_hook,
}
}
@@ -946,9 +944,7 @@ pub mod alloc_mod {
&self,
pus_tc: &(impl CcsdsPacket + IsPusTelecommand),
) -> VerificationToken<TcStateNone> {
VerificationToken::<TcStateNone>::new(
VerificationReportCreator::read_request_id_from_tc(pus_tc),
)
VerificationToken::<TcStateNone>::new(self.report_creator.read_request_id(pus_tc))
}
pub fn start_verification_with_req_id(
@@ -976,7 +972,7 @@ pub mod alloc_mod {
for VerificationReporter<VerificationHookInstance>
{
delegate!(
to self.reporter_creator {
to self.report_creator {
fn set_apid(&mut self, apid: Apid);
fn apid(&self) -> Apid;
}
@@ -1002,7 +998,7 @@ pub mod alloc_mod {
) -> Result<VerificationToken<TcStateAccepted>, EcssTmtcError> {
let mut source_data_buf = self.source_data_buf.borrow_mut();
let mut tm_creator = self
.reporter_creator
.report_creator
.acceptance_success(
source_data_buf.as_mut_slice(),
&token.request_id(),
@@ -1102,7 +1098,7 @@ pub mod alloc_mod {
) -> Result<(), EcssTmtcError> {
let mut buf = self.source_data_buf.borrow_mut();
let mut tm_creator = self
.reporter_creator
.report_creator
.step_success(
buf.as_mut_slice(),
&token.request_id(),