24 #include <interfaces/Position3DInterface.h>
26 #include <core/exceptions/software.h>
44 Position3DInterface::Position3DInterface() : Interface()
46 data_size =
sizeof(Position3DInterface_data_t);
48 data = (Position3DInterface_data_t *)
data_ptr;
55 unsigned char tmp_hash[] = {0xd, 0x82, 0xad, 0x13, 0x3c, 0xeb, 0x96, 0x82, 0x25, 0x6f, 0x2f, 0x62, 0xd7, 0x87, 0xec, 0x5a};
60 Position3DInterface::~Position3DInterface()
96 strncpy(data->frame, new_frame,
sizeof(data->frame));
113 return data->visibility_history;
139 data->visibility_history = new_visibility_history;
152 return data->rotation;
167 throw Exception(
"Index value %u out of bounds (0..4)", index);
169 return data->rotation[index];
191 memcpy(data->rotation, new_rotation,
sizeof(
double) * 4);
206 throw Exception(
"Index value %u out of bounds (0..4)", index);
208 data->rotation[index] = new_rotation;
220 return data->translation;
235 throw Exception(
"Index value %u out of bounds (0..3)", index);
237 return data->translation[index];
259 memcpy(data->translation, new_translation,
sizeof(
double) * 3);
274 throw Exception(
"Index value %u out of bounds (0..3)", index);
276 data->translation[index] = new_translation;
284 "message type for this interface type.", type);
299 memcpy(data, oi->data,
sizeof(Position3DInterface_data_t));
void set_frame(const char *new_frame)
Set frame value.
size_t maxlenof_translation() const
Get maximum length of translation value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
void set_hash(unsigned char *ihash)
Set hash.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
size_t maxlenof_frame() const
Get maximum length of frame value.
unsigned int data_size
Minimal data size to hold data storage.
size_t maxlenof_rotation() const
Get maximum length of rotation value.
void set_translation(unsigned int index, const double new_translation)
Set translation value at given index.
Base class for all Fawkes BlackBoard interfaces.
void set_rotation(unsigned int index, const double new_rotation)
Set rotation value at given index.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
double * translation() const
Get translation value.
bool data_changed
Indicator if data has changed.
Position3DInterface Fawkes BlackBoard Interface.
void * data_ptr
Pointer to local memory storage.
void set_visibility_history(const int32_t new_visibility_history)
Set visibility_history value.
Base class for exceptions in Fawkes.
size_t maxlenof_visibility_history() const
Get maximum length of visibility_history value.
double * rotation() const
Get rotation value.
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0)
Add an entry to the field info list.
virtual Message * create_message(const char *type) const
Create message based on type name.
int32_t visibility_history() const
Get visibility_history value.
interface_data_ts_t * data_ts
Pointer to data casted to timestamp struct.
virtual void copy_values(const Interface *other)
Copy values from other interface.
const char * type() const
Get type of interface.
char * frame() const
Get frame value.