17#include <initializer_list>
295 std::unique_ptr<Private> d_ptr;
Spa Events.
Definition event.h:25
Type
Type of event.
Definition event.h:31
SpaClient class.
Definition spaclient.h:48
bool pullFromSpa(Event &event)
This client pull an event from the spa.
virtual void end()
Stop the client.
Event read(Event::Type type)
Reads the next event of the specified type from the client.
SpaClient(std::initializer_list< Event::Type > subscribedEvents)
Construct a new SpaClient object with the specified subscribed events.
virtual bool isEmpty() const
Checks if all attributes are set to their default values (same as the default constructor)
virtual bool pollSpaEvents()
This client poll events from the spa.
const std::set< Event::Type > & subscribedEvents() const
Get the subscribed events.
virtual bool operator!=(const SpaClient &other) const
bool write(const Event &event)
Write an event to the client.
bool begin()
Start the client.
SpaClient()
Construct a new default SpaClient object.
void subscribe(std::initializer_list< Event::Type > subscribedEvents)
Add subscribed events.
virtual bool handle()
Process the client.
int available() const
Returns the number of events to be read.
bool isSubscribed(const Event::Type &event) const
Check if the client is subscribed to the event.
SpaClient(const std::set< Event::Type > &subscribedEvents)
Construct a new SpaClient object with the specified subscribed events.
void subscribe(Event::Type event)
Add subscribed event.
virtual ~SpaClient()
Destructor.
void subscribe(std::set< Event::Type > subscribedEvents)
Add subscribed events.
virtual void clear()
Clears the SpaClient object After the call to this function, the SpaClient object is the same as one ...
SpaClient(const SpaClient &other)
Copy Constructor.
bool isNull() const
Returns true if the object is null (i.e. it has not been initialized, d_ptr is null)
SpaClient(const char *className)
Construct a new SpaClient object with the specified class name.
SpaClient & operator=(const SpaClient &other)
Sets the SpaClient object to be equal to other.
SpaClient(SpaClient &&other)
Move Constructor after the move, other is null, other.clear() must be called if it is to be used agai...
virtual bool operator==(const SpaClient &other) const
void pushToSpa(const Event &event)
This client push an event to the spa.
uint16_t spaValue(Event::Type type) const
Get a spa value from the internal variables of the client object.
virtual bool isOpen() const
Check if the client is open.
virtual const String & className() const
Returns the class name This allows to know the class name of the object at runtime when only a pointe...
Event read()
Reads the next event from the client.
SpaIot name space.
Definition bussettings.h:15