23 #ifndef __PLUGINS_LASER_ACQUISITION_THREAD_H_ 24 #define __PLUGINS_LASER_ACQUISITION_THREAD_H_ 26 #include <core/threading/thread.h> 27 #include <aspect/logging.h> 28 #include <aspect/configurable.h> 29 #include <aspect/clock.h> 48 bool lock_if_new_data();
54 const float * get_distance_data();
55 const float * get_echo_data();
58 unsigned int get_distance_data_size();
59 unsigned int get_echo_data_size();
65 void alloc_distances(
unsigned int num_distances);
66 void alloc_echoes(
unsigned int num_echoes);
67 void reset_distances();
Thread aspect that allows to obtain the current time from the clock.
Fawkes library namespace.
virtual void run()
Code to execute in the thread.
A class for handling time.
Thread class encapsulation of pthreads.
fawkes::Time * _timestamp
Time when the most recent data was received.
fawkes::Mutex * _data_mutex
Lock while writing to distances or echoes array or marking new data.
unsigned int _distances_size
Assign this the size of the _distances array.
float * _distances
Allocate a float array and copy your distance values measured in meters here.
Thread aspect to log output.
unsigned int _echoes_size
Assign this the size of the _echoes array.
bool _new_data
Set to true in your loop if new data is available.
Thread aspect to access configuration data.
Mutex mutual exclusion lock.
Interface for configuration handling.
float * _echoes
Allocate a float array and copy your echo values here.
virtual void run()
Stub to see name in backtrace for easier debugging.