#include <StateMachineMonitorCollection.h>
Public Types | |
typedef std::vector < TransitionRecord > | History |
Public Types inherited from stor::MonitorCollection | |
typedef std::vector< std::pair < std::string, xdata::Serializable * > > | InfoSpaceItems |
Public Member Functions | |
void | clearStatusMessage () |
void | dumpHistory (std::ostream &) const |
const std::string & | externallyVisibleState () const |
void | getHistory (History &) const |
std::string | innerStateName () const |
void | setExternallyVisibleState (const std::string &) |
void | setStatusMessage (const std::string &) |
StateMachineMonitorCollection (const utils::Duration_t &updateInterval) | |
bool | statusMessage (std::string &msg) const |
void | updateHistory (const TransitionRecord &) |
Public Member Functions inherited from stor::MonitorCollection | |
void | appendInfoSpaceItems (InfoSpaceItems &) |
void | calculateStatistics (const utils::TimePoint_t &now) |
MonitorCollection (const utils::Duration_t &updateInterval) | |
void | reset (const utils::TimePoint_t &now) |
void | updateInfoSpaceItems () |
virtual | ~MonitorCollection () |
Private Member Functions | |
virtual void | do_appendInfoSpaceItems (InfoSpaceItems &) |
virtual void | do_calculateStatistics () |
virtual void | do_reset () |
virtual void | do_updateInfoSpaceItems () |
StateMachineMonitorCollection & | operator= (StateMachineMonitorCollection const &) |
StateMachineMonitorCollection (StateMachineMonitorCollection const &) | |
Private Attributes | |
std::string | externallyVisibleState_ |
History | history_ |
boost::mutex | stateMutex_ |
xdata::String | stateName_ |
std::string | statusMessage_ |
Additional Inherited Members |
A collection of monitored quantities related to the state machine
Definition at line 26 of file StateMachineMonitorCollection.h.
typedef std::vector<TransitionRecord> stor::StateMachineMonitorCollection::History |
Copy the state machine history in the given History vector
Definition at line 41 of file StateMachineMonitorCollection.h.
|
explicit |
Definition at line 10 of file StateMachineMonitorCollection.cc.
|
private |
void stor::StateMachineMonitorCollection::clearStatusMessage | ( | ) |
Clear status message
Definition at line 70 of file StateMachineMonitorCollection.cc.
References stateMutex_, and statusMessage_.
|
privatevirtual |
Reimplemented from stor::MonitorCollection.
Definition at line 108 of file StateMachineMonitorCollection.cc.
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 93 of file StateMachineMonitorCollection.cc.
|
privatevirtual |
Implements stor::MonitorCollection.
Definition at line 99 of file StateMachineMonitorCollection.cc.
References history_, and stateMutex_.
|
privatevirtual |
Reimplemented from stor::MonitorCollection.
Definition at line 116 of file StateMachineMonitorCollection.cc.
References externallyVisibleState_, stateMutex_, and stateName_.
void stor::StateMachineMonitorCollection::dumpHistory | ( | std::ostream & | os | ) | const |
Dump the state machine history into the stream
Definition at line 31 of file StateMachineMonitorCollection.cc.
References history_, j, and stateMutex_.
const std::string & stor::StateMachineMonitorCollection::externallyVisibleState | ( | ) | const |
Retrieve the externally visible state name
Definition at line 55 of file StateMachineMonitorCollection.cc.
References externallyVisibleState_, and stateMutex_.
Referenced by stor::SMWebPageHelper::consumerStatistics(), and stor::SMWebPageHelper::createWebPageBody().
void stor::StateMachineMonitorCollection::getHistory | ( | History & | history | ) | const |
Definition at line 24 of file StateMachineMonitorCollection.cc.
References history_, and stateMutex_.
std::string stor::StateMachineMonitorCollection::innerStateName | ( | ) | const |
Retrieve the current internal state name
Definition at line 85 of file StateMachineMonitorCollection.cc.
References history_, stateMutex_, and stor::TransitionRecord::stateName().
Referenced by stor::SMWebPageHelper::consumerStatistics(), and stor::SMWebPageHelper::createWebPageBody().
|
private |
void stor::StateMachineMonitorCollection::setExternallyVisibleState | ( | const std::string & | n | ) |
Set the externally visible state name
Definition at line 48 of file StateMachineMonitorCollection.cc.
References externallyVisibleState_, n, and stateMutex_.
void stor::StateMachineMonitorCollection::setStatusMessage | ( | const std::string & | m | ) |
Set status message
Definition at line 62 of file StateMachineMonitorCollection.cc.
References stateMutex_, and statusMessage_.
bool stor::StateMachineMonitorCollection::statusMessage | ( | std::string & | msg | ) | const |
Get status message
Definition at line 77 of file StateMachineMonitorCollection.cc.
References stateMutex_, and statusMessage_.
Referenced by stor::SMWebPageHelper::consumerStatistics(), and stor::SMWebPageHelper::createWebPageBody().
void stor::StateMachineMonitorCollection::updateHistory | ( | const TransitionRecord & | tr | ) |
Add the TransitionRecord to the state machine history
Definition at line 17 of file StateMachineMonitorCollection.cc.
References history_, and stateMutex_.
|
private |
Definition at line 91 of file StateMachineMonitorCollection.h.
Referenced by do_updateInfoSpaceItems(), externallyVisibleState(), and setExternallyVisibleState().
|
private |
Definition at line 90 of file StateMachineMonitorCollection.h.
Referenced by do_reset(), dumpHistory(), getHistory(), innerStateName(), and updateHistory().
|
mutableprivate |
Definition at line 92 of file StateMachineMonitorCollection.h.
Referenced by clearStatusMessage(), do_reset(), do_updateInfoSpaceItems(), dumpHistory(), externallyVisibleState(), getHistory(), innerStateName(), setExternallyVisibleState(), setStatusMessage(), statusMessage(), and updateHistory().
|
private |
Definition at line 96 of file StateMachineMonitorCollection.h.
Referenced by do_updateInfoSpaceItems().
|
private |
Definition at line 94 of file StateMachineMonitorCollection.h.
Referenced by clearStatusMessage(), setStatusMessage(), and statusMessage().