pub struct RequestGet {
pub manufacturer_id: u16,
pub firmware_id: u16,
pub checksum: u16,
pub target: Option<u8>,
pub fragment_size: Option<u16>,
pub resume: Option<bool>,
pub non_secure: Option<bool>,
pub activation: Option<bool>,
pub hardware_version: Option<u8>,
}Expand description
Firmware Update Meta Data Request Get (0x7a 0x03).
Fields§
§manufacturer_id: u16The manufacturer_id field.
firmware_id: u16The firmware_id field.
checksum: u16The checksum field.
target: Option<u8>The target field.
fragment_size: Option<u16>The fragment_size field.
resume: Option<bool>The resume field (bits 2..3).
non_secure: Option<bool>The non_secure field (bits 1..2).
activation: Option<bool>The activation field (bits 0..1).
hardware_version: Option<u8>The hardware_version field.
Implementations§
Source§impl RequestGet
impl RequestGet
Sourcepub fn parse(p: &[u8]) -> Result<Self, ParseError>
pub fn parse(p: &[u8]) -> Result<Self, ParseError>
Parses the payload after the command id. Extra trailing bytes (newer versions) are ignored.
Sourcepub fn encode_payload(&self, w: &mut Vec<u8>)
pub fn encode_payload(&self, w: &mut Vec<u8>)
Appends the payload after the command id.
Trait Implementations§
Source§impl Clone for RequestGet
impl Clone for RequestGet
Source§impl Debug for RequestGet
impl Debug for RequestGet
Source§impl Default for RequestGet
impl Default for RequestGet
impl Eq for RequestGet
Source§impl From<RequestGet> for Command
impl From<RequestGet> for Command
Source§fn from(c: RequestGet) -> Self
fn from(c: RequestGet) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RequestGet
impl PartialEq for RequestGet
impl StructuralPartialEq for RequestGet
Auto Trait Implementations§
impl Freeze for RequestGet
impl RefUnwindSafe for RequestGet
impl Send for RequestGet
impl Sync for RequestGet
impl Unpin for RequestGet
impl UnsafeUnpin for RequestGet
impl UnwindSafe for RequestGet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more