first basic verif reporter impl

This commit is contained in:
2022-09-03 18:51:01 +02:00
parent a34497bf3c
commit 38bdc2155f
4 changed files with 222 additions and 45 deletions

View File

@ -87,7 +87,7 @@
use crate::tmtc::{ReceivesCcsdsTc, ReceivesTc};
use alloc::boxed::Box;
use downcast_rs::Downcast;
use spacepackets::{CcsdsPacket, PacketError, SizeMissmatch, SpHeader};
use spacepackets::{ByteConversionError, CcsdsPacket, SizeMissmatch, SpHeader};
/// Generic trait for a handler or dispatcher object handling CCSDS packets.
///
@ -125,7 +125,7 @@ pub struct CcsdsDistributor<E> {
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum CcsdsError<E> {
CustomError(E),
PacketError(PacketError),
PacketError(ByteConversionError),
}
impl<E: 'static> ReceivesCcsdsTc for CcsdsDistributor<E> {
@ -142,7 +142,7 @@ impl<E: 'static> ReceivesTc for CcsdsDistributor<E> {
fn pass_tc(&mut self, tc_raw: &[u8]) -> Result<(), Self::Error> {
if tc_raw.len() < 7 {
return Err(CcsdsError::PacketError(
PacketError::FromBytesSliceTooSmall(SizeMissmatch {
ByteConversionError::FromSliceTooSmall(SizeMissmatch {
found: tc_raw.len(),
expected: 7,
}),