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;
77 float time_sec()
const;
78 void set_time_sec(
const float new_time_sec);
79 size_t maxlenof_time_sec()
const;
83 virtual Message * clone()
const;
90 typedef struct __attribute__((packed)) {
91 int64_t timestamp_sec;
92 int64_t timestamp_usec;
93 } TurnOnMessage_data_t;
95 TurnOnMessage_data_t *data;
103 virtual Message * clone()
const;
110 typedef struct __attribute__((packed)) {
111 int64_t timestamp_sec;
112 int64_t timestamp_usec;
113 } TurnOffMessage_data_t;
115 TurnOffMessage_data_t *data;
123 virtual Message * clone()
const;
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.
Fawkes library namespace.
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.
const char * type() const
Get type of interface.
static const float OFF
OFF constant.
size_t maxlenof_intensity() const
Get maximum length of intensity value.
SetIntensityMessage Fawkes BlackBoard Interface Message.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
LedInterface Fawkes BlackBoard Interface.
TurnOnMessage Fawkes BlackBoard Interface Message.
virtual Message * create_message(const char *type) const
Create message based on type name.