24 #ifndef __INTERFACES_TESTINTERFACE_H_ 25 #define __INTERFACES_TESTINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 52 typedef struct __attribute__((packed)) {
53 int64_t timestamp_sec;
54 int64_t timestamp_usec;
61 } TestInterface_data_t;
63 TestInterface_data_t *data;
72 typedef struct __attribute__((packed)) {
73 int64_t timestamp_sec;
74 int64_t timestamp_usec;
76 } SetTestIntMessage_data_t;
78 SetTestIntMessage_data_t *data;
91 virtual Message * clone()
const;
98 typedef struct __attribute__((packed)) {
99 int64_t timestamp_sec;
100 int64_t timestamp_usec;
102 } SetTestStringMessage_data_t;
104 SetTestStringMessage_data_t *data;
117 virtual Message * clone()
const;
124 typedef struct __attribute__((packed)) {
125 int64_t timestamp_sec;
126 int64_t timestamp_usec;
129 } CalculateMessage_data_t;
131 CalculateMessage_data_t *data;
141 int32_t summand()
const;
142 void set_summand(
const int32_t new_summand);
143 size_t maxlenof_summand()
const;
144 int32_t addend()
const;
145 void set_addend(
const int32_t new_addend);
146 size_t maxlenof_addend()
const;
147 virtual Message * clone()
const;
163 uint8_t
flags()
const;
178 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
Base class for all messages passed through interfaces in Fawkes BlackBoard.
size_t maxlenof_test_bool() const
Get maximum length of test_bool value.
TestEnum
Demonstrating enums.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
Fawkes library namespace.
size_t maxlenof_flags() const
Get maximum length of flags value.
virtual Message * create_message(const char *type) const
Create message based on type name.
virtual void copy_values(const Interface *other)
Copy values from other interface.
Base class for all Fawkes BlackBoard interfaces.
void set_test_int(const int32_t new_test_int)
Set test_int value.
static const int32_t TEST_CONSTANT
TEST_CONSTANT constant.
const char * type() const
Get type of interface.
char * test_string() const
Get test_string value.
size_t maxlenof_test_uint() const
Get maximum length of test_uint value.
uint32_t test_uint() const
Get test_uint value.
void set_test_bool(const bool new_test_bool)
Set test_bool value.
CalculateMessage Fawkes BlackBoard Interface Message.
int32_t result() const
Get result value.
void set_flags(const uint8_t new_flags)
Set flags value.
SetTestIntMessage Fawkes BlackBoard Interface Message.
uint8_t flags() const
Get flags value.
void set_test_uint(const uint32_t new_test_uint)
Set test_uint value.
size_t maxlenof_result() const
Get maximum length of result value.
void set_test_string(const char *new_test_string)
Set test_string value.
size_t maxlenof_test_int() const
Get maximum length of test_int value.
bool is_test_bool() const
Get test_bool value.
int32_t test_int() const
Get test_int value.
const char * tostring_TestEnum(TestEnum value) const
Convert TestEnum constant to string.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
static const float TEST_FLOAT_CONSTANT
TEST_FLOAT_CONSTANT constant.
void set_result(const int32_t new_result)
Set result value.
SetTestStringMessage Fawkes BlackBoard Interface Message.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
size_t maxlenof_test_string() const
Get maximum length of test_string value.
TestInterface Fawkes BlackBoard Interface.