#include <interfaces/TestInterface.h>
Inheritance diagram for fawkes::TestInterface:
Public Types | |
TEST_ENUM_1 | |
Item 1. | |
TEST_ENUM_2 | |
Item 2. | |
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. | |
uint64_t | test_ulint () const |
Get test_ulint value. | |
void | set_test_ulint (const uint64_t new_test_ulint) |
Set test_ulint value. | |
size_t | maxlenof_test_ulint () const |
Get maximum length of test_ulint value. | |
int64_t | test_lint () const |
Get test_lint value. | |
void | set_test_lint (const int64_t new_test_lint) |
Set test_lint value. | |
size_t | maxlenof_test_lint () const |
Get maximum length of test_lint 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. | |
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! |
Test interface. Use this to play around. Do NOT remove any fields, as this interface is used by BlackBoard QA.
Definition at line 33 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 357 of file TestInterface.cpp.
References data, 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 338 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 368 of file TestInterface.cpp.
References tostring_TestEnum().
uint8_t fawkes::TestInterface::flags | ( | ) | const |
Get flags value.
Flags spit down by the writer
Definition at line 155 of file TestInterface.cpp.
bool fawkes::TestInterface::is_test_bool | ( | ) | const |
Get test_bool value.
Test Bool
Definition at line 93 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_flags | ( | ) | const |
Get maximum length of flags value.
Definition at line 165 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_result | ( | ) | const |
Get maximum length of result value.
Definition at line 227 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_bool | ( | ) | const |
Get maximum length of test_bool value.
Definition at line 103 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_int | ( | ) | const |
Get maximum length of test_int value.
Definition at line 134 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_lint | ( | ) | const |
Get maximum length of test_lint value.
Definition at line 320 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_string | ( | ) | const |
Get maximum length of test_string value.
Definition at line 196 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_uint | ( | ) | const |
Get maximum length of test_uint value.
Definition at line 258 of file TestInterface.cpp.
size_t fawkes::TestInterface::maxlenof_test_ulint | ( | ) | const |
Get maximum length of test_ulint value.
Definition at line 289 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 686 of file TestInterface.cpp.
int32_t fawkes::TestInterface::result | ( | ) | const |
Get result value.
Result of operation add operation from Calculate message.
Definition at line 217 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 175 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 237 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 113 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 144 of file TestInterface.cpp.
References fawkes::Interface::data_changed.
void fawkes::TestInterface::set_test_lint | ( | const int64_t | new_test_lint | ) |
Set test_lint value.
Test long int
new_test_lint | new test_lint value |
Definition at line 330 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 206 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 268 of file TestInterface.cpp.
References fawkes::Interface::data_changed.
void fawkes::TestInterface::set_test_ulint | ( | const uint64_t | new_test_ulint | ) |
Set test_ulint value.
Test unsigned long int
new_test_ulint | new test_ulint value |
Definition at line 299 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 124 of file TestInterface.cpp.
int64_t fawkes::TestInterface::test_lint | ( | ) | const |
Get test_lint value.
Test long int
Definition at line 310 of file TestInterface.cpp.
char * fawkes::TestInterface::test_string | ( | ) | const |
Get test_string value.
A test sring
Definition at line 186 of file TestInterface.cpp.
uint32_t fawkes::TestInterface::test_uint | ( | ) | const |
Get test_uint value.
Test uint32
Definition at line 248 of file TestInterface.cpp.
uint64_t fawkes::TestInterface::test_ulint | ( | ) | const |
Get test_ulint value.
Test unsigned long int
Definition at line 279 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 79 of file TestInterface.cpp.
References TEST_ENUM_1, and TEST_ENUM_2.
Referenced by enum_tostring().
const int32_t fawkes::TestInterface::TEST_CONSTANT = 5 [static] |
const float fawkes::TestInterface::TEST_FLOAT_CONSTANT = 1.2 [static] |