SpaIot Library
SpaIot::ServerSettings

Server settings class. More...

Public Member Functions

 ServerSettings ()
 
 ServerSettings (const String &model, unsigned long interval=30000)
 Construct a new Server Settings object. More...
 
 ServerSettings (const char *model, unsigned long interval=30000)
 Construct a new Server Settings object. More...
 
virtual ~ServerSettings ()
 Destructor.
 
 ServerSettings (const ServerSettings &other)
 Copy Constructor.
 
 ServerSettings (ServerSettings &&other)
 Move Constructor after the move, other is null, other.clear() must be called if it is to be used again.
 
ServerSettingsoperator= (const ServerSettings &other)
 Sets the ServerSettings object to be equal to other.
 
ServerSettingsoperator= (ServerSettings &&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 ServerSettings object After the call to this function, the ServerSettings 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 ServerSettings &other) const
 
bool operator!= (const ServerSettings &other) const
 
const String & spaModel () const
 Returns the spa model name.
 
unsigned long publishInterval () const
 Returns the publish interval.
 
void setPublishInterval (unsigned long interval)
 Sets the spa model name.
 
void setSpaModel (const String &model)
 Sets the publish interval.
 

Detailed Description

Server settings class.

This class represents the settings of a SpaIot server. It is a concrete class, and can be instantiated. This class is copyable and movable.

Constructor & Destructor Documentation

◆ ServerSettings() [1/3]

SpaIot::ServerSettings::ServerSettings ( )

The constructor takes a single parameter, which is the initial value of the ServerSettings object

◆ ServerSettings() [2/3]

SpaIot::ServerSettings::ServerSettings ( const String &  model,
unsigned long  interval = 30000 
)

Construct a new Server Settings object.

Parameters
modelspa model name, it must be registered in the spa HardwarSettings registry
intervaldelay between two publications of the spa state if change occurs (water temperature, desired temperature, sanitizer time, error code)

◆ ServerSettings() [3/3]

SpaIot::ServerSettings::ServerSettings ( const char *  model,
unsigned long  interval = 30000 
)

Construct a new Server Settings object.

Parameters
modelspa model name, it must be registered in the spa HardwarSettings registry
intervaldelay between two publications of the spa state if change occurs (water temperature, desired temperature, sanitizer time, error code)

Member Function Documentation

◆ operator!=()

bool SpaIot::ServerSettings::operator!= ( const ServerSettings other) const

The function returns true if the two objects are not equal

Parameters
otherthe other ServerSettings object to compare to
Returns
The return value is a boolean value. It is true if the two objects are not equal, and false if they are equal.

◆ operator==()

bool SpaIot::ServerSettings::operator== ( const ServerSettings other) const

The function returns true if the two objects are equal

Parameters
otherthe other ServerSettings object to compare to
Returns
The return value is a boolean value. It is true if the two objects are equal, and false if they are not equal.