Wiselib
Public Types | Public Member Functions | Public Attributes
concepts::Odometer_concept Class Reference

A class tracking motions over time. More...

Inherits concepts::StateCallback_concept, and concepts::State_concept.

List of all members.

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

Detailed Description

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.


Member Enumeration Documentation

anonymous enum [inherited]
Enumerator:
SUCCESS 

Default return value of success.

ERR_UNSPEC 

Unspecified error value - if no other fits.

ERR_NOMEM 

Out of memory.

ERR_BUSY 

Device or resource busy - try again later.

ERR_NOTIMPL 

Function not implemented.

ERR_NETDOWN 

Network is down.

ERR_HOSTUNREACH 

No route to host.

Enumerator:
READY 

Ready for returning a value.

NO_VALUE 

There is no value available.

INACTIVE 

Not yet enabled - implementation is inactive and cannot return meaningful values.

DATA_AVAILABLE 

There is new data availbale.

Reimplemented in concepts::NodeDistanceEstimation_concept, and concepts::Position_concept.

Enumerator:
READY 

Ready for returning a value.

NO_VALUE 

There is no value available.

INACTIVE 

Not yet enabled - implementation is inactive and cannot return meaningful values.

DATA_AVAILABLE 

There is new data availbale.

Reimplemented in concepts::NodeDistanceEstimation_concept, and concepts::Position_concept.

Enumerator:
READY 

Ready for asking for data.

NO_VALUE 

Currently no data available.

INACTIVE 

Currently inactive - so no values available.


Member Function Documentation

angle_t concepts::Odometer_concept::angle ( )

Return current angle.

distance_t concepts::Odometer_concept::distance ( )

Return current distance.

template<typename T , void(T::*)(int) TMethod>
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.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines