14 using namespace evf::rb_statemachine;
23 LOG4CPLUS_INFO(res->log_,
"--> ResourceBroker: NEW STATE: " <<
stateName());
24 outermost_context().setExternallyVisibleState(
stateName());
25 outermost_context().setInternalStateName(
stateName());
34 LOG4CPLUS_INFO(res->log_,
"Start halting ...");
35 if (res->resourceStructure_->isActive()) {
36 res->resourceStructure_->shutDownClients();
39 if (res->resourceStructure_->isReadyToShutDown()) {
42 delete res->resourceStructure_;
43 res->resourceStructure_ = 0;
49 <<
". try to destroy resource table succeeded!");
57 <<
". try to destroy resource table failed ...");
65 delete res->resourceStructure_;
66 res->resourceStructure_ = 0;
71 if (0 == res->resourceStructure_) {
72 LOG4CPLUS_INFO(res->log_,
"Finished halting!");
74 res->commands_.enqEvent(haltDone);
77 =
"halting FAILED: ResourceTable shutdown timed out.";
78 LOG4CPLUS_FATAL(res->log_,
79 "Moving to FAILED state! Reason: " << res->reasonForFailed_.value_);
81 res->commands_.enqEvent(failTimeOut);
96 bool returnValue =
false;
98 returnValue = res->resourceStructure_->discardDataEventWhileHalting(
107 bool returnValue =
false;
109 returnValue = res->resourceStructure_->discardDqmEvent(bufRef);
139 res->reasonForFailed_ = exception.what();
140 LOG4CPLUS_FATAL(res->log_,
141 "Moving to FAILED state! Reason: " << exception.what());
143 res->commands_.enqEvent(fail);
virtual void do_entryActionWork()
virtual void do_stateNotify()
virtual void do_moveToFailedState(xcept::Exception &exception) const
virtual bool discardDqmEvent(MemRef_t *bufRef) const
boost::shared_ptr< SharedResources > SharedResourcesPtr_t
virtual void do_stateAction() const
toolbox::mem::Reference MemRef_t
virtual std::string do_stateName() const
boost::shared_ptr< boost::statechart::event_base > EventPtr
void moveToFailedState(xcept::Exception &exception) const
virtual void do_exitActionWork()
virtual bool discardDataEvent(MemRef_t *bufRef) const
std::string stateName() const