24 #include <interfaces/Laser360Interface.h>
26 #include <core/exceptions/software.h>
50 Laser360Interface::Laser360Interface() : Interface()
52 data_size =
sizeof(Laser360Interface_data_t);
54 data = (Laser360Interface_data_t *)
data_ptr;
60 unsigned char tmp_hash[] = {0x5c, 0x1, 0x85, 0x24, 0x85, 0x28, 0x1f, 0xc6, 0xae, 0x4c, 0x46, 0x66, 0xe9, 0xcb, 0xe9, 0x4e};
65 Laser360Interface::~Laser360Interface()
101 strncpy(data->frame, new_frame,
sizeof(data->frame)-1);
102 data->frame[
sizeof(data->frame)-1] = 0;
115 return data->distances;
130 throw Exception(
"Index value %u out of bounds (0..359)", index);
132 return data->distances[index];
154 memcpy(data->distances, new_distances,
sizeof(
float) * 360);
169 throw Exception(
"Index value %u out of bounds (0..359)", index);
171 data->distances[index] = new_distances;
183 return data->clockwise_angle;
205 data->clockwise_angle = new_clockwise_angle;
214 "message type for this interface type.",
type);
229 memcpy(data, oi->data,
sizeof(Laser360Interface_data_t));
235 throw UnknownTypeException(
"Unknown enum type %s", enumtype);