HerkuleXLib
1.1
Arduino library to drive HerkuleX DRS-0101 and DRS-0201
|
Class to manage the print of the messages. More...
#include <HkxCommunication.h>
Public Member Functions | |
HkxPrint () | |
Default constructor. More... | |
HkxPrint (HardwareSerial &serialPrint, long baudrate) | |
Active constructor with default values. More... | |
HkxPrint (HardwareSerial &serialPrint, long baudrate, bool errorMessages, bool warningMessages, bool infoMessages) | |
Active constructor. More... | |
HkxPrint (HkxPrint hkxPrint, bool errorMessages, bool warningMessages, bool infoMessages) | |
Copy constructor. More... | |
void | errorPrint (const String &message) const |
Print error. More... | |
void | warningPrint (const String &message) const |
Print warning. More... | |
void | infoPrint (const String &message) const |
Print info. More... | |
Class to manage the print of the messages.
This class manages the print of the messages (error, warning and info) for a serial monitor.
|
inline |
|
inline |
Active constructor with default values.
The active constructor with default values setup the serial communication for only error messages.
[in] | serialPrint | : Serial port to use to send the messages. It will be most ot the time Serial . |
[in] | baudrate | : value of the bauderate to send the messages. The same value shall be setup for the serial monitor. |
Example to display only error messages over Serial
port:
|
inline |
Active constructor.
The active constructor setup the serial communication and the type of messages to send (error, warning and info).
[in] | serialPrint | : Serial port to use to send the messages. It will be most ot the time Serial . |
[in] | baudrate | : value of the bauderate to send the messages. The same value shall be setup for the serial monitor. |
[in] | errorMessages | : set true to display error messages, false otherwise. |
[in] | warningMessages | : set true to display warning messages, false otherwise. |
[in] | infoMessages | : set true to display info messages, false otherwise. |
Example to display error and warning messages (but not info) over Serial
port:
|
inline |
Copy constructor.
The copy constructor copy the serial communication from reference hkxPrint, and setup the type of messages to send (error, warning and info).
[in] | hkxPrint | : Reference HkxPrint for the copy. |
[in] | errorMessages | : set true to display error messages, false otherwise. |
[in] | warningMessages | : set true to display warning messages, false otherwise. |
[in] | infoMessages | : set true to display info messages, false otherwise. |
Example to copy print1
(that display only errors) but display error, warning and info messages over Serial
port:
|
inline |
Print error.
Print an error message if setup.
[in] | message | : content to print as an error. |
Example:
|
inline |
|
inline |
Print warning.
Print a warning message if setup.
[in] | message | : content to print as a warning. |
Example: