pub enum IncomingStateMachine {
Show 17 variants None, RealTimeData { buffer: [u8; 8], received_bytes: usize, }, DeviceIdentifier { buffer: [u8; 8], received_bytes: usize, }, UserInformation { buffer: [u8; 8], received_bytes: usize, }, StorageStartTimeDate { buffer: [u8; 7], received_bytes: usize, }, StorageStartTimeTime { buffer: [u8; 7], received_bytes: usize, }, StorageDataLength { buffer: [u8; 7], received_bytes: usize, }, StorageDataWithPI { buffer: [u8; 5], received_bytes: usize, }, StorageDataSegmentAmount { buffer: [u8; 3], received_bytes: usize, }, CommandFeedback { buffer: [u8; 3], received_bytes: usize, }, FreeFeedback { buffer: [u8; 1], received_bytes: usize, }, DisconnectNotice { buffer: [u8; 2], received_bytes: usize, }, PIIdentifiers { buffer: [u8; 2], received_bytes: usize, }, StorageData { buffer: [u8; 7], received_bytes: usize, }, UserAmount { buffer: [u8; 2], received_bytes: usize, }, DeviceNotice { buffer: [u8; 8], received_bytes: usize, }, StorageDataIdentifiers { buffer: [u8; 8], received_bytes: usize, },
}
Expand description

State machine which handles incoming packages

Variants

None

Current status: nothing read

RealTimeData

Fields

buffer: [u8; 8]

byte buffer

received_bytes: usize

byte count

Real time data

DeviceIdentifier

Fields

buffer: [u8; 8]

byte buffer

received_bytes: usize

byte count

Device identifier

UserInformation

Fields

buffer: [u8; 8]

byte buffer

received_bytes: usize

byte count

User Information

StorageStartTimeDate

Fields

buffer: [u8; 7]

byte buffer

received_bytes: usize

byte count

Storage start time(date)

StorageStartTimeTime

Fields

buffer: [u8; 7]

byte buffer

received_bytes: usize

byte count

Storage start time(time)

StorageDataLength

Fields

buffer: [u8; 7]

byte buffer

received_bytes: usize

byte count

Storage Data Length

StorageDataWithPI

Fields

buffer: [u8; 5]

byte buffer

received_bytes: usize

byte count

Storage Data with PI

StorageDataSegmentAmount

Fields

buffer: [u8; 3]

byte buffer

received_bytes: usize

byte count

Storage Data Segment Amount

CommandFeedback

Fields

buffer: [u8; 3]

byte buffer

received_bytes: usize

byte count

Command Feedback

FreeFeedback

Fields

buffer: [u8; 1]

byte buffer

received_bytes: usize

byte count

Device free feedback

DisconnectNotice

Fields

buffer: [u8; 2]

byte buffer

received_bytes: usize

byte count

Device disconnect notice

PIIdentifiers

Fields

buffer: [u8; 2]

byte buffer

received_bytes: usize

byte count

PI Identifiers

StorageData

Fields

buffer: [u8; 7]

byte buffer

received_bytes: usize

byte count

Storage Data

UserAmount

Fields

buffer: [u8; 2]

byte buffer

received_bytes: usize

byte count

User Amount

DeviceNotice

Fields

buffer: [u8; 8]

byte buffer

received_bytes: usize

byte count

Device Notice

StorageDataIdentifiers

Fields

buffer: [u8; 8]

byte buffer

received_bytes: usize

byte count

Storage Data Identifiers

Implementations

Resumes execution of the state machine

Arguments
  • read - A function which read new bytes into the provided buffer. It must return Poll::Pending if no data is available for reading, or Poll::Ready(Ok(num_bytes_read)) otherwise.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.