osiTimer => epicsTimer

This commit is contained in:
Jeff Hill
2001-03-08 21:32:56 +00:00
parent 272029ae1a
commit cbabe522e1
16 changed files with 396 additions and 642 deletions

View File

@@ -14,12 +14,19 @@
#include "iocinf.h"
repeaterSubscribeTimer::repeaterSubscribeTimer ( udpiiu &iiuIn, osiTimerQueue &queueIn ) :
osiTimer ( 10.0, queueIn ), iiu ( iiuIn ), attempts ( 0 ), registered ( false ), once (false)
repeaterSubscribeTimer::repeaterSubscribeTimer ( udpiiu &iiuIn, epicsTimerQueue &queueIn ) :
timer ( queueIn.createTimer ( *this ) ), iiu ( iiuIn ),
attempts ( 0 ), registered ( false ), once ( false )
{
this->timer.start ( 10.0 );
}
void repeaterSubscribeTimer::expire ()
repeaterSubscribeTimer::~repeaterSubscribeTimer ()
{
delete & this->timer;
}
epicsTimerNotify::expireStatus repeaterSubscribeTimer::expire ()
{
static const unsigned nTriesToMsg = 50;
if ( this->attempts > nTriesToMsg && ! this->once ) {
@@ -32,31 +39,19 @@ void repeaterSubscribeTimer::expire ()
this->iiu.repeaterRegistrationMessage ( this->attempts );
this->attempts++;
if ( this->registered ) {
return noRestart;
}
else {
return expireStatus ( restart, 1.0 );
}
}
void repeaterSubscribeTimer::destroy ()
void repeaterSubscribeTimer::show ( unsigned /* level */ ) const
{
}
bool repeaterSubscribeTimer::again () const
{
return ( ! this->registered );
}
double repeaterSubscribeTimer::delay () const
{
return 1.0;
}
void repeaterSubscribeTimer::show (unsigned /* level */ ) const
{
}
const char *repeaterSubscribeTimer::name () const
{
return "repeaterSubscribeTimer";
}
void repeaterSubscribeTimer::confirmNotify ()
{
this->registered = true;