24 #include <interfaces/PclDatabaseStoreInterface.h> 26 #include <core/exceptions/software.h> 46 PclDatabaseStoreInterface::PclDatabaseStoreInterface() : Interface()
48 data_size =
sizeof(PclDatabaseStoreInterface_data_t);
50 data = (PclDatabaseStoreInterface_data_t *)
data_ptr;
57 unsigned char tmp_hash[] = {0x80, 0xe0, 0x2f, 0x81, 0x4a, 0x5, 0x5c, 0xec, 0xd8, 0x64, 0xed, 0x5c, 0xee, 0x17, 0x19, 0xa6};
62 PclDatabaseStoreInterface::~PclDatabaseStoreInterface()
100 data->msgid = new_msgid;
137 data->final = new_final;
172 strncpy(data->error, new_error,
sizeof(data->error));
180 if ( strncmp(
"StoreMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
184 "message type for this interface type.", type);
200 memcpy(data, oi->data,
sizeof(PclDatabaseStoreInterface_data_t));
227 data = (StoreMessage_data_t *)
data_ptr;
229 strncpy(data->pcl_id, ini_pcl_id, 64);
230 strncpy(data->database, ini_database, 64);
231 strncpy(data->collection, ini_collection, 128);
242 data = (StoreMessage_data_t *)
data_ptr;
263 data = (StoreMessage_data_t *)
data_ptr;
299 strncpy(data->pcl_id, new_pcl_id,
sizeof(data->pcl_id));
312 return data->database;
335 strncpy(data->database, new_database,
sizeof(data->database));
348 return data->collection;
371 strncpy(data->collection, new_collection,
sizeof(data->collection));
void set_msgid(const uint32_t new_msgid)
Set msgid value.
virtual Message * create_message(const char *type) const
Create message based on type name.
void * data_ptr
Pointer to memory that contains local data.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
void set_final(const bool new_final)
Set final value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
void set_hash(unsigned char *ihash)
Set hash.
void set_error(const char *new_error)
Set error value.
char * pcl_id() const
Get pcl_id value.
char * database() const
Get database value.
void set_database(const char *new_database)
Set database value.
Fawkes library namespace.
Timestamp data, must be present and first entries for each interface data structs! This leans on time...
unsigned int data_size
Minimal data size to hold data storage.
void set_pcl_id(const char *new_pcl_id)
Set pcl_id value.
StoreMessage()
Constructor.
char * collection() const
Get collection value.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
char * error() const
Get error value.
Base class for all Fawkes BlackBoard interfaces.
size_t maxlenof_database() const
Get maximum length of database value.
message_data_ts_t * data_ts
data timestamp aliasing pointer
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
Add an entry to the field info list.
size_t maxlenof_collection() const
Get maximum length of collection value.
unsigned int data_size
Size of memory needed to hold all data.
void add_messageinfo(const char *name)
Add an entry to the message info list.
bool data_changed
Indicator if data has changed.
void set_collection(const char *new_collection)
Set collection value.
const char * type() const
Get type of interface.
void * data_ptr
Pointer to local memory storage.
size_t maxlenof_final() const
Get maximum length of final value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
bool is_final() const
Get final value.
virtual Message * clone() const
Clone this message.
uint32_t msgid() const
Get msgid value.
~StoreMessage()
Destructor.
size_t maxlenof_pcl_id() const
Get maximum length of pcl_id value.
StoreMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_error() const
Get maximum length of error value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
interface_data_ts_t * data_ts
Pointer to data casted to timestamp struct.
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
Add an entry to the info list.
PclDatabaseStoreInterface Fawkes BlackBoard Interface.
32 bit unsigned integer field