Logo white

Peter M. Groen / FlashMQ

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • FlashMQ
  • variablebyteint.h
  • Add proper type for variable byte int ...
    25268f92
    For the coming MQTT5 support, I'll need this a lot.
    Wiebe Cazemier authored
    2022-03-05 15:28:12 +0100  
    Browse Code ยป
variablebyteint.h 292 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#ifndef VARIABLEBYTEINT_H
#define VARIABLEBYTEINT_H

#include "cirbuf.h"

class VariableByteInt
{
    char bytes[4];
    uint8_t len = 0;

public:
    void readIntoBuf(CirBuf &buf) const;
    VariableByteInt &operator=(uint32_t x);
    uint8_t getLen() const;
};

#endif // VARIABLEBYTEINT_H