|
SpaIot Library
|
Spa Events. More...
Public Types | |
| enum | Type { PowerOn = Key::Power , FilterOn = Key::Filter , BubbleOn = Key::Bubble , JetOn = Key::Jet , SanitizerOn = Key::Sanitizer , HeaterOn = Key::Heater , HeatReached = Key::HeatReached , WaterTemp = Key::TempUp + 1 , DesiredTemp , SetDesiredTemp , SanitizerTime , ErrorCode , AmbientTemperature , NoEvent = -1 , AnyEvent = -2 } |
| Type of event. More... | |
Public Member Functions | |
| Event (Type type=Type::NoEvent, uint16_t value=0) | |
| Construct a new Event object. More... | |
| virtual | ~Event () |
| Destructor. | |
| Event (const Event &other) | |
| Copy Constructor. | |
| Event (Event &&other) | |
| Move Constructor after the move, other is null, other.clear() must be called if it is to be used again. | |
| Event & | operator= (const Event &other) |
| Sets the Event object to be equal to other. | |
| Event & | operator= (Event &&other) |
| Move assignment after the move, other is null, other.clear() must be called if it is to be used again. | |
| void | clear () |
| Clears the Event object After the call to this function, the Event object is the same as one that has been default constructed. | |
| bool | isNull () const |
| Returns true if the object is null (i.e. it has not been initialized, d_ptr is null) | |
| bool | isEmpty () const |
| Checks if all attributes are set to their default values (same as the default constructor) | |
| bool | operator== (const Event &other) const |
| Checks if the two objects are equal. | |
| bool | operator!= (const Event &other) const |
| Checks if the two objects are not equal. | |
| operator bool () const | |
| Conversion to bool. More... | |
| operator uint16_t () const | |
| Conversion to uint16_t. More... | |
| void | setValue (uint16_t value) |
| Set the Data object. More... | |
| void | setType (Type type) |
| Set the Type object. More... | |
| Type | type () const |
| Get the Type object. More... | |
| uint16_t | value () const |
| Get the Value object. More... | |
| String | toString () const |
| Convert the event to a string. More... | |
| bool | isBoolean () const |
| Returns true if the event type is a boolean. | |
Static Public Member Functions | |
| static String | typeToString (Type type) |
| Convert the event type to a string. More... | |
| static bool | TypeIsBoolean (Type type) |
| Returns true if the event type is a boolean. | |
Spa Events.
This enum lists the events that can be sent or receive by the spa
| enum SpaIot::Event::Type |
Type of event.
| SpaIot::Event::Event | ( | Type | type = Type::NoEvent, |
| uint16_t | value = 0 |
||
| ) |
Construct a new Event object.
| type | The event type |
| value | The event value |
| SpaIot::Event::operator bool | ( | ) | const |
Conversion to bool.
Convert the Event object value to a boolean value.
| SpaIot::Event::operator uint16_t | ( | ) | const |
Conversion to uint16_t.
| void SpaIot::Event::setType | ( | Type | type | ) |
Set the Type object.
| type | The event type |
| void SpaIot::Event::setValue | ( | uint16_t | value | ) |
Set the Data object.
| value |
| String SpaIot::Event::toString | ( | ) | const |
Convert the event to a string.
| Type SpaIot::Event::type | ( | ) | const |
Get the Type object.
|
static |
Convert the event type to a string.
| type | The event type |
| uint16_t SpaIot::Event::value | ( | ) | const |
Get the Value object.