21 #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" 29 static const double repeaterSubscribeTimerInitialPeriod = 10.0;
30 static const double repeaterSubscribeTimerPeriod = 1.0;
35 timer ( queueIn.createTimer () ), iiu ( iiuIn ),
36 cbMutex ( cbMutexIn ),ctxNotify ( ctxNotifyIn ),
37 stateMutex(__FILE__, __LINE__),
38 attempts ( 0 ), registered (
false ), once (
false )
50 *
this, repeaterSubscribeTimerInitialPeriod );
64 epicsTimerNotify::expireStatus repeaterSubscribeTimer::
65 expire (
const epicsTime & )
69 static const unsigned nTriesToMsg = 50;
70 if ( this->attempts > nTriesToMsg && ! this->once ) {
73 "CA client library is unable to contact CA repeater after %u tries.\n",
76 "Silence this message by starting a CA repeater daemon\n") ;
78 "or by calling ca_pend_event() and or ca_poll() more often.\n" );
85 if ( this->registered ) {
89 return expireStatus ( restart, repeaterSubscribeTimerPeriod );
97 ::printf (
"repeater subscribe timer: attempts=%u registered=%u once=%u\n",
98 this->attempts, this->registered, this->once );
104 this->registered =
true;
void shutdown(epicsGuard< epicsMutex > &cbGuard, epicsGuard< epicsMutex > &guard)
virtual ~repeaterTimerNotify()=0
virtual void repeaterRegistrationMessage(unsigned attemptNumber)=0
virtual ~repeaterSubscribeTimer()
epicsGuard< epicsMutex > cbGuard
repeaterSubscribeTimer(repeaterTimerNotify &, epicsTimerQueue &, epicsMutex &cbMutex, cacContextNotify &ctxNotify)
virtual int printFormated(epicsGuard< epicsMutex > &callbackControl, const char *pformat,...)=0
void show(unsigned level) const
void start(class epicsTimerNotify &, const epicsTime &)