X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=source%2Ftimex%2FEngine.cpp;h=ae7f17e4017a17bb48f7796413a88bcdfe804bb1;hb=5256cb543a9d35b610df19bd227cde977186aef0;hp=bd8943eff1e85577341f20efbcc1f209a1e15670;hpb=3e258840b15577cb8bda3cdedd0b9b88e16404b3;p=anna.git diff --git a/source/timex/Engine.cpp b/source/timex/Engine.cpp index bd8943e..ae7f17e 100644 --- a/source/timex/Engine.cpp +++ b/source/timex/Engine.cpp @@ -2,7 +2,7 @@ // // (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo // -// https://bitbucket.org/testillano/anna +// http://redmine.teslayout.com/projects/anna-suite // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions @@ -14,7 +14,7 @@ // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. -// * Neither the name of Google Inc. nor the names of its +// * Neither the name of the copyright holder nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // @@ -62,10 +62,10 @@ using namespace anna::comm; Resolucion minima (en milisegundos) soportada por el controlador de tiempos. */ //static -const Millisecond timex::Engine::minResolution(100); +const Millisecond anna::timex::Engine::minResolution(100); -timex::Engine::Engine(const Millisecond & maxTimeout, const Millisecond & resolution) : +anna::timex::Engine::Engine(const Millisecond & maxTimeout, const Millisecond & resolution) : app::Component(getClassName()), a_currentQuantum(0), a_maxQuantum(0), @@ -79,7 +79,7 @@ timex::Engine::Engine(const Millisecond & maxTimeout, const Millisecond & resolu timex::sccs::activate(); } -timex::Engine::~Engine() { +anna::timex::Engine::~Engine() { delete a_tickConsumer; delete [] a_timeTable; } @@ -92,7 +92,7 @@ timex::Engine::~Engine() { // posteriores ualarm vamos a calcular la diferencia entre el tiempo esperado y el momento // en que realmente llega la seal de ualarm. //-------------------------------------------------------------------------------------------- -void timex::Engine::do_initialize() +void anna::timex::Engine::do_initialize() throw(RuntimeException) { LOGMETHOD(TraceMethod tm("timex::Engine", "do_initialize", ANNA_FILE_LOCATION)); @@ -139,7 +139,7 @@ throw(RuntimeException) { } // Reimplementado de app::Component -void timex::Engine::do_cloneParent() +void anna::timex::Engine::do_cloneParent() throw() { } @@ -147,7 +147,7 @@ throw() { * Se invoca desde app::Application::clone -> app::Component::do_cloneChild (ojo EN EL NUEVO PROCESO). * Instala la senhal de tick en el proceso, ya que la alarma no se hereda directamente. */ -void timex::Engine::do_cloneChild() +void anna::timex::Engine::do_cloneChild() throw(RuntimeException) { } @@ -155,7 +155,7 @@ throw(RuntimeException) { // No para los hilos de generacion, sino que evita que se escriban los bytes // en el 'pipe'. //---------------------------------------------------------------------------- -void timex::Engine::pause() +void anna::timex::Engine::pause() throw(RuntimeException) { Guard guard(this, "timex::Engine (pause)"); @@ -169,7 +169,7 @@ throw(RuntimeException) { } } -void timex::Engine::play() +void anna::timex::Engine::play() throw(RuntimeException) { Guard guard(this, "timex::Engine (play)"); @@ -183,7 +183,7 @@ throw(RuntimeException) { } } -void timex::Engine::activate(timex::TimeEvent* timeEvent) +void anna::timex::Engine::activate(timex::TimeEvent* timeEvent) throw(RuntimeException) { LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "activate", ANNA_FILE_LOCATION)); @@ -252,7 +252,7 @@ throw(RuntimeException) { ); } -timex::TimeEvent* timex::Engine::getTimeEvent(const timex::TimeEvent::Id eventTimeId) +anna::timex::TimeEvent* anna::timex::Engine::getTimeEvent(const timex::TimeEvent::Id eventTimeId) throw() { LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "getTimeEvent", ANNA_FILE_LOCATION)); Directory::iterator iid; @@ -276,7 +276,7 @@ throw() { return result; } -void timex::Engine::cancel(timex::TimeEvent* timeEvent) +void anna::timex::Engine::cancel(timex::TimeEvent* timeEvent) throw(RuntimeException) { LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "cancel", ANNA_FILE_LOCATION)); @@ -324,7 +324,7 @@ throw(RuntimeException) { notifyRelease(timeEvent); } -void timex::Engine::do_stop() +void anna::timex::Engine::do_stop() throw() { LOGMETHOD(TraceMethod tm("timex::Engine", "do_stop", ANNA_FILE_LOCATION)); Quantum::iterator ii, maxii; @@ -356,7 +356,7 @@ throw() { } } -void timex::Engine::kill() +void anna::timex::Engine::kill() throw() { Guard guard(this, "timex::Engine (kill)"); app::functions::component (ANNA_FILE_LOCATION)->detach(a_tickConsumer); @@ -385,7 +385,7 @@ throw() { // del proceso, con lo que evita totalmente la posiblidad de perdida. // (3) Si el temporizador ha sido reactivado no tiene que liberarlo. //---------------------------------------------------------------------------------- -void timex::Engine::tick() +void anna::timex::Engine::tick() throw(RuntimeException) { LOGMETHOD(TraceMethod tm(Logger::Local7, "timex::Engine", "tick", ANNA_FILE_LOCATION)); /* @@ -462,13 +462,13 @@ throw(RuntimeException) { eventEndQuantum(counter); } -void timex::Engine::notifyRelease(timex::TimeEvent* timeEvent) +void anna::timex::Engine::notifyRelease(timex::TimeEvent* timeEvent) throw() { if(timeEvent->a_observer != NULL) timeEvent->a_observer->release(timeEvent); } -string timex::Engine::asString() const +string anna::timex::Engine::asString() const throw() { string msg("timex::Engine { "); msg += app::Component::asString(); @@ -483,7 +483,7 @@ throw() { return msg += " }"; } -xml::Node* timex::Engine::asXML(xml::Node* parent) const +xml::Node* anna::timex::Engine::asXML(xml::Node* parent) const throw() { parent = Component::asXML(parent); xml::Node* result = parent->createChild("timex.Engine");