// en que realmente llega la seal de ualarm.
//--------------------------------------------------------------------------------------------
void anna::timex::Engine::do_initialize()
// en que realmente llega la seal de ualarm.
//--------------------------------------------------------------------------------------------
void anna::timex::Engine::do_initialize()
if(a_resolution < minResolution)
throw RuntimeException(functions::asString("Resolution must be greater than %d milliseconds", minResolution.getValue()), ANNA_FILE_LOCATION);
if(a_resolution < minResolution)
throw RuntimeException(functions::asString("Resolution must be greater than %d milliseconds", minResolution.getValue()), ANNA_FILE_LOCATION);
if(a_maxTimeout <= a_resolution)
throw RuntimeException(functions::asString("Max-Timeout must be greater than %d milliseconds", a_resolution.getValue()), ANNA_FILE_LOCATION);
if(a_maxTimeout <= a_resolution)
throw RuntimeException(functions::asString("Max-Timeout must be greater than %d milliseconds", a_resolution.getValue()), ANNA_FILE_LOCATION);
* Instala la senhal de tick en el proceso, ya que la alarma no se hereda directamente.
*/
void anna::timex::Engine::do_cloneChild()
* Instala la senhal de tick en el proceso, ya que la alarma no se hereda directamente.
*/
void anna::timex::Engine::do_cloneChild()
// en el 'pipe'.
//----------------------------------------------------------------------------
void anna::timex::Engine::pause()
// en el 'pipe'.
//----------------------------------------------------------------------------
void anna::timex::Engine::pause()
Guard guard(this, "timex::Engine (pause)");
if(a_tickProducer->isInPause() == false) {
Guard guard(this, "timex::Engine (pause)");
if(a_tickProducer->isInPause() == false) {
Guard guard(this, "timex::Engine (play)");
if(a_tickProducer->isInPause() == true) {
Guard guard(this, "timex::Engine (play)");
if(a_tickProducer->isInPause() == true) {
LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "activate", ANNA_FILE_LOCATION));
if(a_maxQuantum == 0)
LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "activate", ANNA_FILE_LOCATION));
if(a_maxQuantum == 0)
LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "getTimeEvent", ANNA_FILE_LOCATION));
Directory::iterator iid;
TimeEvent* result(NULL);
LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "getTimeEvent", ANNA_FILE_LOCATION));
Directory::iterator iid;
TimeEvent* result(NULL);
LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "cancel", ANNA_FILE_LOCATION));
if(timeEvent == NULL)
LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "cancel", ANNA_FILE_LOCATION));
if(timeEvent == NULL)
LOGMETHOD(TraceMethod tm("timex::Engine", "do_stop", ANNA_FILE_LOCATION));
Quantum::iterator ii, maxii;
Guard guard(this, "timex::Engine (do_stop)");
LOGMETHOD(TraceMethod tm("timex::Engine", "do_stop", ANNA_FILE_LOCATION));
Quantum::iterator ii, maxii;
Guard guard(this, "timex::Engine (do_stop)");
Guard guard(this, "timex::Engine (kill)");
app::functions::component <Communicator> (ANNA_FILE_LOCATION)->detach(a_tickConsumer);
Guard guard(this, "timex::Engine (kill)");
app::functions::component <Communicator> (ANNA_FILE_LOCATION)->detach(a_tickConsumer);
// (3) Si el temporizador ha sido reactivado no tiene que liberarlo.
//----------------------------------------------------------------------------------
void anna::timex::Engine::tick()
// (3) Si el temporizador ha sido reactivado no tiene que liberarlo.
//----------------------------------------------------------------------------------
void anna::timex::Engine::tick()
LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "tick", ANNA_FILE_LOCATION));
/*
if (Logger::isActive (Logger::Local6) == true && a_directory.size () > 0) {
LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "tick", ANNA_FILE_LOCATION));
/*
if (Logger::isActive (Logger::Local6) == true && a_directory.size () > 0) {
if(timeEvent->a_observer != NULL)
timeEvent->a_observer->release(timeEvent);
}
string anna::timex::Engine::asString() const
if(timeEvent->a_observer != NULL)
timeEvent->a_observer->release(timeEvent);
}
string anna::timex::Engine::asString() const
string msg("timex::Engine { ");
msg += app::Component::asString();
msg += " | Max Timeout: ";
string msg("timex::Engine { ");
msg += app::Component::asString();
msg += " | Max Timeout: ";
parent = Component::asXML(parent);
xml::Node* result = parent->createChild("timex.Engine");
result->createAttribute("MaxTimeout", a_maxTimeout);
parent = Component::asXML(parent);
xml::Node* result = parent->createChild("timex.Engine");
result->createAttribute("MaxTimeout", a_maxTimeout);