Classes | Public Types | Public Member Functions | Static Public Attributes

fawkes::TestInterface Class Reference
[Fawkes Interfaces]

TestInterface Fawkes BlackBoard Interface. More...

#include <>>

Inheritance diagram for fawkes::TestInterface:
Inheritance graph
[legend]

List of all members.

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!

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.
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 Messagecreate_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.

Detailed Description

TestInterface Fawkes BlackBoard Interface.

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.


Member Enumeration Documentation

Demonstrating enums.

Enumerator:
TEST_ENUM_1 

Item 1.

TEST_ENUM_2 

Item 2.

Definition at line 44 of file TestInterface.h.


Member Function Documentation

void fawkes::TestInterface::copy_values ( const Interface other  )  [virtual]

Copy values from other interface.

Parameters:
other other interface to copy values from

Implements fawkes::Interface.

Definition at line 357 of file TestInterface.cpp.

References 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.

Parameters:
type message type
Returns:
message of the given type, empty
Exceptions:
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.

Parameters:
enumtype enum type as string
val value to convert
Returns:
string representation of value
Exceptions:
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

Returns:
flags value

Definition at line 155 of file TestInterface.cpp.

bool fawkes::TestInterface::is_test_bool (  )  const

Get test_bool value.

Test Bool

Returns:
test_bool value

Definition at line 93 of file TestInterface.cpp.

size_t fawkes::TestInterface::maxlenof_flags (  )  const

Get maximum length of flags value.

Returns:
length of flags value, can be length of the array or number of maximum number of characters for a string

Definition at line 165 of file TestInterface.cpp.

size_t fawkes::TestInterface::maxlenof_result (  )  const

Get maximum length of result value.

Returns:
length of result value, can be length of the array or number of maximum number of characters for a string

Definition at line 227 of file TestInterface.cpp.

size_t fawkes::TestInterface::maxlenof_test_bool (  )  const

Get maximum length of test_bool value.

Returns:
length of test_bool value, can be length of the array or number of maximum number of characters for a string

Definition at line 103 of file TestInterface.cpp.

size_t fawkes::TestInterface::maxlenof_test_int (  )  const

Get maximum length of test_int value.

Returns:
length of test_int value, can be length of the array or number of maximum number of characters for a string

Definition at line 134 of file TestInterface.cpp.

size_t fawkes::TestInterface::maxlenof_test_lint (  )  const

Get maximum length of test_lint value.

Returns:
length of test_lint value, can be length of the array or number of maximum number of characters for a string

Definition at line 320 of file TestInterface.cpp.

size_t fawkes::TestInterface::maxlenof_test_string (  )  const

Get maximum length of test_string value.

Returns:
length of test_string value, can be length of the array or number of maximum number of characters for a string

Definition at line 196 of file TestInterface.cpp.

size_t fawkes::TestInterface::maxlenof_test_uint (  )  const

Get maximum length of test_uint value.

Returns:
length of test_uint value, can be length of the array or number of maximum number of characters for a string

Definition at line 258 of file TestInterface.cpp.

size_t fawkes::TestInterface::maxlenof_test_ulint (  )  const

Get maximum length of test_ulint value.

Returns:
length of test_ulint value, can be length of the array or number of maximum number of characters for a string

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.

Parameters:
message Message to check
Returns:
true if the message is valid, false otherwise.

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.

Returns:
result value

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

Parameters:
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.

Parameters:
new_result new result value

Definition at line 237 of file TestInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::TestInterface::set_test_bool ( const bool  new_test_bool  ) 

Set test_bool value.

Test Bool

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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

Returns:
test_int value

Definition at line 124 of file TestInterface.cpp.

int64_t fawkes::TestInterface::test_lint (  )  const

Get test_lint value.

Test long int

Returns:
test_lint value

Definition at line 310 of file TestInterface.cpp.

char * fawkes::TestInterface::test_string (  )  const

Get test_string value.

A test sring

Returns:
test_string value

Definition at line 186 of file TestInterface.cpp.

uint32_t fawkes::TestInterface::test_uint (  )  const

Get test_uint value.

Test uint32

Returns:
test_uint value

Definition at line 248 of file TestInterface.cpp.

uint64_t fawkes::TestInterface::test_ulint (  )  const

Get test_ulint value.

Test unsigned long int

Returns:
test_ulint value

Definition at line 279 of file TestInterface.cpp.

const char * fawkes::TestInterface::tostring_TestEnum ( TestEnum  value  )  const

Convert TestEnum constant to string.

Parameters:
value value to convert to string
Returns:
constant value as string.

Definition at line 79 of file TestInterface.cpp.

References TEST_ENUM_1, and TEST_ENUM_2.

Referenced by enum_tostring().


Member Data Documentation

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.


The documentation for this class was generated from the following files: