Prusa MINI Firmware overview
SDFileTransferProtocol::Packet::Open Struct Reference

#include <binary_protocol.h>

Public Member Functions

bool compression_enabled ()
 
bool dummy_transfer ()
 

Static Public Member Functions

static bool validate (char *buffer, size_t length)
 
static Opendecode (char *buffer)
 
static char * filename ()
 

Member Function Documentation

◆ validate()

static bool SDFileTransferProtocol::Packet::Open::validate ( char *  buffer,
size_t  length 
)
static
61  {
62  return (length > sizeof(Open) && buffer[length - 1] == '\0');
63  }
Here is the caller graph for this function:

◆ decode()

static Open& SDFileTransferProtocol::Packet::Open::decode ( char *  buffer)
static
64  {
65  data = &buffer[2];
66  return *reinterpret_cast<Open*>(buffer);
67  }
Here is the caller graph for this function:

◆ compression_enabled()

bool SDFileTransferProtocol::Packet::Open::compression_enabled ( )
68 { return compression & 0x1; }

◆ dummy_transfer()

bool SDFileTransferProtocol::Packet::Open::dummy_transfer ( )
69 { return dummy & 0x1; }

◆ filename()

static char* SDFileTransferProtocol::Packet::Open::filename ( )
static
70 { return data; }
length
png_uint_32 length
Definition: png.c:2247