24 #include <interfaces/Position2DTrackInterface.h>
26 #include <core/exceptions/software.h>
44 Position2DTrackInterface::Position2DTrackInterface() : Interface()
46 data_size =
sizeof(Position2DTrackInterface_data_t);
48 data = (Position2DTrackInterface_data_t *)
data_ptr;
57 unsigned char tmp_hash[] = {0xcd, 0xb8, 0x68, 0x14, 0xff, 0x3, 0xe4, 0xc4, 0x20, 0x43, 0x44, 0xb8, 0x86, 0x87, 0xa3, 0x4c};
62 Position2DTrackInterface::~Position2DTrackInterface()
77 return data->track_x_positions;
93 throw Exception(
"Index value %u out of bounds (0..30)", index);
95 return data->track_x_positions[index];
118 memcpy(data->track_x_positions, new_track_x_positions,
sizeof(
float) * 30);
134 throw Exception(
"Index value %u out of bounds (0..30)", index);
136 data->track_x_positions[index] = new_track_x_positions;
149 return data->track_y_positions;
165 throw Exception(
"Index value %u out of bounds (0..30)", index);
167 return data->track_y_positions[index];
190 memcpy(data->track_y_positions, new_track_y_positions,
sizeof(
float) * 30);
206 throw Exception(
"Index value %u out of bounds (0..30)", index);
208 data->track_y_positions[index] = new_track_y_positions;
221 return data->track_timestamps;
237 throw Exception(
"Index value %u out of bounds (0..30)", index);
239 return data->track_timestamps[index];
262 memcpy(data->track_timestamps, new_track_timestamps,
sizeof(int32_t) * 30);
278 throw Exception(
"Index value %u out of bounds (0..30)", index);
280 data->track_timestamps[index] = new_track_timestamps;
310 data->valid = new_valid;
341 data->length = new_length;
352 return data->track_id;
372 data->track_id = new_track_id;
381 "message type for this interface type.", type);
396 memcpy(data, oi->data,
sizeof(Position2DTrackInterface_data_t));