24 #ifndef _INTERFACES_LEDINTERFACE_H_ 25 #define _INTERFACES_LEDINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 40 static const float ON;
41 static const float OFF;
45 typedef struct __attribute__((packed)) {
46 int64_t timestamp_sec;
47 int64_t timestamp_usec;
49 } LedInterface_data_t;
51 LedInterface_data_t *data;
59 typedef struct __attribute__((packed)) {
60 int64_t timestamp_sec;
61 int64_t timestamp_usec;
66 } SetIntensityMessage_data_t;
68 SetIntensityMessage_data_t *data;
90 typedef struct __attribute__((packed)) {
91 int64_t timestamp_sec;
92 int64_t timestamp_usec;
93 } TurnOnMessage_data_t;
95 TurnOnMessage_data_t *data;
110 typedef struct __attribute__((packed)) {
111 int64_t timestamp_sec;
112 int64_t timestamp_usec;
113 } TurnOffMessage_data_t;
115 TurnOffMessage_data_t *data;
139 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
TurnOffMessage Fawkes BlackBoard Interface Message.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
~TurnOnMessage()
Destructor.
virtual Message * clone() const
Clone this message.
SetIntensityMessage()
Constructor.
TurnOnMessage()
Constructor.
float intensity() const
Get intensity value.
Fawkes library namespace.
void set_time_sec(const float new_time_sec)
Set time_sec value.
virtual Message * clone() const
Clone this message.
Base class for all Fawkes BlackBoard interfaces.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
static const float ON
ON constant.
virtual void copy_values(const Interface *other)
Copy values from other interface.
void set_intensity(const float new_intensity)
Set intensity value.
float intensity() const
Get intensity value.
void set_intensity(const float new_intensity)
Set intensity value.
const char * type() const
Get type of interface.
static const float OFF
OFF constant.
size_t maxlenof_time_sec() const
Get maximum length of time_sec value.
float time_sec() const
Get time_sec value.
size_t maxlenof_intensity() const
Get maximum length of intensity value.
SetIntensityMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_intensity() const
Get maximum length of intensity value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
virtual Message * clone() const
Clone this message.
LedInterface Fawkes BlackBoard Interface.
TurnOnMessage Fawkes BlackBoard Interface Message.
TurnOffMessage()
Constructor.
~TurnOffMessage()
Destructor.
~SetIntensityMessage()
Destructor.
virtual Message * create_message(const char *type) const
Create message based on type name.