24 #include <interfaces/Position2DTrackInterface.h>
26 #include <core/exceptions/software.h>
46 Position2DTrackInterface::Position2DTrackInterface() : Interface()
48 data_size =
sizeof(Position2DTrackInterface_data_t);
50 data = (Position2DTrackInterface_data_t *)
data_ptr;
58 unsigned char tmp_hash[] = {0x48, 0xe9, 0x35, 0x74, 0x18, 0x14, 0x46, 0x31, 0x6e, 0x5c, 0x76, 0x2e, 0x39, 0x1, 0x5, 0x30};
63 Position2DTrackInterface::~Position2DTrackInterface()
78 return data->track_x_positions;
94 throw Exception(
"Index value %u out of bounds (0..29)", index);
96 return data->track_x_positions[index];
119 memcpy(data->track_x_positions, new_track_x_positions,
sizeof(
float) * 30);
135 throw Exception(
"Index value %u out of bounds (0..29)", index);
137 data->track_x_positions[index] = new_track_x_positions;
150 return data->track_y_positions;
166 throw Exception(
"Index value %u out of bounds (0..29)", index);
168 return data->track_y_positions[index];
191 memcpy(data->track_y_positions, new_track_y_positions,
sizeof(
float) * 30);
207 throw Exception(
"Index value %u out of bounds (0..29)", index);
209 data->track_y_positions[index] = new_track_y_positions;
222 return data->track_timestamps;
238 throw Exception(
"Index value %u out of bounds (0..29)", index);
240 return data->track_timestamps[index];
263 memcpy(data->track_timestamps, new_track_timestamps,
sizeof(int32_t) * 30);
279 throw Exception(
"Index value %u out of bounds (0..29)", index);
281 data->track_timestamps[index] = new_track_timestamps;
311 data->length = new_length;
322 return data->track_id;
342 data->track_id = new_track_id;
351 "message type for this interface type.",
type);
366 memcpy(data, oi->data,
sizeof(Position2DTrackInterface_data_t));
372 throw UnknownTypeException(
"Unknown enum type %s", enumtype);