24 #include <interfaces/TransformInterface.h>
26 #include <core/exceptions/software.h>
53 TransformInterface::TransformInterface() : Interface()
55 data_size =
sizeof(TransformInterface_data_t);
57 data = (TransformInterface_data_t *)
data_ptr;
65 unsigned char tmp_hash[] = {0xb6, 0xb0, 0xd3, 0x96, 0xda, 0x61, 0xdd, 0xd3, 0x6, 0x9e, 0x66, 0x4d, 0x14, 0x54, 0x5e, 0xfb};
70 TransformInterface::~TransformInterface()
108 strncpy(data->frame, new_frame,
sizeof(data->frame)-1);
109 data->frame[
sizeof(data->frame)-1] = 0;
123 return data->child_frame;
146 strncpy(data->child_frame, new_child_frame,
sizeof(data->child_frame)-1);
147 data->child_frame[
sizeof(data->child_frame)-1] = 0;
161 return data->static_transform;
184 data->static_transform = new_static_transform;
199 return data->translation;
216 throw Exception(
"Index value %u out of bounds (0..2)", index);
218 return data->translation[index];
242 memcpy(data->translation, new_translation,
sizeof(
double) * 3);
259 throw Exception(
"Index value %u out of bounds (0..2)", index);
261 data->translation[index] = new_translation;
276 return data->rotation;
294 throw Exception(
"Index value %u out of bounds (0..3)", index);
296 return data->rotation[index];
321 memcpy(data->rotation, new_rotation,
sizeof(
double) * 4);
339 throw Exception(
"Index value %u out of bounds (0..3)", index);
341 data->rotation[index] = new_rotation;
348 throw UnknownTypeException(
"The given type '%s' does not match any known "
349 "message type for this interface type.",
type);
364 memcpy(data, oi->data,
sizeof(TransformInterface_data_t));
370 throw UnknownTypeException(
"Unknown enum type %s", enumtype);