pub enum RecordHeader {
Checksum,
Filler(u16),
MainHeader(u16),
Text(u16),
DescriptorType(u16),
DescriptorData(u16),
End,
Unknown {
id: u16,
len: u16,
},
}
Expand description
Known Record Headers, based on the current knowledge.
Variants§
Checksum
A one byte record that, if read, result in a 0 checksum.
Filler(u16)
A 0-0xFFFF record with nothing but zeros, usually lining the next record address.
MainHeader(u16)
Only two variations are known, a HWID and a PartNumber. Possibly describing the file format itself.
Text(u16)
Arbitrary data, usually containing valid ASCII text, mostly one line.
DescriptorType(u16)
Data information about the firmware, contains only the type.
This will be later combine with DescriptorData
DescriptorData(u16)
Data information about the firmware, contain only the data.
Need to be combined with DescriptorType to be interpreted.
End
Mark the end of the file. Can only be the last header.
Unknown
Header with Unknown ID, can be a Firmware block, if the ID is described on the Descriptor header, or Unknown/Undefined Record.
Implementations§
Source§impl RecordHeader
impl RecordHeader
Sourcepub const fn len(&self) -> u16
pub const fn len(&self) -> u16
Return the len from the Header, obs: not the len of the Header itself
Sourcepub const fn from_value(id: u16, len: u16) -> Self
pub const fn from_value(id: u16, len: u16) -> Self
Create a header using the id and len values.
Trait Implementations§
Source§impl Clone for RecordHeader
impl Clone for RecordHeader
Source§fn clone(&self) -> RecordHeader
fn clone(&self) -> RecordHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more