9#ifndef DVG_STREAMCOMMAND_H_
10#define DVG_STREAMCOMMAND_H_
70 const char *_empty =
"";
107 const uint8_t *EOL, uint8_t EOL_len);
124 int8_t
available(
bool debug_info =
false);
int parseIntInString(const char *str_in, uint16_t pos=0)
Safely parse an integer value in C-string str_in from of position pos.
Definition: DvG_StreamCommand.cpp:206
bool parseBoolInString(const char *str_in, uint16_t pos=0)
Safely parse a boolean value in C-string str_in from of position pos.
Definition: DvG_StreamCommand.cpp:193
float parseFloatInString(const char *str_in, uint16_t pos=0)
Safely parse a float value in C-string str_in from of position pos.
Definition: DvG_StreamCommand.cpp:185
Class to manage listening to a stream, such as Serial or Wire, for incoming binary commands (or binar...
Definition: DvG_StreamCommand.h:91
int8_t available(bool debug_info=false)
Poll the stream for incoming bytes and append them one-by-one to the command buffer buffer....
Definition: DvG_StreamCommand.cpp:123
DvG_BinaryStreamCommand(Stream &stream, uint8_t *buffer, uint16_t max_len, const uint8_t *EOL, uint8_t EOL_len)
Construct a new DvG_BinaryStreamCommand object.
Definition: DvG_StreamCommand.cpp:107
uint16_t getCommandLength()
Return the length of the command without the EOL sentinel in bytes, only when a complete command has ...
Definition: DvG_StreamCommand.cpp:166
void reset()
TODO: descr.
Definition: DvG_StreamCommand.h:140
Class to manage listening to a stream, such as Serial or Wire, for incoming ASCII commands (or ASCII ...
Definition: DvG_StreamCommand.h:32
DvG_StreamCommand(Stream &stream, char *buffer, uint16_t max_len)
Construct a new DvG_StreamCommand object.
Definition: DvG_StreamCommand.cpp:42
char * getCommand()
Return the reference to the command buffer only when a complete command has been received....
Definition: DvG_StreamCommand.cpp:92
bool available()
Poll the stream for incoming characters and append them one-by-one to the command buffer buffer....
Definition: DvG_StreamCommand.cpp:53