|
Wiselib
|
Basic Concept for Position Algorithms. More...
Inherits concepts::BasicAlgorithm_concept, concepts::Request_concept, concepts::State_concept, and concepts::StateCallback_concept.
Public Types | |
| enum | State { READY, NO_VALUE, INACTIVE, OK, FAILED } |
| enum | { SUCCESS, ERR_UNSPEC, ERR_NOMEM, ERR_BUSY, ERR_NOTIMPL, ERR_NETDOWN, ERR_HOSTUNREACH } |
| enum | StateValues { READY, NO_VALUE, INACTIVE } |
Public Member Functions | |
| int | init () |
| Reset algorithm. | |
| int | destruct () |
| Turn off algorithm. | |
| value_t | operator() () |
| Return current position. | |
| int | state () |
| Only State. | |
| int | register_state_callback (T *obj_pnt) |
| Only State Callback. | |
| int | unregister_state_callback (int) |
| Unregister state-changed callback. | |
Public Attributes | |
| typedef | value_t |
| Define position type. | |
| typedef | OsModel |
| Type of Os Concept which has been set. | |
Basic Concept for Position Algorithms.
The position is a refinement of a Request, and returns either the current position (of type value_t) via operator()() (as defined in Request).
Since a position may also be unknown, it also implements State or State Callback to indicate whether a correct position is available (state must be X::READY). The concrete implementation (state or state callback) is implementation dependent, and must be given in documentation. Of course, a model may implement both state and state callback.
anonymous enum [inherited] |
Reimplemented from concepts::State_concept.
enum concepts::BasicReturnValues_concept::StateValues [inherited] |
| int concepts::Position_concept::destruct | ( | ) |
| int concepts::Position_concept::init | ( | ) |
Reset algorithm.
Known position (if so) is lost, state is set back to NO_VALUE.
Reimplemented from concepts::BasicAlgorithm_concept.
| value_t concepts::Position_concept::operator() | ( | ) |
Return current position.
Reimplemented from concepts::Request_concept.
| int concepts::Position_concept::register_state_callback | ( | T * | obj_pnt | ) |
Only State Callback.
Register state changed callback function - method signature must be void RCV_METHOD_NAME(int state). Returns either OK or FAILED.
Reimplemented from concepts::StateCallback_concept.
| int concepts::Position_concept::state | ( | ) |
Only State.
Return current state - can either be READY, NO_VALUE, or INACTIVE.
Reimplemented from concepts::State_concept.
| int concepts::StateCallback_concept::unregister_state_callback | ( | int | ) | [inherited] |
Unregister state-changed callback.
typedef concepts::Request_concept::OsModel [inherited] |
Type of Os Concept which has been set.
Define position type.
Reimplemented from concepts::Request_concept.
1.7.4