24 #include <interfaces/Position3DInterface.h> 26 #include <core/exceptions/software.h> 46 Position3DInterface::Position3DInterface() : Interface()
48 data_size =
sizeof(Position3DInterface_data_t);
50 data = (Position3DInterface_data_t *)
data_ptr;
58 unsigned char tmp_hash[] = {0xd6, 0x19, 0x3f, 0x58, 0x62, 0xbc, 0x72, 0xd6, 0x22, 0x36, 0xd3, 0x7, 0x55, 0xb5, 0x3a, 0x48};
63 Position3DInterface::~Position3DInterface()
99 strncpy(data->frame, new_frame,
sizeof(data->frame));
116 return data->visibility_history;
142 data->visibility_history = new_visibility_history;
155 return data->rotation;
170 throw Exception(
"Index value %u out of bounds (0..4)", index);
172 return data->rotation[index];
194 memcpy(data->rotation, new_rotation,
sizeof(
double) * 4);
209 throw Exception(
"Index value %u out of bounds (0..4)", index);
211 data->rotation[index] = new_rotation;
223 return data->translation;
238 throw Exception(
"Index value %u out of bounds (0..3)", index);
240 return data->translation[index];
262 memcpy(data->translation, new_translation,
sizeof(
double) * 3);
277 throw Exception(
"Index value %u out of bounds (0..3)", index);
279 data->translation[index] = new_translation;
294 return data->covariance;
312 throw Exception(
"Index value %u out of bounds (0..36)", index);
314 return data->covariance[index];
339 memcpy(data->covariance, new_covariance,
sizeof(
double) * 36);
357 throw Exception(
"Index value %u out of bounds (0..36)", index);
359 data->covariance[index] = new_covariance;
367 "message type for this interface type.", type);
382 memcpy(data, oi->data,
sizeof(Position3DInterface_data_t));
void set_frame(const char *new_frame)
Set frame value.
double * rotation() const
Get rotation value.
char * frame() const
Get frame value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
void set_hash(unsigned char *ihash)
Set hash.
Fawkes library namespace.
unsigned int data_size
Minimal data size to hold data storage.
size_t maxlenof_frame() const
Get maximum length of frame value.
virtual Message * create_message(const char *type) const
Create message based on type name.
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.
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.
bool data_changed
Indicator if data has changed.
const char * type() const
Get type of interface.
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.
void set_covariance(unsigned int index, const double new_covariance)
Set covariance value at given index.
double * translation() const
Get translation value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
size_t maxlenof_translation() const
Get maximum length of translation value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
size_t maxlenof_visibility_history() const
Get maximum length of visibility_history value.
size_t maxlenof_rotation() const
Get maximum length of rotation value.
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.
size_t maxlenof_covariance() const
Get maximum length of covariance value.
double * covariance() const
Get covariance value.