24 #include <interfaces/Laser1080Interface.h>
26 #include <core/exceptions/software.h>
47 Laser1080Interface::Laser1080Interface() : Interface()
49 data_size =
sizeof(Laser1080Interface_data_t);
51 data = (Laser1080Interface_data_t *)
data_ptr;
57 unsigned char tmp_hash[] = {0xa7, 0xab, 0x1f, 0x20, 0xdb, 0x24, 0xf9, 0x1b, 0x4e, 0xd6, 0x8b, 0xfa, 0x65, 0x25, 0xe5, 0x22};
62 Laser1080Interface::~Laser1080Interface()
98 strncpy(data->frame, new_frame,
sizeof(data->frame)-1);
99 data->frame[
sizeof(data->frame)-1] = 0;
112 return data->distances;
127 throw Exception(
"Index value %u out of bounds (0..1079)", index);
129 return data->distances[index];
151 memcpy(data->distances, new_distances,
sizeof(
float) * 1080);
166 throw Exception(
"Index value %u out of bounds (0..1079)", index);
168 data->distances[index] = new_distances;
180 return data->clockwise_angle;
202 data->clockwise_angle = new_clockwise_angle;
211 "message type for this interface type.",
type);
226 memcpy(data, oi->data,
sizeof(Laser1080Interface_data_t));
232 throw UnknownTypeException(
"Unknown enum type %s", enumtype);