PDU config tweak #17

Merged
muellerr merged 10 commits from pdu-conf-tweaK into main 2023-08-10 21:40:43 +02:00
Showing only changes of commit 041959e546 - Show all commits

View File

@ -222,7 +222,8 @@ impl CommonPduConfig {
/// The defaults for the source ID, destination ID and the transaction sequence number is the /// The defaults for the source ID, destination ID and the transaction sequence number is the
/// [UnsignedByteFieldU8] with an intitial value of 0 /// [UnsignedByteFieldU8] with an intitial value of 0
pub fn new_with_defaults() -> Result<Self, PduError> { pub fn new_with_defaults() -> Self {
// new can not fail for these input parameters
Self::new( Self::new(
UnsignedByteFieldU8::new(0), UnsignedByteFieldU8::new(0),
UnsignedByteFieldU8::new(0), UnsignedByteFieldU8::new(0),
@ -231,7 +232,7 @@ impl CommonPduConfig {
LargeFileFlag::Normal, LargeFileFlag::Normal,
CrcFlag::NoCrc, CrcFlag::NoCrc,
Direction::TowardsReceiver, Direction::TowardsReceiver,
) ).unwrap()
} }
pub fn source_id(&self) -> UnsignedByteField { pub fn source_id(&self) -> UnsignedByteField {