#include <CStateMonitor.h>CStateMonitor : public CStateManagerBase
CStateMonitor((std::string transitionRequestUri, std::string statePublisherUri, CStaeMonitorBase::InitCallback cb = 0) throws ;
virtual void Register(std::string state, Callback cb, void* cbarg) throws ;
virtual void unregister(std::string state) throws ;
Derived from CStateMonitorBase
the
CStateMonitor
provides a fully functional
state monitor class that allows its clients to regiser callbacks
to be exeuted when states are entered.
CStateMonitor((std::string transitionRequestUri, std::string statePublisherUri, CStaeMonitorBase::InitCallback cb = 0)
throws ;
Constructs the CStateMonitor
See classname
for information about the constructor's parameters as they are the same as for
that classs.
virtual void Register(std::string state, Callback cb, void* cbarg)
throws ;
Registers interest in a state
the cb
callback is invoked if the
state
is either entered by transition
from a known state or if the state is the one the system
is discovered to be in at startup time.
See TYPES for information about the
Callack type. When the cb
is called, one of the paramters it is passed is the
cbarg
passed in at registration time.
virtual void unregister(std::string state)
throws ;
This unregisters any callback established for
state
This type is a function pointer to functinos that are suitable as callback functions. The type has the following definition:
pMonitor
points to the CStateMonitor
that called the callback. prior
is
the prior state and is an empty string if it is not known.
current
is the state the system is
now transitioned to.