MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MeHostParser.h
Go to the documentation of this file.
1
44#ifndef MeHostParser_h
45#define MeHostParser_h
46#include <Arduino.h>
47#define BUF_SIZE 256
48#define MASK 255
49
55 class MeHostParser
56{
57 public:
64 MeHostParser();
65
72 ~MeHostParser();
73
90 uint8_t pushStr(uint8_t * str, uint32_t length);
91
106 uint8_t pushByte(uint8_t ch);
107
122 uint8_t run();
123
138 // get the package ready state
139 uint8_t getPackageReady();
140
157 uint8_t getData(uint8_t *buf, uint32_t size);
158
159 void print(char *str, uint32_t * cnt);
160 private:
161 int state;
162 uint8_t buffer[BUF_SIZE];
163 uint32_t in;
164 uint32_t out;
165 uint8_t packageReady;
166
167 uint8_t module;
168 uint32_t length;
169 uint8_t *data;
170 uint8_t check;
171
172 uint32_t lengthRead;
173 uint32_t currentDataPos;
174
189 uint8_t getByte(uint8_t * ch);
190};
191
192
193#endif
MeHostParser
Driver for Me Host Parser module.
Definition MeHostParser.h:56
MeHostParser::pushStr
uint8_t pushStr(uint8_t *str, uint32_t length)
Definition MeHostParser.cpp:125
MeHostParser::MeHostParser
MeHostParser()
Definition MeHostParser.cpp:63
MeHostParser::run
uint8_t run()
Definition MeHostParser.cpp:239
MeHostParser::~MeHostParser
~MeHostParser()
Definition MeHostParser.cpp:85
MeHostParser::getPackageReady
uint8_t getPackageReady()
Definition MeHostParser.cpp:104
MeHostParser::getData
uint8_t getData(uint8_t *buf, uint32_t size)
Definition MeHostParser.cpp:365
MeHostParser::pushByte
uint8_t pushByte(uint8_t ch)
Definition MeHostParser.cpp:154