Fawkes API
Fawkes Development Version
|
Laser720Interface Fawkes BlackBoard Interface. More...
#include <>>
Classes | |
struct | Laser720Interface_data_t |
Internal data storage, do NOT modify! More... | |
Public Member Functions | |
virtual bool | message_valid (const Message *message) const |
Check if message is valid and can be enqueued. | |
char * | frame () const |
Get frame value. | |
void | set_frame (const char *new_frame) |
Set frame value. | |
size_t | maxlenof_frame () const |
Get maximum length of frame value. | |
float * | distances () const |
Get distances value. | |
float | distances (unsigned int index) const |
Get distances value at given index. | |
void | set_distances (unsigned int index, const float new_distances) |
Set distances value at given index. | |
void | set_distances (const float *new_distances) |
Set distances value. | |
size_t | maxlenof_distances () const |
Get maximum length of distances value. | |
bool | is_clockwise_angle () const |
Get clockwise_angle value. | |
void | set_clockwise_angle (const bool new_clockwise_angle) |
Set clockwise_angle value. | |
size_t | maxlenof_clockwise_angle () const |
Get maximum length of clockwise_angle value. | |
virtual Message * | create_message (const char *type) const |
Create message based on type name. | |
virtual void | copy_values (const Interface *other) |
Copy values from other interface. | |
virtual const char * | enum_tostring (const char *enumtype, int val) const |
Convert arbitrary enum value to string. |
Laser720Interface Fawkes BlackBoard Interface.
This interface provides access to data of a laser scanner that produces 720 beams per scan.
void fawkes::Laser720Interface::copy_values | ( | const Interface * | other | ) | [virtual] |
Copy values from other interface.
other | other interface to copy values from |
Implements fawkes::Interface.
Definition at line 216 of file Laser720Interface.cpp.
References fawkes::Interface::type().
Message * fawkes::Laser720Interface::create_message | ( | const char * | type | ) | const [virtual] |
Create message based on type name.
This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.
type | message type |
UnknownTypeException | thrown if this interface cannot create a message of the given type. |
Implements fawkes::Interface.
Definition at line 205 of file Laser720Interface.cpp.
float * fawkes::Laser720Interface::distances | ( | ) | const |
Get distances value.
The distances in meter of the beams.
Definition at line 107 of file Laser720Interface.cpp.
References fawkes::Laser360Interface::Laser360Interface_data_t::distances.
Referenced by RosLaserScanThread::bb_interface_data_changed(), LaserDrawingArea::draw_beams(), and LaserDrawingArea::draw_segments().
float fawkes::Laser720Interface::distances | ( | unsigned int | index | ) | const |
Get distances value at given index.
The distances in meter of the beams.
index | index of value |
Exception | thrown if index is out of bounds |
Definition at line 121 of file Laser720Interface.cpp.
References fawkes::Laser360Interface::Laser360Interface_data_t::distances.
const char * fawkes::Laser720Interface::enum_tostring | ( | const char * | enumtype, |
int | val | ||
) | const [virtual] |
Convert arbitrary enum value to string.
Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.
enumtype | enum type as string |
val | value to convert |
UnknownTypeException | thrown if enumtype is not specified for interface. |
Implements fawkes::Interface.
Definition at line 227 of file Laser720Interface.cpp.
char * fawkes::Laser720Interface::frame | ( | ) | const |
Get frame value.
Coordinate frame in which the data is presented.
Definition at line 72 of file Laser720Interface.cpp.
References fawkes::Laser360Interface::Laser360Interface_data_t::frame.
Referenced by LaserPointCloudThread::bb_interface_created(), RosLaserScanThread::bb_interface_data_changed(), and RosLaserScanThread::bb_interface_created().
bool fawkes::Laser720Interface::is_clockwise_angle | ( | ) | const |
Get clockwise_angle value.
True if the angle grows clockwise.
Definition at line 175 of file Laser720Interface.cpp.
References fawkes::Laser360Interface::Laser360Interface_data_t::clockwise_angle.
Referenced by LaserDrawingArea::draw_beams().
size_t fawkes::Laser720Interface::maxlenof_clockwise_angle | ( | ) | const |
Get maximum length of clockwise_angle value.
Definition at line 185 of file Laser720Interface.cpp.
size_t fawkes::Laser720Interface::maxlenof_distances | ( | ) | const |
Get maximum length of distances value.
Definition at line 134 of file Laser720Interface.cpp.
Referenced by LaserDrawingArea::draw_beams(), and LaserDrawingArea::draw_segments().
size_t fawkes::Laser720Interface::maxlenof_frame | ( | ) | const |
Get maximum length of frame value.
Definition at line 82 of file Laser720Interface.cpp.
bool fawkes::Laser720Interface::message_valid | ( | const Message * | message | ) | const [virtual] |
Check if message is valid and can be enqueued.
message | Message to check |
Implements fawkes::Interface.
Definition at line 238 of file Laser720Interface.cpp.
void fawkes::Laser720Interface::set_clockwise_angle | ( | const bool | new_clockwise_angle | ) |
Set clockwise_angle value.
True if the angle grows clockwise.
new_clockwise_angle | new clockwise_angle value |
Definition at line 197 of file Laser720Interface.cpp.
References fawkes::Laser360Interface::Laser360Interface_data_t::clockwise_angle, and fawkes::Interface::data_changed.
void fawkes::Laser720Interface::set_distances | ( | unsigned int | index, |
const float | new_distances | ||
) |
Set distances value at given index.
The distances in meter of the beams.
new_distances | new distances value |
index | index for of the value |
Definition at line 160 of file Laser720Interface.cpp.
References fawkes::Laser360Interface::Laser360Interface_data_t::distances, and fawkes::Interface::data_changed.
Referenced by LaserSensorThread::loop().
void fawkes::Laser720Interface::set_distances | ( | const float * | new_distances | ) |
Set distances value.
The distances in meter of the beams.
new_distances | new distances value |
Definition at line 146 of file Laser720Interface.cpp.
References fawkes::Laser360Interface::Laser360Interface_data_t::distances, and fawkes::Interface::data_changed.
void fawkes::Laser720Interface::set_frame | ( | const char * | new_frame | ) |
Set frame value.
Coordinate frame in which the data is presented.
new_frame | new frame value |
Definition at line 94 of file Laser720Interface.cpp.
References fawkes::Laser360Interface::Laser360Interface_data_t::frame, and fawkes::Interface::data_changed.
Referenced by LaserSensorThread::init().