pub struct BlockSpec {
pub block_id: u64,
pub packet_size: u32,
pub extended_ids: bool,
pub payload_type: u16,
pub pixel_format: u32,
pub width: u32,
pub height: u32,
pub timestamp: u64,
pub trailer_status: u16,
pub size_y: u32,
pub chunk_layout_id: u32,
pub padding_x: u16,
}Expand description
What one block looks like on the wire.
Fields§
§block_id: u64Block id; truncated to 16 bits unless extended_ids.
packet_size: u32GevSCPSPacketSize in force.
extended_ids: boolSend 20-byte extended-ID headers.
payload_type: u16Payload type in the leader and trailer.
pixel_format: u32PFNC code in the leader.
width: u32Size X in the leader.
height: u32Size Y in the leader.
timestamp: u64Device timestamp in the leader.
trailer_status: u16Status word of the trailer’s header; 0 is success.
size_y: u32Size Y in the trailer: the lines the block actually delivered.
chunk_layout_id: u32Chunk layout ID the trailer reports when the payload type carries the extended chunk flag.
padding_x: u16Padding X in the leader: bytes after every line of the image.
Implementations§
Source§impl BlockSpec
impl BlockSpec
Sourcepub fn image(
block_id: u64,
width: u32,
height: u32,
pixel_format: u32,
packet_size: u32,
) -> Self
pub fn image( block_id: u64, width: u32, height: u32, pixel_format: u32, packet_size: u32, ) -> Self
An image block with standard ids and a successful trailer.
Sourcepub fn chunk_data(block_id: u64, packet_size: u32) -> Self
pub fn chunk_data(block_id: u64, packet_size: u32) -> Self
A chunk-data block (0x0004): no image, so no geometry.
Sourcepub fn header_len(&self) -> usize
pub fn header_len(&self) -> usize
Header length this block’s packets carry.
Sourcepub fn payload_stride(&self) -> usize
pub fn payload_stride(&self) -> usize
Image bytes one data packet carries.
Trait Implementations§
impl Eq for BlockSpec
impl StructuralPartialEq for BlockSpec
Auto Trait Implementations§
impl Freeze for BlockSpec
impl RefUnwindSafe for BlockSpec
impl Send for BlockSpec
impl Sync for BlockSpec
impl Unpin for BlockSpec
impl UnsafeUnpin for BlockSpec
impl UnwindSafe for BlockSpec
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