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>
31 #define __INTERFACE_MESSAGE_TYPE_SIZE 32
40 class InterfaceFieldIterator;
54 unsigned int id()
const;
55 void set_id(
unsigned int message_id);
57 bool enqueued()
const;
58 const Time * time_enqueued()
const;
60 unsigned int sender_id()
const;
61 const char * sender_thread_name()
const;
63 const char * type()
const;
68 unsigned int num_fields()
const;
70 const void * datachunk()
const;
71 unsigned int datasize()
const;
73 unsigned int hops()
const;
74 void set_hops(
unsigned int hops);
76 void set_from_chunk(
const void *chunk);
78 unsigned int recipient()
const;
80 virtual Message * clone()
const;
85 template <
class MessageType>
89 unsigned int __message_id;
92 Time *__time_enqueued;
94 unsigned int recipient_interface_mem_serial;
95 unsigned int sender_interface_instance_serial;
98 char *_sender_thread_name;
99 unsigned int _sender_id;
105 unsigned int __num_fields;
112 size_t length,
void *value,
const char *enumtype = 0);
126 template <
class MessageType>
128 Message::is_of_type()
130 return (dynamic_cast<MessageType *>(
this) != 0);
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.
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.