19 #ifndef fdManagerH_included 20 #define fdManagerH_included 22 #include "libComAPI.h" 41 fd(fdIn),
type(typeIn) {}
55 return this->fd == idIn.fd && this->
type==idIn.type;
60 virtual void show (
unsigned level)
const;
81 LIBCOM_API
virtual ~fdManager ();
82 LIBCOM_API
void process (
double delay );
87 epicsTimer & createTimer ();
93 const double sleepQuantum;
95 epicsTimerQueuePassive * pTimerQueue;
105 void installReg (
fdReg ®);
106 void removeReg (
fdReg ®);
107 void lazyInitTimerQueue ();
109 fdManager & operator = (
const fdManager & );
133 virtual void show (
unsigned level)
const;
144 virtual void destroy ();
147 enum state {active, pending, limbo};
156 virtual void callBack ()=0;
159 unsigned char onceOnly;
171 const unsigned fdManagerHashTableMinIndexBits = 8;
172 const unsigned fdManagerHashTableMaxIndexBits =
sizeof(
SOCKET)*CHAR_BIT;
175 hashid =
integerHash ( fdManagerHashTableMinIndexBits,
176 fdManagerHashTableMaxIndexBits, this->fd );
181 hashid ^= this->
type;
190 inline void fdManager::lazyInitTimerQueue ()
192 if ( ! this->pTimerQueue ) {
193 this->pTimerQueue = & epicsTimerQueuePassive::create ( *
this );
199 this->lazyInitTimerQueue ();
200 return this->pTimerQueue->createTimer ();
203 #endif // fdManagerH_included
fdRegType getType() const
pvd::StructureConstPtr type
resTableIndex hash() const
LIBCOM_API fdManager fileDescriptorManager
epicsTimer & createTimer()
fdRegId(const SOCKET fdIn, const fdRegType typeIn)
EPICS time-stamps (epicsTimeStamp), epicsTime C++ class and C functions for handling wall-clock times...
resTableIndex integerHash(unsigned MIN_INDEX_WIDTH, unsigned MAX_ID_WIDTH, const T &id)
bool operator==(const epics::pvData::shared_vector< A > &a, const epics::pvData::shared_vector< B > &b)