Public Types | Public Member Functions | Private Attributes

HostState Class Reference
[Power consumption - Classes using/defining power consumptionBaseUtility - blackboard related stuff]

HostState is published by the battery to announce host failure. More...

#include <HostState.h>

Inherits BBItem.

Collaboration diagram for HostState:
Collaboration graph
[legend]

List of all members.

Public Types

enum  States {
  ACTIVE, FAILED, BROKEN, SLEEP,
  OFF
}
 

Possible host states.

More...

Public Member Functions

virtual BBItemparentObject () const
 Returns an instance of BBItem.
 HostState (States state=ACTIVE)
 Constructor taking a state.
States get () const
 Returns the host state.
void set (States s)
 Sets the host state.
std::string info () const
 Returns information about the current state.

Private Attributes

States state
 Host state.

Detailed Description

HostState is published by the battery to announce host failure.

HostState information is published by the Battery to announce Host failure due to battery depletion. (Default state is ON, OFF is not used; existing modules basically ignore everything but FAIL.)

All modules that generate messages and collect statistics should subscribe to this notification. Should eventually be generalized to handle more general HostState (e.g. stochastic failure, restart).

Definition at line 34 of file HostState.h.


Member Enumeration Documentation

Possible host states.

Enumerator:
FAILED 

Host is active and fully working

BROKEN 

Host is not active because of some failure but might able to be restarted

SLEEP 

Host is not active because of some failure and won't be able to be restarted

OFF 

Host is not active (sleeping) Host is not active (shut down)

Definition at line 25 of file HostState.h.

                : public BBItem


Member Function Documentation

virtual BBItem* HostState::parentObject (  )  const [inline, virtual]

Returns an instance of BBItem.

This method is used to get a kind of class hierarchy at runtime.

Reimplemented from BBItem.

Definition at line 19 of file HostState.h.

: public BBItem


The documentation for this class was generated from the following file: