void ParsedStream::getByte() { int c; if (_closed) { return; } if (freeSpace() == 0) { return; } // TODO: Tidy this... c = _uart->read(); if (c == -1) { return; } if (c == MATCH_TOKEN[bytes_matched]) { bytes_matched++; if (bytes_matched == strlen(MATCH_TOKEN)) { _closed = true; } } else if (c == MATCH_TOKEN[0]) { // Handle e.g. case "**CLOS*" bytes_matched = 1; } else { bytes_matched = 0; } storeByte(c); }
void IOBuffer::storeUI8(rx_uint8 byte) { storeByte(byte); }
void IOBuffer::storeBool(bool data) { storeByte((rx_uint8)data); }