24 #ifndef __INTERFACE_MESSAGE_H_ 25 #define __INTERFACE_MESSAGE_H_ 27 #include <interface/field_iterator.h> 28 #include <interface/types.h> 29 #include <core/utils/refcount.h> 30 #include <core/exceptions/software.h> 32 #define __INTERFACE_MESSAGE_TYPE_SIZE 32 41 class InterfaceFieldIterator;
55 unsigned int id()
const;
56 void set_id(
unsigned int message_id);
58 bool enqueued()
const;
59 const Time * time_enqueued()
const;
61 unsigned int sender_id()
const;
62 const char * sender_thread_name()
const;
64 const char * type()
const;
69 unsigned int num_fields()
const;
71 const void * datachunk()
const;
72 unsigned int datasize()
const;
74 unsigned int hops()
const;
75 void set_hops(
unsigned int hops);
77 void set_from_chunk(
const void *chunk);
79 unsigned int recipient()
const;
81 virtual Message * clone()
const;
86 template <
class MessageType>
94 template <
class MessageType>
95 MessageType * as_type();
98 unsigned int __message_id;
101 Time *__time_enqueued;
103 unsigned int recipient_interface_mem_serial;
104 unsigned int sender_interface_instance_serial;
107 char *_sender_thread_name;
108 unsigned int _sender_id;
114 unsigned int __num_fields;
121 size_t length,
void *value,
const char *enumtype = 0,
136 template <
class MessageType>
138 Message::is_of_type()
140 return (dynamic_cast<MessageType *>(
this) != 0);
144 template <
class MessageType>
148 MessageType *m =
dynamic_cast<MessageType *
>(
this);
Interface field iterator.
void * data_ptr
Pointer to memory that contains local data.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Interface field info list.
Fawkes library namespace.
Timestamp data, must be present and first entries for each interface data structs! This leans on time...
A class for handling time.
Base class for all Fawkes BlackBoard interfaces.
message_data_ts_t * data_ts
data timestamp aliasing pointer
unsigned int data_size
Size of memory needed to hold all data.
int64_t timestamp_usec
additional time microseconds
Reference counting base class.
int64_t timestamp_sec
time in seconds since Unix epoch
interface_fieldtype_t
Interface field type.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.