Prusa MINI Firmware overview
BinaryStream::Packet::Header Union Reference

#include <binary_protocol.h>

Collaboration diagram for BinaryStream::Packet::Header:

Public Member Functions

uint8_t protocol ()
 
uint8_t type ()
 
void reset ()
 

Public Attributes

struct {
   uint16_t   token
 
   uint8_t   sync
 
   uint8_t   meta
 
   uint16_t   size
 
   uint16_t   checksum
 
}; 
 
uint8_t data [1]
 

Static Public Attributes

static constexpr uint16_t HEADER_TOKEN = 0xB5AD
 

Member Function Documentation

◆ protocol()

uint8_t BinaryStream::Packet::Header::protocol ( )
242 { return (meta >> 4) & 0xF; }
Here is the caller graph for this function:

◆ type()

uint8_t BinaryStream::Packet::Header::type ( )
243 { return meta & 0xF; }
Here is the caller graph for this function:

◆ reset()

void BinaryStream::Packet::Header::reset ( )
244 { token = 0; sync = 0; meta = 0; size = 0; checksum = 0; }
Here is the caller graph for this function:

Member Data Documentation

◆ HEADER_TOKEN

constexpr uint16_t BinaryStream::Packet::Header::HEADER_TOKEN = 0xB5AD
staticconstexpr

◆ token

uint16_t BinaryStream::Packet::Header::token

◆ sync

uint8_t BinaryStream::Packet::Header::sync

◆ meta

uint8_t BinaryStream::Packet::Header::meta

◆ size

uint16_t BinaryStream::Packet::Header::size

◆ checksum

uint16_t BinaryStream::Packet::Header::checksum

◆ @20

struct { ... }

◆ data

uint8_t BinaryStream::Packet::Header::data[1]
BinaryStream::Packet::Header::size
uint16_t size
Definition: binary_protocol.h:239
BinaryStream::Packet::Header::checksum
uint16_t checksum
Definition: binary_protocol.h:240
BinaryStream::Packet::Header::token
uint16_t token
Definition: binary_protocol.h:235
BinaryStream::Packet::Header::meta
uint8_t meta
Definition: binary_protocol.h:237
BinaryStream::Packet::Header::sync
uint8_t sync
Definition: binary_protocol.h:236