pub struct BlockData {
pub block_type: u16,
pub block_number: u16,
pub format: u16,
pub total_length: u32,
pub flags: u16,
pub crc1: u16,
pub crc2: u16,
pub payload: Vec<u8>,
}Expand description
A raw PLC block in the Siemens Diagra upload/download format.
The wire format starts with a 20-byte header:
[blk_type:2][blk_number:2][format:2][length:4][flags:2][crc1:2][crc2:2][??:4]followed by the MC7 code / data payload, and optionally trailer strings.
Fields§
§block_type: u16Block type identifier (see BlockType discriminants).
block_number: u16Block number.
format: u16Block format/encoding version.
total_length: u32Total block length (including header).
flags: u16Block flags.
crc1: u16First CRC value.
crc2: u16Second CRC value.
payload: Vec<u8>Raw MC7 code / data payload (everything after the 20-byte header).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockData
impl RefUnwindSafe for BlockData
impl Send for BlockData
impl Sync for BlockData
impl Unpin for BlockData
impl UnsafeUnpin for BlockData
impl UnwindSafe for BlockData
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