some more extensions for PDU impl
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2023-07-26 23:27:40 +02:00
parent c65a024d97
commit 105c598c53
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 9 additions and 2 deletions

View File

@ -134,6 +134,12 @@ pub enum ChecksumType {
NullChecksum = 15, NullChecksum = 15,
} }
impl Default for ChecksumType {
fn default() -> Self {
Self::NullChecksum
}
}
pub const NULL_CHECKSUM_U32: [u8; 4] = [0; 4]; pub const NULL_CHECKSUM_U32: [u8; 4] = [0; 4];
#[derive(Debug, Copy, Clone, PartialEq, Eq)] #[derive(Debug, Copy, Clone, PartialEq, Eq)]

View File

@ -11,7 +11,7 @@ use alloc::vec::Vec;
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Debug, Copy, Clone, PartialEq, Eq)] #[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct MetadataGenericParams { pub struct MetadataGenericParams {
pub closure_requested: bool, pub closure_requested: bool,

View File

@ -232,7 +232,8 @@ impl CommonPduConfig {
LargeFileFlag::Normal, LargeFileFlag::Normal,
CrcFlag::NoCrc, CrcFlag::NoCrc,
Direction::TowardsReceiver, Direction::TowardsReceiver,
).unwrap() )
.unwrap()
} }
pub fn source_id(&self) -> UnsignedByteField { pub fn source_id(&self) -> UnsignedByteField {