Fawkes API  Fawkes Development Version
fawkes::Laser720Interface Class Reference

Laser720Interface Fawkes BlackBoard Interface. More...

#include <>>

Inheritance diagram for fawkes::Laser720Interface:

List of all members.

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.
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 Messagecreate_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.

Detailed Description

Laser720Interface Fawkes BlackBoard Interface.

This interface provides access to data of a laser scanner that produces 720 beams per scan.


Member Function Documentation

void fawkes::Laser720Interface::copy_values ( const Interface other) [virtual]

Copy values from other interface.

Parameters:
otherother interface to copy values from

Implements fawkes::Interface.

Definition at line 179 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.

Parameters:
typemessage type
Returns:
message of the given type, empty
Exceptions:
UnknownTypeExceptionthrown if this interface cannot create a message of the given type.

Implements fawkes::Interface.

Definition at line 168 of file Laser720Interface.cpp.

float * fawkes::Laser720Interface::distances ( ) const

Get distances value.

The distances in meter of the beams.

Returns:
distances value

Definition at line 71 of file Laser720Interface.cpp.

References fawkes::Laser360Interface::Laser360Interface_data_t::distances.

Referenced by LaserSensorThread::loop(), 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.

Parameters:
indexindex of value
Returns:
distances value
Exceptions:
Exceptionthrown if index is out of bounds

Definition at line 85 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.

Parameters:
enumtypeenum type as string
valvalue to convert
Returns:
string representation of value
Exceptions:
UnknownTypeExceptionthrown if enumtype is not specified for interface.

Implements fawkes::Interface.

Definition at line 190 of file Laser720Interface.cpp.

bool fawkes::Laser720Interface::is_clockwise_angle ( ) const

Get clockwise_angle value.

True if the angle grows clockwise.

Returns:
clockwise_angle value

Definition at line 138 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.

Returns:
length of clockwise_angle value, can be length of the array or number of maximum number of characters for a string

Definition at line 148 of file Laser720Interface.cpp.

size_t fawkes::Laser720Interface::maxlenof_distances ( ) const

Get maximum length of distances value.

Returns:
length of distances value, can be length of the array or number of maximum number of characters for a string

Definition at line 98 of file Laser720Interface.cpp.

Referenced by LaserDrawingArea::draw_beams(), and LaserDrawingArea::draw_segments().

bool fawkes::Laser720Interface::message_valid ( const Message message) const [virtual]

Check if message is valid and can be enqueued.

Parameters:
messageMessage to check
Returns:
true if the message is valid, false otherwise.

Implements fawkes::Interface.

Definition at line 201 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.

Parameters:
new_clockwise_anglenew clockwise_angle value

Definition at line 160 of file Laser720Interface.cpp.

References fawkes::Laser360Interface::Laser360Interface_data_t::clockwise_angle, and fawkes::Interface::data_changed.

Referenced by LaserSensorThread::init().

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.

Parameters:
new_distancesnew distances value
indexindex for of the value

Definition at line 124 of file Laser720Interface.cpp.

References fawkes::Laser360Interface::Laser360Interface_data_t::distances.

Referenced by LaserSensorThread::loop().

void fawkes::Laser720Interface::set_distances ( const float *  new_distances)

Set distances value.

The distances in meter of the beams.

Parameters:
new_distancesnew distances value

Definition at line 110 of file Laser720Interface.cpp.

References fawkes::Laser360Interface::Laser360Interface_data_t::distances, and fawkes::Interface::data_changed.


The documentation for this class was generated from the following files: