PanTiltInterface Fawkes BlackBoard Interface. More...
#include <interfaces/PanTiltInterface.h>
Classes | |
class | CalibrateMessage |
CalibrateMessage Fawkes BlackBoard Interface Message. More... | |
class | FlushMessage |
FlushMessage Fawkes BlackBoard Interface Message. More... | |
class | GotoMessage |
GotoMessage Fawkes BlackBoard Interface Message. More... | |
struct | PanTiltInterface_data_t |
Internal data storage, do NOT modify! | |
class | ParkMessage |
ParkMessage Fawkes BlackBoard Interface Message. More... | |
class | SetEnabledMessage |
SetEnabledMessage Fawkes BlackBoard Interface Message. More... | |
class | SetMarginMessage |
SetMarginMessage Fawkes BlackBoard Interface Message. More... | |
class | SetVelocityMessage |
SetVelocityMessage Fawkes BlackBoard Interface Message. More... | |
class | StopMessage |
StopMessage Fawkes BlackBoard Interface Message. More... | |
class | TimedGotoMessage |
TimedGotoMessage Fawkes BlackBoard Interface Message. More... | |
Public Member Functions | |
virtual bool | message_valid (const Message *message) const |
Check if message is valid and can be enqueued. | |
uint32_t | flags () const |
Get flags value. | |
void | set_flags (const uint32_t new_flags) |
Set flags value. | |
size_t | maxlenof_flags () const |
Get maximum length of flags value. | |
float | pan () const |
Get pan value. | |
void | set_pan (const float new_pan) |
Set pan value. | |
size_t | maxlenof_pan () const |
Get maximum length of pan value. | |
float | tilt () const |
Get tilt value. | |
void | set_tilt (const float new_tilt) |
Set tilt value. | |
size_t | maxlenof_tilt () const |
Get maximum length of tilt value. | |
uint32_t | msgid () const |
Get msgid value. | |
void | set_msgid (const uint32_t new_msgid) |
Set msgid value. | |
size_t | maxlenof_msgid () const |
Get maximum length of msgid value. | |
bool | is_final () const |
Get final value. | |
void | set_final (const bool new_final) |
Set final value. | |
size_t | maxlenof_final () const |
Get maximum length of final value. | |
uint32_t | error_code () const |
Get error_code value. | |
void | set_error_code (const uint32_t new_error_code) |
Set error_code value. | |
size_t | maxlenof_error_code () const |
Get maximum length of error_code value. | |
bool | is_enabled () const |
Get enabled value. | |
void | set_enabled (const bool new_enabled) |
Set enabled value. | |
size_t | maxlenof_enabled () const |
Get maximum length of enabled value. | |
bool | is_calibrated () const |
Get calibrated value. | |
void | set_calibrated (const bool new_calibrated) |
Set calibrated value. | |
size_t | maxlenof_calibrated () const |
Get maximum length of calibrated value. | |
float | min_pan () const |
Get min_pan value. | |
void | set_min_pan (const float new_min_pan) |
Set min_pan value. | |
size_t | maxlenof_min_pan () const |
Get maximum length of min_pan value. | |
float | max_pan () const |
Get max_pan value. | |
void | set_max_pan (const float new_max_pan) |
Set max_pan value. | |
size_t | maxlenof_max_pan () const |
Get maximum length of max_pan value. | |
float | min_tilt () const |
Get min_tilt value. | |
void | set_min_tilt (const float new_min_tilt) |
Set min_tilt value. | |
size_t | maxlenof_min_tilt () const |
Get maximum length of min_tilt value. | |
float | max_tilt () const |
Get max_tilt value. | |
void | set_max_tilt (const float new_max_tilt) |
Set max_tilt value. | |
size_t | maxlenof_max_tilt () const |
Get maximum length of max_tilt value. | |
float | max_pan_velocity () const |
Get max_pan_velocity value. | |
void | set_max_pan_velocity (const float new_max_pan_velocity) |
Set max_pan_velocity value. | |
size_t | maxlenof_max_pan_velocity () const |
Get maximum length of max_pan_velocity value. | |
float | max_tilt_velocity () const |
Get max_tilt_velocity value. | |
void | set_max_tilt_velocity (const float new_max_tilt_velocity) |
Set max_tilt_velocity value. | |
size_t | maxlenof_max_tilt_velocity () const |
Get maximum length of max_tilt_velocity value. | |
float | pan_velocity () const |
Get pan_velocity value. | |
void | set_pan_velocity (const float new_pan_velocity) |
Set pan_velocity value. | |
size_t | maxlenof_pan_velocity () const |
Get maximum length of pan_velocity value. | |
float | tilt_velocity () const |
Get tilt_velocity value. | |
void | set_tilt_velocity (const float new_tilt_velocity) |
Set tilt_velocity value. | |
size_t | maxlenof_tilt_velocity () const |
Get maximum length of tilt_velocity value. | |
float | pan_margin () const |
Get pan_margin value. | |
void | set_pan_margin (const float new_pan_margin) |
Set pan_margin value. | |
size_t | maxlenof_pan_margin () const |
Get maximum length of pan_margin value. | |
float | tilt_margin () const |
Get tilt_margin value. | |
void | set_tilt_margin (const float new_tilt_margin) |
Set tilt_margin value. | |
size_t | maxlenof_tilt_margin () const |
Get maximum length of tilt_margin 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. | |
Static Public Attributes | |
static const uint32_t | FLAG_SUPPORTS_PAN = 1u |
FLAG_SUPPORTS_PAN constant. | |
static const uint32_t | FLAG_SUPPORTS_TILT = 2u |
FLAG_SUPPORTS_TILT constant. | |
static const uint32_t | ERROR_NONE = 0u |
ERROR_NONE constant. | |
static const uint32_t | ERROR_UNSPECIFIC = 1u |
ERROR_UNSPECIFIC constant. | |
static const uint32_t | ERROR_COMMUNICATION = 2u |
ERROR_COMMUNICATION constant. | |
static const uint32_t | ERROR_PAN_OUTOFRANGE = 4u |
ERROR_PAN_OUTOFRANGE constant. | |
static const uint32_t | ERROR_TILT_OUTOFRANGE = 8u |
ERROR_TILT_OUTOFRANGE constant. |
PanTiltInterface Fawkes BlackBoard Interface.
Interface to access pan/tilt units.
Definition at line 33 of file PanTiltInterface.h.
void fawkes::PanTiltInterface::copy_values | ( | const Interface * | other | ) | [virtual] |
Copy values from other interface.
other | other interface to copy values from |
Definition at line 705 of file PanTiltInterface.cpp.
References fawkes::Interface::type().
Message * fawkes::PanTiltInterface::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 674 of file PanTiltInterface.cpp.
const char * fawkes::PanTiltInterface::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 716 of file PanTiltInterface.cpp.
uint32_t fawkes::PanTiltInterface::error_code | ( | ) | const |
Get error_code value.
Failure code set if final is true. 0 if no error occured, an error code from ERROR_* constants otherwise (or a bit-wise combination).
Definition at line 268 of file PanTiltInterface.cpp.
uint32_t fawkes::PanTiltInterface::flags | ( | ) | const |
bool fawkes::PanTiltInterface::is_calibrated | ( | ) | const |
Get calibrated value.
Is the pan/tilt unit calibrated?
Definition at line 332 of file PanTiltInterface.cpp.
bool fawkes::PanTiltInterface::is_enabled | ( | ) | const |
Get enabled value.
Is the pan/tilt unit enabled?
Definition at line 301 of file PanTiltInterface.cpp.
bool fawkes::PanTiltInterface::is_final | ( | ) | const |
Get final value.
True, if the last goto command has been finished, false if it is still running
Definition at line 234 of file PanTiltInterface.cpp.
float fawkes::PanTiltInterface::max_pan | ( | ) | const |
Get max_pan value.
Maximum pan possible.
Definition at line 394 of file PanTiltInterface.cpp.
float fawkes::PanTiltInterface::max_pan_velocity | ( | ) | const |
Get max_pan_velocity value.
Maximum supported pan velocity.
Definition at line 487 of file PanTiltInterface.cpp.
Referenced by PanTiltSonyEviD100PThread::loop(), and PanTiltRX28Thread::loop().
float fawkes::PanTiltInterface::max_tilt | ( | ) | const |
Get max_tilt value.
Maximum tilt possible.
Definition at line 456 of file PanTiltInterface.cpp.
float fawkes::PanTiltInterface::max_tilt_velocity | ( | ) | const |
Get max_tilt_velocity value.
Maximum supported tilt velocity.
Definition at line 518 of file PanTiltInterface.cpp.
Referenced by PanTiltSonyEviD100PThread::loop(), and PanTiltRX28Thread::loop().
size_t fawkes::PanTiltInterface::maxlenof_calibrated | ( | ) | const |
Get maximum length of calibrated value.
Definition at line 342 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_enabled | ( | ) | const |
Get maximum length of enabled value.
Definition at line 311 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_error_code | ( | ) | const |
Get maximum length of error_code value.
Definition at line 278 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_final | ( | ) | const |
Get maximum length of final value.
Definition at line 244 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_flags | ( | ) | const |
Get maximum length of flags value.
Definition at line 117 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_max_pan | ( | ) | const |
Get maximum length of max_pan value.
Definition at line 404 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_max_pan_velocity | ( | ) | const |
Get maximum length of max_pan_velocity value.
Definition at line 497 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_max_tilt | ( | ) | const |
Get maximum length of max_tilt value.
Definition at line 466 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_max_tilt_velocity | ( | ) | const |
Get maximum length of max_tilt_velocity value.
Definition at line 528 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_min_pan | ( | ) | const |
Get maximum length of min_pan value.
Definition at line 373 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_min_tilt | ( | ) | const |
Get maximum length of min_tilt value.
Definition at line 435 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_msgid | ( | ) | const |
Get maximum length of msgid value.
Definition at line 211 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_pan | ( | ) | const |
Get maximum length of pan value.
Definition at line 148 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_pan_margin | ( | ) | const |
Get maximum length of pan_margin value.
Definition at line 622 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_pan_velocity | ( | ) | const |
Get maximum length of pan_velocity value.
Definition at line 559 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_tilt | ( | ) | const |
Get maximum length of tilt value.
Definition at line 179 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_tilt_margin | ( | ) | const |
Get maximum length of tilt_margin value.
Definition at line 655 of file PanTiltInterface.cpp.
size_t fawkes::PanTiltInterface::maxlenof_tilt_velocity | ( | ) | const |
Get maximum length of tilt_velocity value.
Definition at line 590 of file PanTiltInterface.cpp.
bool fawkes::PanTiltInterface::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 1537 of file PanTiltInterface.cpp.
float fawkes::PanTiltInterface::min_pan | ( | ) | const |
Get min_pan value.
Minimum pan possible.
Definition at line 363 of file PanTiltInterface.cpp.
float fawkes::PanTiltInterface::min_tilt | ( | ) | const |
Get min_tilt value.
Minimum tilt possible.
Definition at line 425 of file PanTiltInterface.cpp.
uint32_t fawkes::PanTiltInterface::msgid | ( | ) | const |
Get msgid value.
The ID of the message that is currently being processed, or 0 if no message is being processed.
Definition at line 201 of file PanTiltInterface.cpp.
float fawkes::PanTiltInterface::pan | ( | ) | const |
float fawkes::PanTiltInterface::pan_margin | ( | ) | const |
Get pan_margin value.
Margin in radians around a target pan value to consider the motion as final.
Definition at line 612 of file PanTiltInterface.cpp.
float fawkes::PanTiltInterface::pan_velocity | ( | ) | const |
Get pan_velocity value.
Maximum pan velocity currently reached.
Definition at line 549 of file PanTiltInterface.cpp.
void fawkes::PanTiltInterface::set_calibrated | ( | const bool | new_calibrated | ) |
Set calibrated value.
Is the pan/tilt unit calibrated?
new_calibrated | new calibrated value |
Definition at line 352 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), PanTiltRX28Thread::init(), and PanTiltDirectedPerceptionThread::init().
void fawkes::PanTiltInterface::set_enabled | ( | const bool | new_enabled | ) |
Set enabled value.
Is the pan/tilt unit enabled?
new_enabled | new enabled value |
Definition at line 321 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), PanTiltDirectedPerceptionThread::init(), and PanTiltRX28Thread::update_sensor_values().
void fawkes::PanTiltInterface::set_error_code | ( | const uint32_t | new_error_code | ) |
Set error_code value.
Failure code set if final is true. 0 if no error occured, an error code from ERROR_* constants otherwise (or a bit-wise combination).
new_error_code | new error_code value |
Definition at line 290 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
void fawkes::PanTiltInterface::set_final | ( | const bool | new_final | ) |
Set final value.
True, if the last goto command has been finished, false if it is still running
new_final | new final value |
Definition at line 255 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::loop(), PanTiltRX28Thread::loop(), PanTiltDirectedPerceptionThread::loop(), PanTiltSonyEviD100PThread::update_sensor_values(), PanTiltRX28Thread::update_sensor_values(), and PanTiltDirectedPerceptionThread::update_sensor_values().
void fawkes::PanTiltInterface::set_flags | ( | const uint32_t | new_flags | ) |
Set flags value.
Flags.
new_flags | new flags value |
Definition at line 127 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
void fawkes::PanTiltInterface::set_max_pan | ( | const float | new_max_pan | ) |
Set max_pan value.
Maximum pan possible.
new_max_pan | new max_pan value |
Definition at line 414 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), PanTiltRX28Thread::init(), and PanTiltDirectedPerceptionThread::init().
void fawkes::PanTiltInterface::set_max_pan_velocity | ( | const float | new_max_pan_velocity | ) |
Set max_pan_velocity value.
Maximum supported pan velocity.
new_max_pan_velocity | new max_pan_velocity value |
Definition at line 507 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), and PanTiltRX28Thread::init().
void fawkes::PanTiltInterface::set_max_tilt | ( | const float | new_max_tilt | ) |
Set max_tilt value.
Maximum tilt possible.
new_max_tilt | new max_tilt value |
Definition at line 476 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), PanTiltRX28Thread::init(), and PanTiltDirectedPerceptionThread::init().
void fawkes::PanTiltInterface::set_max_tilt_velocity | ( | const float | new_max_tilt_velocity | ) |
Set max_tilt_velocity value.
Maximum supported tilt velocity.
new_max_tilt_velocity | new max_tilt_velocity value |
Definition at line 538 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), and PanTiltRX28Thread::init().
void fawkes::PanTiltInterface::set_min_pan | ( | const float | new_min_pan | ) |
Set min_pan value.
Minimum pan possible.
new_min_pan | new min_pan value |
Definition at line 383 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), PanTiltRX28Thread::init(), and PanTiltDirectedPerceptionThread::init().
void fawkes::PanTiltInterface::set_min_tilt | ( | const float | new_min_tilt | ) |
Set min_tilt value.
Minimum tilt possible.
new_min_tilt | new min_tilt value |
Definition at line 445 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), PanTiltRX28Thread::init(), and PanTiltDirectedPerceptionThread::init().
void fawkes::PanTiltInterface::set_msgid | ( | const uint32_t | new_msgid | ) |
Set msgid value.
The ID of the message that is currently being processed, or 0 if no message is being processed.
new_msgid | new msgid value |
Definition at line 222 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::loop(), PanTiltRX28Thread::loop(), and PanTiltDirectedPerceptionThread::loop().
void fawkes::PanTiltInterface::set_pan | ( | const float | new_pan | ) |
Set pan value.
Current pan.
new_pan | new pan value |
Definition at line 158 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::update_sensor_values(), PanTiltRX28Thread::update_sensor_values(), and PanTiltDirectedPerceptionThread::update_sensor_values().
void fawkes::PanTiltInterface::set_pan_margin | ( | const float | new_pan_margin | ) |
Set pan_margin value.
Margin in radians around a target pan value to consider the motion as final.
new_pan_margin | new pan_margin value |
Definition at line 633 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltRX28Thread::init(), and PanTiltRX28Thread::loop().
void fawkes::PanTiltInterface::set_pan_velocity | ( | const float | new_pan_velocity | ) |
Set pan_velocity value.
Maximum pan velocity currently reached.
new_pan_velocity | new pan_velocity value |
Definition at line 569 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), PanTiltRX28Thread::init(), PanTiltSonyEviD100PThread::loop(), and PanTiltRX28Thread::update_sensor_values().
void fawkes::PanTiltInterface::set_tilt | ( | const float | new_tilt | ) |
Set tilt value.
Current tilt.
new_tilt | new tilt value |
Definition at line 189 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::update_sensor_values(), PanTiltRX28Thread::update_sensor_values(), and PanTiltDirectedPerceptionThread::update_sensor_values().
void fawkes::PanTiltInterface::set_tilt_margin | ( | const float | new_tilt_margin | ) |
Set tilt_margin value.
Margin in radians around a target tilt value to consider the motion as final.
new_tilt_margin | new tilt_margin value |
Definition at line 666 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltRX28Thread::init(), and PanTiltRX28Thread::loop().
void fawkes::PanTiltInterface::set_tilt_velocity | ( | const float | new_tilt_velocity | ) |
Set tilt_velocity value.
Maximum tilt velocity currently reached.
new_tilt_velocity | new tilt_velocity value |
Definition at line 600 of file PanTiltInterface.cpp.
References fawkes::Interface::data_changed.
Referenced by PanTiltSonyEviD100PThread::init(), PanTiltRX28Thread::init(), PanTiltSonyEviD100PThread::loop(), and PanTiltRX28Thread::update_sensor_values().
float fawkes::PanTiltInterface::tilt | ( | ) | const |
Get tilt value.
Current tilt.
Definition at line 169 of file PanTiltInterface.cpp.
float fawkes::PanTiltInterface::tilt_margin | ( | ) | const |
Get tilt_margin value.
Margin in radians around a target tilt value to consider the motion as final.
Definition at line 645 of file PanTiltInterface.cpp.
float fawkes::PanTiltInterface::tilt_velocity | ( | ) | const |
Get tilt_velocity value.
Maximum tilt velocity currently reached.
Definition at line 580 of file PanTiltInterface.cpp.
const uint32_t fawkes::PanTiltInterface::ERROR_COMMUNICATION = 2u [static] |
ERROR_COMMUNICATION constant.
Definition at line 44 of file PanTiltInterface.h.
const uint32_t fawkes::PanTiltInterface::ERROR_NONE = 0u [static] |
ERROR_NONE constant.
Definition at line 42 of file PanTiltInterface.h.
const uint32_t fawkes::PanTiltInterface::ERROR_PAN_OUTOFRANGE = 4u [static] |
ERROR_PAN_OUTOFRANGE constant.
Definition at line 45 of file PanTiltInterface.h.
const uint32_t fawkes::PanTiltInterface::ERROR_TILT_OUTOFRANGE = 8u [static] |
ERROR_TILT_OUTOFRANGE constant.
Definition at line 46 of file PanTiltInterface.h.
const uint32_t fawkes::PanTiltInterface::ERROR_UNSPECIFIC = 1u [static] |
ERROR_UNSPECIFIC constant.
Definition at line 43 of file PanTiltInterface.h.
const uint32_t fawkes::PanTiltInterface::FLAG_SUPPORTS_PAN = 1u [static] |
FLAG_SUPPORTS_PAN constant.
Definition at line 40 of file PanTiltInterface.h.
const uint32_t fawkes::PanTiltInterface::FLAG_SUPPORTS_TILT = 2u [static] |
FLAG_SUPPORTS_TILT constant.
Definition at line 41 of file PanTiltInterface.h.