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

A basic callback sensor. More...

Inherits concepts::BasicSensor_concept, and concepts::BasicReturnValues_concept.

List of all members.

Public Types

enum  BasicReturnValues { OK = ..., FAILED = ... }
 Basic return values. More...
enum  StateData { READY = ..., NO_VALUE = ..., INACTIVE = ... }
 State data. More...
enum  {
  SUCCESS, ERR_UNSPEC, ERR_NOMEM, ERR_BUSY,
  ERR_NOTIMPL, ERR_NETDOWN, ERR_HOSTUNREACH
}
enum  StateValues { READY, NO_VALUE, INACTIVE }

Public Member Functions

int state ()
 Returns the current state.

Public Attributes

typedef OsModel
 Type of Os Concept which has been set for the sensor facet.
typedef value_t
 Type of value that is returned.

Detailed Description

A basic callback sensor.

A callback sensor refines the Basic Sensor and provides callback functionality, so that a user can register a callback function to be notified when a sensor value changes.

When registering a callback method, this method is either called immediately after registration (id sensor is READY),or called immediately after sensor gets READY (if previously INACTIVE or NO_VALUE).

After that, the callback is called each time the sensor value changes. It is in the responsibility of the concrete model how such a change is realized.


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.

Basic return values.

Enumerator:
OK 
FAILED 

State data.

Enumerator:
READY 
NO_VALUE 
INACTIVE 
Enumerator:
READY 

Ready for asking for data.

NO_VALUE 

Currently no data available.

INACTIVE 

Currently inactive - so no values available.


Member Function Documentation

int concepts::BasicSensor_concept::state ( ) [inherited]

Returns the current state.


Member Data Documentation

Type of Os Concept which has been set for the sensor facet.

Type of value that is returned.


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