Class SerialStreamArduino
Defined in File serial_stream_arduino.h
Inheritance Relationships
Base Type
public andino::SerialStream(Class SerialStream)
Class Documentation
-
class SerialStreamArduino : public andino::SerialStream
This class provides an Arduino implementation of the serial stream interface.
Public Functions
-
inline explicit SerialStreamArduino()
Constructs a SerialStreamArduino.
-
virtual void begin(unsigned long baud) const override
Initializes the serial stream.
- Parameters:
baud – Data rate in bits per second (baud).
-
virtual int available() const override
Gets the number of bytes available for reading.
- Returns:
Number of bytes available for reading.
-
virtual int read() const override
Gets the incoming data.
- Returns:
First byte of incoming data, or -1 if no data is available.
-
virtual size_t print(const char *c) const override
Sends data as human-readable ASCII text.
- Parameters:
c – String to send.
- Returns:
Number of bytes sent.
-
virtual size_t print(char c) const override
Sends data as human-readable ASCII text.
- Parameters:
c – Character to send.
- Returns:
Number of bytes sent.
-
virtual size_t print(unsigned char b, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
b – Byte to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t print(int num, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t print(unsigned int num, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t print(long num, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t print(unsigned long num, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t print(double num, int digits) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
digits – Number of decimal places to use.
- Returns:
Number of bytes sent.
-
virtual size_t println(const char *c) const override
Sends data as human-readable ASCII text.
- Parameters:
c – String to send.
- Returns:
Number of bytes sent.
-
virtual size_t println(char c) const override
Sends data as human-readable ASCII text.
- Parameters:
c – Character to send.
- Returns:
Number of bytes sent.
-
virtual size_t println(unsigned char b, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
b – Byte to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t println(int num, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t println(unsigned int num, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t println(long num, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t println(unsigned long num, int base) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
base – Numeral system to use for the representation.
- Returns:
Number of bytes sent.
-
virtual size_t println(double num, int digits) const override
Sends data as human-readable ASCII text.
- Parameters:
num – Number to send.
digits – Number of decimal places to use.
- Returns:
Number of bytes sent.
-
inline explicit SerialStreamArduino()