Wiselib
|
A class tracking motions over time. More...
Inherits concepts::StateCallback_concept, and concepts::State_concept.
Public Types | |
enum | State { READY, NO_VALUE, INACTIVE, DATA_AVAILABLE } |
enum | { SUCCESS, ERR_UNSPEC, ERR_NOMEM, ERR_BUSY, ERR_NOTIMPL, ERR_NETDOWN, ERR_HOSTUNREACH } |
enum | StateValues { READY, NO_VALUE, INACTIVE } |
enum | State { READY, NO_VALUE, INACTIVE, DATA_AVAILABLE } |
Public Member Functions | |
int | reset_angle () |
Reset angle counter to zero. | |
angle_t | angle () |
Return current angle. | |
int | reset_distance () |
Reset distance counter to zero. | |
distance_t | distance () |
Return current distance. | |
template<typename T , void(T::*)(int) TMethod> | |
int | register_state_callback (T *obj) |
Register state changed callback function - method signature must be void RCV_METHOD_NAME(int state). | |
int | unregister_state_callback (int) |
Unregister state-changed callback. | |
int | state () |
Return the current state. | |
Public Attributes | |
typedef | OsModel |
typedef | angle_t |
typedef | distance_t |
A class tracking motions over time.
Whenever the object turns, or moves, internal counters will adjust their guessing of the objects traveled distance and current orientation.
anonymous enum [inherited] |
enum concepts::State_concept::State [inherited] |
Reimplemented in concepts::NodeDistanceEstimation_concept, and concepts::Position_concept.
enum concepts::StateCallback_concept::State [inherited] |
Reimplemented in concepts::NodeDistanceEstimation_concept, and concepts::Position_concept.
enum concepts::BasicReturnValues_concept::StateValues [inherited] |
angle_t concepts::Odometer_concept::angle | ( | ) |
Return current angle.
distance_t concepts::Odometer_concept::distance | ( | ) |
Return current distance.
int concepts::StateCallback_concept::register_state_callback | ( | T * | obj | ) | [inherited] |
Register state changed callback function - method signature must be void RCV_METHOD_NAME(int state).
Returns callback-identifier or -1 in order to signal an error.
Reimplemented in concepts::NodeDistanceEstimation_concept, and concepts::Position_concept.
int concepts::Odometer_concept::reset_angle | ( | ) |
Reset angle counter to zero.
int concepts::Odometer_concept::reset_distance | ( | ) |
Reset distance counter to zero.
int concepts::State_concept::state | ( | ) | [inherited] |
Return the current state.
Reimplemented in concepts::NodeDistanceEstimation_concept, and concepts::Position_concept.
int concepts::StateCallback_concept::unregister_state_callback | ( | int | ) | [inherited] |
Unregister state-changed callback.