48 #define NO_IGNORE_CHAR '\x01'
53 unsigned long _timeout;
54 unsigned long _startMillis;
57 int peekNextDigit(LookaheadMode lookahead,
bool detectDecimal);
60 virtual int available() = 0;
61 virtual int read() = 0;
62 virtual int peek() = 0;
68 void setTimeout(
unsigned long timeout);
69 unsigned long getTimeout(
void) {
return _timeout; }
71 bool find(
const char *target);
72 bool find(
const uint8_t *target) {
return find ((
const char *)target); }
75 bool find(
const char *target,
size_t length);
76 bool find(
const uint8_t *target,
size_t length) {
return find ((
const char *)target, length); }
79 bool find(
char target) {
return find (&target, 1); }
81 bool findUntil(
const char *target,
const char *terminator);
82 bool findUntil(
const uint8_t *target,
const char *terminator) {
return findUntil((
const char *)target, terminator); }
84 bool findUntil(
const char *target,
size_t targetLen,
const char *terminate,
size_t termLen);
85 bool findUntil(
const uint8_t *target,
size_t targetLen,
const char *terminate,
size_t termLen) {
return findUntil((
const char *)target, targetLen, terminate, termLen); }
87 long parseInt(LookaheadMode lookahead = SKIP_ALL,
char ignore = NO_IGNORE_CHAR);
94 float parseFloat(LookaheadMode lookahead = SKIP_ALL,
char ignore = NO_IGNORE_CHAR);
97 size_t readBytes(
char *buffer,
size_t length);
98 size_t readBytes( uint8_t *buffer,
size_t length) {
return readBytes((
char *)buffer, length); }
102 size_t readBytesUntil(
char terminator,
char *buffer,
size_t length);
103 size_t readBytesUntil(
char terminator, uint8_t *buffer,
size_t length) {
return readBytesUntil(terminator, (
char *)buffer, length); }
109 String readStringUntil(
char terminator);
112 long parseInt(
char ignore) {
return parseInt(SKIP_ALL, ignore); }
113 float parseFloat(
char ignore) {
return parseFloat(SKIP_ALL, ignore); }
126 int findMulti(
struct MultiTarget *targets,
int tCount);
129 #undef NO_IGNORE_CHAR