24 #ifndef __INTERFACES_SWITCHINTERFACE_H_ 25 #define __INTERFACES_SWITCHINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 45 int64_t timestamp_sec;
46 int64_t timestamp_usec;
75 } SwitchInterface_data_t;
78 SwitchInterface_data_t *data;
88 int64_t timestamp_sec;
89 int64_t timestamp_usec;
101 SetMessage_data_t *data;
104 SetMessage(
const bool ini_enabled,
const float ini_value);
125 int64_t timestamp_sec;
126 int64_t timestamp_usec;
127 } EnableSwitchMessage_data_t;
130 EnableSwitchMessage_data_t *data;
147 int64_t timestamp_sec;
148 int64_t timestamp_usec;
149 } DisableSwitchMessage_data_t;
152 DisableSwitchMessage_data_t *data;
169 int64_t timestamp_sec;
170 int64_t timestamp_usec;
178 } EnableDurationMessage_data_t;
181 EnableDurationMessage_data_t *data;
190 float duration()
const;
191 void set_duration(
const float new_duration);
192 size_t maxlenof_duration()
const;
227 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
size_t maxlenof_enabled() const
Get maximum length of enabled value.
size_t maxlenof_value() const
Get maximum length of value value.
virtual Message * clone() const
Clone this message.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
SetMessage Fawkes BlackBoard Interface Message.
void set_value(const float new_value)
Set value value.
const char * type() const
Get message type.
void set_enabled(const bool new_enabled)
Set enabled value.
Fawkes library namespace.
float value() const
Get value value.
uint32_t long_activations() const
Get long_activations value.
void set_history(const float new_history)
Set history value.
Base class for all Fawkes BlackBoard interfaces.
void set_short_activations(const uint32_t new_short_activations)
Set short_activations value.
SwitchInterface Fawkes BlackBoard Interface.
float history() const
Get history value.
uint32_t short_activations() const
Get short_activations value.
void set_activation_count(const uint32_t new_activation_count)
Set activation_count value.
bool is_enabled() const
Get enabled value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
DisableSwitchMessage Fawkes BlackBoard Interface Message.
uint32_t activation_count() const
Get activation_count value.
void set_long_activations(const uint32_t new_long_activations)
Set long_activations value.
size_t maxlenof_activation_count() const
Get maximum length of activation_count value.
size_t maxlenof_long_activations() const
Get maximum length of long_activations value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
EnableSwitchMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_history() const
Get maximum length of history value.
float value() const
Get value value.
size_t maxlenof_short_activations() const
Get maximum length of short_activations value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
EnableDurationMessage Fawkes BlackBoard Interface Message.
virtual Message * create_message(const char *type) const
Create message based on type name.