Prusa MINI Firmware overview
PTPListParser Class Reference

#include <parsetools.h>

Public Types

enum  ParseMode { modeArray, modeRange }
 

Public Member Functions

 PTPListParser ()
 
void Initialize (const uint8_t len_size, const uint8_t val_size, MultiValueBuffer *const p, const uint8_t mode=modeArray)
 
bool Parse (uint8_t **pp, uint16_t *pcntdn, PTP_ARRAY_EL_FUNC pf, const void *me=nullptr)
 

Member Enumeration Documentation

◆ ParseMode

Enumerator
modeArray 
modeRange 
92  {
93  modeArray, modeRange/*, modeEnum*/
94  };

Constructor & Destructor Documentation

◆ PTPListParser()

PTPListParser::PTPListParser ( )
115  :
116  nStage(0),
117  enStage(0),
118  arLen(0),
119  arLenCntdn(0),
120  lenSize(0),
121  valSize(0),
122  pBuf(nullptr),
123  prsMode(modeArray) {}

Member Function Documentation

◆ Initialize()

void PTPListParser::Initialize ( const uint8_t  len_size,
const uint8_t  val_size,
MultiValueBuffer *const  p,
const uint8_t  mode = modeArray 
)
126  {
127  pBuf = p;
128  lenSize = len_size;
129  valSize = val_size;
130  prsMode = mode;
131 
132  if (prsMode == modeRange) {
133  arLenCntdn = arLen = 3;
134  nStage = 2;
135  }
136  else {
137  arLenCntdn = arLen = 0;
138  nStage = 0;
139  }
140  enStage = 0;
141  theParser.Initialize(p);
142  }
Here is the call graph for this function:

◆ Parse()

bool PTPListParser::Parse ( uint8_t **  pp,
uint16_t *  pcntdn,
PTP_ARRAY_EL_FUNC  pf,
const void me = nullptr 
)
MultiByteValueParser::Initialize
void Initialize(MultiValueBuffer *const pbuf)
Definition: parsetools.h:48
mode
png_structrp int mode
Definition: png.h:1139
PTPListParser::modeRange
Definition: parsetools.h:93
PTPListParser::modeArray
Definition: parsetools.h:93