Leosac
0.8.0
Open Source Access Control
|
Abstraction of an External Messaging device. More...
#include <ExternalMessage.hpp>
Public Types | |
enum | Direction { Direction::Subscribe = 0, Direction::Publish = 1 } |
Public Member Functions | |
ExternalMessage () | |
void | validation_callback (odb::callback_event, odb::database &) const override |
std::string | subject () const |
void | subject (const std::string &subject) |
Direction | direction () const |
void | direction (Direction direction) |
DeviceClass | virtualtype () const |
void | virtualtype (DeviceClass virtualtype) |
std::string | payload () const |
void | payload (const std::string &payload) |
Public Member Functions inherited from Leosac::Hardware::Device | |
Device () | |
Device (DeviceClass device_class) | |
virtual | ~Device ()=default |
UUID | id () const |
const std::string & | name () const |
void | name (const std::string &name) |
DeviceClass | device_class () const |
void | device_class (DeviceClass d) |
bool | enabled () const |
void | enabled (bool e) |
uint64_t | odb_version () const |
Protected Attributes | |
std::string | subject_ |
Direction | direction_ |
DeviceClass | virtualtype_ |
std::string | payload_ |
Abstraction of an External Messaging device.
This is likely to be used by generic messaging libraries like MQTT or ZMQ itself but for external use (eg. notifying an external broker / IoT sytem for home automation etc...).
Definition at line 41 of file ExternalMessage.hpp.
|
strong |
Enumerator | |
---|---|
Subscribe | |
Publish |
Definition at line 44 of file ExternalMessage.hpp.
Leosac::Hardware::ExternalMessage::ExternalMessage | ( | ) |
Definition at line 27 of file ExternalMessage.cpp.
ExternalMessage::Direction Leosac::Hardware::ExternalMessage::direction | ( | ) | const |
Definition at line 45 of file ExternalMessage.cpp.
void Leosac::Hardware::ExternalMessage::direction | ( | ExternalMessage::Direction | direction | ) |
Definition at line 50 of file ExternalMessage.cpp.
std::string Leosac::Hardware::ExternalMessage::payload | ( | ) | const |
Definition at line 65 of file ExternalMessage.cpp.
void Leosac::Hardware::ExternalMessage::payload | ( | const std::string & | payload | ) |
Definition at line 70 of file ExternalMessage.cpp.
std::string Leosac::Hardware::ExternalMessage::subject | ( | ) | const |
Definition at line 35 of file ExternalMessage.cpp.
void Leosac::Hardware::ExternalMessage::subject | ( | const std::string & | subject | ) |
Definition at line 40 of file ExternalMessage.cpp.
|
overridevirtual |
Reimplemented from Leosac::Hardware::Device.
Definition at line 75 of file ExternalMessage.cpp.
DeviceClass Leosac::Hardware::ExternalMessage::virtualtype | ( | ) | const |
Definition at line 55 of file ExternalMessage.cpp.
void Leosac::Hardware::ExternalMessage::virtualtype | ( | DeviceClass | virtualtype | ) |
Definition at line 60 of file ExternalMessage.cpp.
|
protected |
Definition at line 72 of file ExternalMessage.hpp.
|
protected |
Definition at line 74 of file ExternalMessage.hpp.
|
protected |
Definition at line 71 of file ExternalMessage.hpp.
|
protected |
Definition at line 73 of file ExternalMessage.hpp.