summaryrefslogtreecommitdiff
path: root/comm/TimeOut.cc
diff options
context:
space:
mode:
authorsc2000-11-28 17:07:47 +0000
committersc2000-11-28 17:07:47 +0000
commitee937667fd0ecd82faab4c88d756b906fb625f1a (patch)
tree19e679318b5cb87e8be1a05a7bbc9ba5568d0814 /comm/TimeOut.cc
parent1326b11d65f7020f5f6c691305d2c090b064bd04 (diff)
downloadivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.zip
ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.tar.gz
ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.tar.bz2
ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.tar.xz
Integration into IvyLeague
Uvh -> Ivl Multiplexer.* is renamed into Scheduler.* A few name conflicts in the merger with ex-DNN have been solved Imakefile is replaced by Makefile Created InetAddress.* and UnixAddress.* from Address.* Created IrdaAddress.* OLD/TextStream has been updated
Diffstat (limited to 'comm/TimeOut.cc')
-rw-r--r--comm/TimeOut.cc51
1 files changed, 24 insertions, 27 deletions
diff --git a/comm/TimeOut.cc b/comm/TimeOut.cc
index 9f70636..60346a5 100644
--- a/comm/TimeOut.cc
+++ b/comm/TimeOut.cc
@@ -7,20 +7,20 @@
* Laboratoire de Recherche en Informatique (LRI)
* Centre d'Etudes de la Navigation Aerienne
*
- * Multiplexer-based timers
+ * Scheduler-based timers
*
* $Id$
* $CurLog$
*/
#include "TimeOut.h"
-#include "ccu/Signal.h"
-#include "Multiplexer.h"
+#include "ivl/Signal.h"
+#include "Scheduler.h"
-/*?class UchBaseTimeOut
-The class \typ{UchBaseTimeOut} is provided as a base class for multiplexer-based timers.
-It is a derived class of \typ{CcuCoreTimer}.
-It comes with a derived class \typ{UchTimeOut} that can be used as is.
+/*?class IvlBaseTimeOut
+The class \typ{IvlBaseTimeOut} is provided as a base class for multiplexer-based timers.
+It is a derived class of \typ{IvlCoreTimer}.
+It comes with a derived class \typ{IvlTimeOut} that can be used as is.
A timer is created with a period expressed in milliseconds. It will then
periodically call the member function \fun{Handle}, which should be redefined
in derived classes.
@@ -33,18 +33,18 @@ If \var{pulses} is negative, the timer will send signals forever.
Timers are activated at creation time. They are disactivated, but not destroyed, after
their last pulse.
?*/
-UchBaseTimeOut :: UchBaseTimeOut (Millisecond period, int pulses, UchBaseMultiplexer* m)
-: CcuCoreTimer (period, pulses, m->GetTimerSet ()),
- MyMpx (m)
+IvlBaseTimeOut :: IvlBaseTimeOut (Millisecond period, int pulses, IvlBaseScheduler* m)
+: IvlCoreTimer (period, pulses, m->GetTimerSet ()),
+ MyScd (m)
{
- CcuSignalBlocker b (SigAlrm);
+ IvlSignalBlocker b (SigAlrm);
if (PulsesLeft != 0)
Activate ();
}
/*?nodoc?*/
-UchBaseTimeOut :: ~UchBaseTimeOut ()
+IvlBaseTimeOut :: ~IvlBaseTimeOut ()
{
/* stop it */
if (StatusFlag == Active)
@@ -53,25 +53,22 @@ UchBaseTimeOut :: ~UchBaseTimeOut ()
/*?hidden?*/
void
-UchBaseTimeOut :: StopAlarm ()
+IvlBaseTimeOut :: StopAlarm ()
{
- MyMpx->SuppressTimeOut ();
+ MyScd->SuppressTimeOut ();
}
/*?hidden?*/
void
-UchBaseTimeOut :: SetAlarm (Millisecond delay)
+IvlBaseTimeOut :: SetAlarm (Millisecond delay)
{
- MyMpx->SetTimeOut (delay);
+ MyScd->SetTimeOut (delay);
}
-
-
-
-/*?class UchTimeOut
-The class \typ{UchTimeOut} is a derived class of \typ{UchBaseTimeOut} that
+/*?class IvlTimeOut
+The class \typ{IvlTimeOut} is a derived class of \typ{IvlBaseTimeOut} that
can be used without deriving a new class.
-Each \typ{UchTimeOut} holds a pointer to a function which is called when the timer
+Each \typ{IvlTimeOut} holds a pointer to a function which is called when the timer
expires. This function, which is passed to the constructor, must
take a \typ{Millisecond} argument and return \typ{void}.
?*/
@@ -81,20 +78,20 @@ Create a timer associated to the multiplexer \var{m},
that will expire every \var{period} milliseconds and call
the function \var{handler}.
?*/
-UchTimeOut :: UchTimeOut (Millisecond period, void (*handler) (Millisecond), int pulses, UchBaseMultiplexer* m)
-: UchBaseTimeOut (period, pulses, m),
+IvlTimeOut :: IvlTimeOut (Millisecond period, void (*handler) (Millisecond), int pulses, IvlBaseScheduler* m)
+: IvlBaseTimeOut (period, pulses, m),
Handler (handler)
{
}
/*?nodoc?*/
-UchTimeOut :: ~UchTimeOut ()
+IvlTimeOut :: ~IvlTimeOut ()
{
}
/*?hidden?*/
void
-UchTimeOut :: Handle (Millisecond ref)
+IvlTimeOut :: Handle (Millisecond ref)
{
(*Handler) (ref);
}
@@ -104,7 +101,7 @@ Change the handling function of a timer.
?*/
#ifdef DOC
void
-UchTimeOut :: SetHandler ((void)(*h)(Millisecond))
+IvlTimeOut :: SetHandler ((void)(*h)(Millisecond))
{
}
#endif