#include <CommandOutput.h>
Public Member Functions | |||||||
CommandOutput (TcpClient *reqClient) | |||||||
CommandOutput (Stream *reqStream) | |||||||
CommandOutput (WebsocketConnection *reqSocket) | |||||||
virtual | ~CommandOutput () | ||||||
size_t | write (uint8_t outChar) | ||||||
Writes a single character to output stream. More... | |||||||
int | getWriteError () | ||||||
Gets last error. More... | |||||||
void | clearWriteError () | ||||||
Clears the last write error. More... | |||||||
size_t | write (const char *str) | ||||||
Writes a c-string to output stream. More... | |||||||
virtual size_t | write (const uint8_t *buffer, size_t size) | ||||||
Writes characters from a buffer to output stream. More... | |||||||
size_t | write (const char *buffer, size_t size) | ||||||
Writes characters from a buffer to output stream. More... | |||||||
size_t | print (char c) | ||||||
Prints a single character to output stream. More... | |||||||
size_t | print (const char str[]) | ||||||
Prints a c-string to output stream. More... | |||||||
size_t | print (double num, int digits=2) | ||||||
Print a floating-point number to output stream. More... | |||||||
size_t | print (const Printable &p) | ||||||
Prints a Printable object to output stream. More... | |||||||
size_t | print (const String &s) | ||||||
Prints a String to output stream. More... | |||||||
size_t | println () | ||||||
Prints a newline to output stream. More... | |||||||
size_t | println (const char str[]) | ||||||
Prints a c-string to output stream, appending newline. More... | |||||||
size_t | println (char c) | ||||||
Prints a single character to output stream, appending newline. More... | |||||||
size_t | println (double num, int digits=2) | ||||||
Print a floating-point number to output stream, appending newline. More... | |||||||
size_t | println (const Printable &p) | ||||||
Prints a Printable object to output stream, appending newline. More... | |||||||
size_t | println (const String &s) | ||||||
Prints a String to output stream, appending newline. More... | |||||||
size_t | printf (const char *fmt,...) __attribute__((format(printf | ||||||
Prints a formatted c-string to output stream. More... | |||||||
Print an integral number to output stream | |||||||
| |||||||
size_t | print (unsigned long num, int base=DEC) | ||||||
size_t | print (const unsigned long long &num, int base=DEC) | ||||||
size_t | print (long, int base=DEC) | ||||||
size_t | print (const long long &, int base=DEC) | ||||||
size_t | print (unsigned int num, int base=DEC) | ||||||
size_t | print (unsigned char num, int base=DEC) | ||||||
size_t | print (int num, int base=DEC) | ||||||
Print an integral number to output stream, appending newline | |||||||
| |||||||
size_t | println (unsigned char num, int base=DEC) | ||||||
size_t | println (unsigned int num, int base=DEC) | ||||||
size_t | println (unsigned long num, int base=DEC) | ||||||
size_t | println (const unsigned long long &num, int base=DEC) | ||||||
size_t | println (int num, int base=DEC) | ||||||
size_t | println (long num, int base=DEC) | ||||||
size_t | println (const long long &num, int base=DEC) | ||||||
Public Attributes | |
TcpClient * | outputTcpClient = nullptr |
Stream * | outputStream = nullptr |
WebsocketConnection * | outputSocket = nullptr |
String | tempSocket = "" |
Protected Member Functions | |
void | setWriteError (int err=1) |
Constructor & Destructor Documentation
◆ CommandOutput() [1/3]
CommandOutput::CommandOutput | ( | TcpClient * | reqClient | ) |
◆ CommandOutput() [2/3]
CommandOutput::CommandOutput | ( | Stream * | reqStream | ) |
◆ CommandOutput() [3/3]
CommandOutput::CommandOutput | ( | WebsocketConnection * | reqSocket | ) |
◆ ~CommandOutput()
|
virtual |
Member Function Documentation
◆ clearWriteError()
|
inlineinherited |
Clears the last write error.
◆ getWriteError()
|
inlineinherited |
Gets last error.
- Return values
-
int Error number of last write error
◆ print() [1/12]
|
inlineinherited |
Prints a single character to output stream.
- Parameters
-
c Character to print
- Return values
-
size_t Quantity of characters written to stream
◆ print() [2/12]
|
inlineinherited |
Prints a c-string to output stream.
- Parameters
-
str c-string to print
- Return values
-
size_t Quantity of characters written to output stream
◆ print() [3/12]
◆ print() [4/12]
◆ print() [5/12]
◆ print() [6/12]
◆ print() [7/12]
◆ print() [8/12]
◆ print() [9/12]
◆ print() [10/12]
|
inlineinherited |
Print a floating-point number to output stream.
- Parameters
-
num Number to print digits The decimal places to print (Default: 2, e.g. 21.35)
- Return values
-
size_t Quantity of characters written to stream
◆ print() [11/12]
|
inlineinherited |
Prints a Printable object to output stream.
- Parameters
-
p Object to print
- Return values
-
size_t Quantity of characters written to stream
◆ print() [12/12]
|
inlineinherited |
◆ printf()
|
inherited |
Prints a formatted c-string to output stream.
- Parameters
-
fmt Pointer to formated c-string to print ... Parameters for placeholders within formated string
- Return values
-
size_t Quantity of characters written to stream
- Note
- Use standard printf placeholders, e.g. d for integer, s for c-string, etc.
◆ println() [1/13]
|
inlineinherited |
Prints a newline to output stream.
- Return values
-
size_t Quantity of characters written to stream
◆ println() [2/13]
|
inlineinherited |
Prints a c-string to output stream, appending newline.
- Parameters
-
str c-string to print
- Return values
-
size_t Quantity of characters written to stream
◆ println() [3/13]
|
inlineinherited |
Prints a single character to output stream, appending newline.
- Parameters
-
c Character to print
- Return values
-
size_t Quantity of characters written to stream
◆ println() [4/13]
◆ println() [5/13]
◆ println() [6/13]
◆ println() [7/13]
◆ println() [8/13]
◆ println() [9/13]
◆ println() [10/13]
◆ println() [11/13]
|
inlineinherited |
Print a floating-point number to output stream, appending newline.
- Parameters
-
num Number to print digits The decimal places to print (Default: 2, e.g. 21.35)
- Return values
-
size_t Quantity of characters written to stream
◆ println() [12/13]
|
inlineinherited |
Prints a Printable object to output stream, appending newline.
- Parameters
-
p Object to print
- Return values
-
size_t Quantity of characters written to stream
◆ println() [13/13]
|
inlineinherited |
◆ setWriteError()
|
inlineprotectedinherited |
◆ write() [1/4]
|
virtual |
Writes a single character to output stream.
- Parameters
-
uint8_t Character to write to output stream
- Return values
-
size_t Quantity of characters written to output stream
Implements Print.
◆ write() [2/4]
|
inlineinherited |
Writes a c-string to output stream.
- Parameters
-
str Pointer to c-string
- Return values
-
size_t Quantity of characters written to stream
◆ write() [3/4]
|
virtualinherited |
Writes characters from a buffer to output stream.
- Parameters
-
buffer Pointer to character buffer size Quantity of characters to write
- Return values
-
size_t Quantity of characters written to stream
Reimplemented in HardwareSerial, CircularBuffer, OtaUpgrade::BasicStream, FileStream, MemoryDataStream, HostFileStream, LimitedMemoryStream, TwoWire, GdbFileStream, EndlessMemoryStream, ReadWriteStream, and OtaUpgrade::EncryptedStream.
◆ write() [4/4]
|
inlineinherited |
Writes characters from a buffer to output stream.
- Parameters
-
buffer Pointer to character buffer size Quantity of characters to write
- Return values
-
size_t Quantity of characters written to stream
Member Data Documentation
◆ outputSocket
WebsocketConnection* CommandOutput::outputSocket = nullptr |
◆ outputStream
Stream* CommandOutput::outputStream = nullptr |
◆ outputTcpClient
TcpClient* CommandOutput::outputTcpClient = nullptr |
◆ tempSocket
String CommandOutput::tempSocket = "" |
The documentation for this class was generated from the following file: