Fawkes API
Fawkes Development Version
|
TestInterface Fawkes BlackBoard Interface. More...
#include <>>
Classes | |
class | CalculateMessage |
CalculateMessage Fawkes BlackBoard Interface Message. More... | |
class | SetTestIntMessage |
SetTestIntMessage Fawkes BlackBoard Interface Message. More... | |
class | SetTestStringMessage |
SetTestStringMessage Fawkes BlackBoard Interface Message. More... | |
struct | TestInterface_data_t |
Internal data storage, do NOT modify! More... | |
Public Types | |
enum | TestEnum { TEST_ENUM_1, TEST_ENUM_2 } |
Demonstrating enums. More... | |
Public Member Functions | |
const char * | tostring_TestEnum (TestEnum value) const |
Convert TestEnum constant to string. | |
virtual bool | message_valid (const Message *message) const |
Check if message is valid and can be enqueued. | |
bool | is_test_bool () const |
Get test_bool value. | |
void | set_test_bool (const bool new_test_bool) |
Set test_bool value. | |
size_t | maxlenof_test_bool () const |
Get maximum length of test_bool value. | |
int32_t | test_int () const |
Get test_int value. | |
void | set_test_int (const int32_t new_test_int) |
Set test_int value. | |
size_t | maxlenof_test_int () const |
Get maximum length of test_int value. | |
uint8_t | flags () const |
Get flags value. | |
void | set_flags (const uint8_t new_flags) |
Set flags value. | |
size_t | maxlenof_flags () const |
Get maximum length of flags value. | |
char * | test_string () const |
Get test_string value. | |
void | set_test_string (const char *new_test_string) |
Set test_string value. | |
size_t | maxlenof_test_string () const |
Get maximum length of test_string value. | |
int32_t | result () const |
Get result value. | |
void | set_result (const int32_t new_result) |
Set result value. | |
size_t | maxlenof_result () const |
Get maximum length of result value. | |
uint32_t | test_uint () const |
Get test_uint value. | |
void | set_test_uint (const uint32_t new_test_uint) |
Set test_uint value. | |
size_t | maxlenof_test_uint () const |
Get maximum length of test_uint 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. | |
virtual const char * | enum_tostring (const char *enumtype, int val) const |
Convert arbitrary enum value to string. | |
Static Public Attributes | |
static const int32_t | TEST_CONSTANT = 5 |
TEST_CONSTANT constant. | |
static const float | TEST_FLOAT_CONSTANT = 1.2 |
TEST_FLOAT_CONSTANT constant. |
TestInterface Fawkes BlackBoard Interface.
Test interface. Use this to play around. Do NOT remove any fields, as this interface is used by BlackBoard QA.
Demonstrating enums.
Definition at line 44 of file TestInterface.h.
void fawkes::TestInterface::copy_values | ( | const Interface * | other | ) | [virtual] |
Copy values from other interface.
other | other interface to copy values from |
Implements fawkes::Interface.
Definition at line 293 of file TestInterface.cpp.
References fawkes::Message::type(), and fawkes::Interface::type().
Message * fawkes::TestInterface::create_message | ( | const char * | type | ) | const [virtual] |
Create message based on type name.
This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.
type | message type |
UnknownTypeException | thrown if this interface cannot create a message of the given type. |
Implements fawkes::Interface.
Definition at line 274 of file TestInterface.cpp.
const char * fawkes::TestInterface::enum_tostring | ( | const char * | enumtype, |
int | val | ||
) | const [virtual] |
Convert arbitrary enum value to string.
Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.
enumtype | enum type as string |
val | value to convert |
UnknownTypeException | thrown if enumtype is not specified for interface. |
Implements fawkes::Interface.
Definition at line 304 of file TestInterface.cpp.
uint8_t fawkes::TestInterface::flags | ( | ) | const |
Get flags value.
Flags spit down by the writer
Definition at line 153 of file TestInterface.cpp.
bool fawkes::TestInterface::is_test_bool | ( | ) | const |
Get test_bool value.
Test Bool
Definition at line 91 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_flags | ( | ) | const |
Get maximum length of flags value.
Definition at line 163 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_result | ( | ) | const |
Get maximum length of result value.
Definition at line 225 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_bool | ( | ) | const |
Get maximum length of test_bool value.
Definition at line 101 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_int | ( | ) | const |
Get maximum length of test_int value.
Definition at line 132 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_string | ( | ) | const |
Get maximum length of test_string value.
Definition at line 194 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_uint | ( | ) | const |
Get maximum length of test_uint value.
Definition at line 256 of file TestInterface.cpp.
bool fawkes::TestInterface::message_valid | ( | const Message * | message | ) | const [virtual] |
Check if message is valid and can be enqueued.
message | Message to check |
Implements fawkes::Interface.
Definition at line 622 of file TestInterface.cpp.
int32_t fawkes::TestInterface::result | ( | ) | const |
Get result value.
Result of operation add operation from Calculate message.
Definition at line 215 of file TestInterface.cpp.
void fawkes::TestInterface::set_flags | ( | const uint8_t | new_flags | ) |
Set flags value.
Flags spit down by the writer
new_flags | new flags value |
Definition at line 173 of file TestInterface.cpp.
References fawkes::Interface::data_changed.
void fawkes::TestInterface::set_result | ( | const int32_t | new_result | ) |
Set result value.
Result of operation add operation from Calculate message.
new_result | new result value |
Definition at line 235 of file TestInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by AgentControlThread::loop().
void fawkes::TestInterface::set_test_bool | ( | const bool | new_test_bool | ) |
Set test_bool value.
Test Bool
new_test_bool | new test_bool value |
Definition at line 111 of file TestInterface.cpp.
References fawkes::Interface::data_changed.
void fawkes::TestInterface::set_test_int | ( | const int32_t | new_test_int | ) |
Set test_int value.
Test integer
new_test_int | new test_int value |
Definition at line 142 of file TestInterface.cpp.
References fawkes::Interface::data_changed.
void fawkes::TestInterface::set_test_string | ( | const char * | new_test_string | ) |
Set test_string value.
A test sring
new_test_string | new test_string value |
Definition at line 204 of file TestInterface.cpp.
References fawkes::Interface::data_changed.
void fawkes::TestInterface::set_test_uint | ( | const uint32_t | new_test_uint | ) |
Set test_uint value.
Test uint32
new_test_uint | new test_uint value |
Definition at line 266 of file TestInterface.cpp.
References fawkes::Interface::data_changed.
int32_t fawkes::TestInterface::test_int | ( | ) | const |
Get test_int value.
Test integer
Definition at line 122 of file TestInterface.cpp.
char * fawkes::TestInterface::test_string | ( | ) | const |
Get test_string value.
A test sring
Definition at line 184 of file TestInterface.cpp.
uint32_t fawkes::TestInterface::test_uint | ( | ) | const |
Get test_uint value.
Test uint32
Definition at line 246 of file TestInterface.cpp.
const char * fawkes::TestInterface::tostring_TestEnum | ( | TestEnum | value | ) | const |
Convert TestEnum constant to string.
value | value to convert to string |
Definition at line 77 of file TestInterface.cpp.
const int32_t fawkes::TestInterface::TEST_CONSTANT = 5 [static] |
TEST_CONSTANT constant.
Definition at line 40 of file TestInterface.h.
const float fawkes::TestInterface::TEST_FLOAT_CONSTANT = 1.2 [static] |
TEST_FLOAT_CONSTANT constant.
Definition at line 41 of file TestInterface.h.