HostState is published by the battery to announce host failure. More...
#include <HostState.h>
Inherits BBItem.
Public Types | |
enum | States { ACTIVE, FAILED, BROKEN, SLEEP, OFF } |
Possible host states. More... | |
Public Member Functions | |
virtual BBItem * | parentObject () 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. |
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.
enum HostState::States |
Possible host states.
Definition at line 25 of file HostState.h.
: public BBItem
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