From ee937667fd0ecd82faab4c88d756b906fb625f1a Mon Sep 17 00:00:00 2001 From: sc Date: Tue, 28 Nov 2000 17:07:47 +0000 Subject: 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 --- comm/TimeOut.cc | 51 ++++++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 27 deletions(-) (limited to 'comm/TimeOut.cc') 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 -- cgit v1.1