27#ifndef __SPARK_WIRING_STREAM_H
28#define __SPARK_WIRING_STREAM_H
30#include "spark_wiring_string.h"
32#include "system_tick_hal.h"
52#ifndef DOXYGEN_DO_NOT_DOCUMENT
53 system_tick_t _timeout;
54 system_tick_t _startMillis;
89#ifndef DOXYGEN_DO_NOT_DOCUMENT
120 bool find(
char *target,
size_t length);
145 bool findUntil(
char *target,
size_t targetLen,
char *terminate,
size_t termLen);
202#ifndef DOXYGEN_DO_NOT_DOCUMENT
Class for printing to a stream or file.
Definition: spark_wiring_print.h:51
Arduino/Wiring Stream Class.
Definition: spark_wiring_stream.h:50
String readString()
Reads the remainder of the file into a string.
virtual int peek()=0
Read a byte from the stream but do not remove it so read will return the same byte next time.
bool findUntil(char *target, size_t targetLen, char *terminate, size_t termLen)
Reads data from the stream until the target string is found or the terminator string is found.
size_t readBytes(char *buffer, size_t length)
Read chars from stream into buffer.
long parseInt()
returns the first valid (long) integer value from the current position
bool find(char *target)
Reads data from the stream until the target string is found.
float parseFloat()
returns the first valid float value from the current position
String readStringUntil(char terminator)
Reads the remainder of the file into a string or until terminator is found.
virtual int available()=0
Returns the number of a bytes available to read right now.
virtual void flush()=0
For output streams, writes any unwritten buffered data.
void setTimeout(system_tick_t timeout)
Sets the read timeout (default: 1000 milliseconds)
bool findUntil(char *target, char *terminator)
Reads data from the stream until the target string is found or the terminator string is found.
bool find(char *target, size_t length)
Reads data from the stream until the target string is found.
virtual int read()=0
Read a byte from the stream.
size_t readBytesUntil(char terminator, char *buffer, size_t length)
Read chars from stream into buffer until the character terminator is found.
Header for spark_wiring_print.c module.