[][src]Struct sensirion_hdlc::SpecialChars

pub struct SpecialChars {
    pub fend: u8,
    pub fesc: u8,
    pub tfend: u8,
    pub tfesc: u8,
    pub ob1: u8,
    pub tfob1: u8,
    pub ob2: u8,
    pub tfob2: u8,
}

Special Character structure for holding the encode and decode values.

Default

  • FEND = 0x7E;
  • FESC = 0x7D;
  • TFEND = 0x5E;
  • TFESC = 0x5D;
  • OB1 = 0x11;
  • TFOB1 = 0x31;
  • OB2 = 0x13;
  • TFOB2 = 0x33;

Fields

fend: u8

Frame END. Byte that marks the beginning and end of a packet

fesc: u8

Frame ESCape. Byte that marks the start of a swap byte

tfend: u8

Trade Frame END. Byte that is substituted for the FEND byte

tfesc: u8

Trade Frame ESCape. Byte that is substituted for the FESC byte

ob1: u8

Original Byte 1. Byte that will be substituted for the TFOB1 byte

tfob1: u8

Trade Frame ESCape. Byte that is substituted for the Original Byte 1

ob2: u8

Original Byte 2. Byte that is substituted for the TFOB2 byte

tfob2: u8

Trade Frame Origina Byte 2. Byte that is substituted for the Original Byte 2

Implementations

impl SpecialChars[src]

pub fn new(
    fend: u8,
    fesc: u8,
    tfend: u8,
    tfesc: u8,
    ob1: u8,
    tfob1: u8,
    ob2: u8,
    tfob2: u8
) -> Result<SpecialChars, HDLCError>
[src]

Creates a new SpecialChars structure for encoding/decoding a packet

Trait Implementations

impl Clone for SpecialChars[src]

impl Copy for SpecialChars[src]

impl Debug for SpecialChars[src]

impl Default for SpecialChars[src]

fn default() -> SpecialChars[src]

Creates the default SpecialChars structure for encoding/decoding a packet

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.