diff --git a/src/ca/tcpKillTimer.cpp b/src/ca/tcpKillTimer.cpp new file mode 100644 index 000000000..0405ff46d --- /dev/null +++ b/src/ca/tcpKillTimer.cpp @@ -0,0 +1,56 @@ +/* + * $Id$ + * + * + * L O S A L A M O S + * Los Alamos National Laboratory + * Los Alamos, New Mexico 87545 + * + * Copyright, 1986, The Regents of the University of California. + * + * + * Author Jeffrey O. Hill + * johill@lanl.gov + * 505 665 1831 + */ + +#include "cac.h" +#include "tcpKillTimer.h" + +tcpKillTimer::tcpKillTimer ( cac & cacIn, tcpiiu & iiuIn, epicsTimerQueue & queueIn ) : + once ( epicsOnce::create ( * this ) ), timer ( queueIn.createTimer () ), + clientCtx ( cacIn ), iiu ( iiuIn ) +{ +} + +tcpKillTimer::~tcpKillTimer () +{ + this->once.destroy (); + this->timer.destroy (); +} + +void tcpKillTimer::start () +{ + this->once.once (); +} + +void tcpKillTimer::initialize () +{ + this->timer.start ( *this, 0.0 ); +} + +epicsTimerNotify::expireStatus tcpKillTimer::expire ( const epicsTime & currentTime ) +{ + this->clientCtx.uninstallIIU ( this->iiu ); + return noRestart; +} + +void tcpKillTimer::show ( unsigned level ) const +{ + ::printf ( "TCP kill timer %p\n", + static_cast ( this ) ); + if ( level > 0u ) { + this->timer.show ( level - 1u ); + } +} + diff --git a/src/ca/tcpKillTimer.h b/src/ca/tcpKillTimer.h new file mode 100644 index 000000000..a59e74541 --- /dev/null +++ b/src/ca/tcpKillTimer.h @@ -0,0 +1,47 @@ + +/* + * $Id$ + * + * + * L O S A L A M O S + * Los Alamos National Laboratory + * Los Alamos, New Mexico 87545 + * + * Copyright, 1986, The Regents of the University of California. + * + * + * Author Jeffrey O. Hill + * johill@lanl.gov + * 505 665 1831 + */ + +#ifndef tcpKillTimerh +#define tcpKillTimerh + +#include "epicsTimer.h" +#include "epicsOnce.h" + +class epicsTime; +class tcpiiu; +class cac; + +class tcpKillTimer : private epicsTimerNotify, private epicsOnceNotify { +public: + tcpKillTimer ( cac &, tcpiiu &, epicsTimerQueue & ); + virtual ~tcpKillTimer (); + void start (); + void show ( unsigned level ) const; +private: + epicsOnce & once; + epicsTimer & timer; + cac & clientCtx; + tcpiiu & iiu; + static epicsSingleton < tsFreeList < class tcpKillTimer, 16 > > pFreeList; + expireStatus expire ( const epicsTime & currentTime ); + void initialize (); + tcpKillTimer ( const tcpKillTimer & ); + tcpKillTimer & operator = ( const tcpKillTimer & ); +}; + +#endif // #ifndef tcpKillTimerh + diff --git a/src/ca/tcpRecvThread.cpp b/src/ca/tcpRecvThread.cpp new file mode 100644 index 000000000..139597f9c --- /dev/null +++ b/src/ca/tcpRecvThread.cpp @@ -0,0 +1,2 @@ + +