diff --git a/src/cas/example/simple/exAsyncPV.cc b/src/cas/example/simple/exAsyncPV.cc index 547ce73e0..46aff2b47 100644 --- a/src/cas/example/simple/exAsyncPV.cc +++ b/src/cas/example/simple/exAsyncPV.cc @@ -56,9 +56,9 @@ caStatus exAsyncPV::write ( const casCtx &ctx, const gdd &valueIn ) exAsyncWriteIO::exAsyncWriteIO ( const casCtx &ctxIn, exAsyncPV &pvIn, const gdd &valueIn ) : casAsyncWriteIO ( ctxIn ), pv ( pvIn ), - timer ( pvIn.getCAS()->timerQueue().createTimer ( *this ) ), pValue(valueIn) + timer ( pvIn.getCAS()->timerQueue().createTimer () ), pValue(valueIn) { - this->timer.start ( 0.1 ); + this->timer.start ( *this, 0.1 ); } // @@ -74,7 +74,7 @@ exAsyncWriteIO::~exAsyncWriteIO() // exAsyncWriteIO::expire() // (a virtual function that runs when the base timer expires) // -epicsTimerNotify::expireStatus exAsyncWriteIO::expire () +epicsTimerNotify::expireStatus exAsyncWriteIO::expire ( const epicsTime & currentTime ) { caStatus status; status = this->pv.update ( this->pValue ); @@ -88,9 +88,9 @@ epicsTimerNotify::expireStatus exAsyncWriteIO::expire () exAsyncReadIO::exAsyncReadIO ( const casCtx &ctxIn, exAsyncPV &pvIn, gdd &protoIn ) : casAsyncReadIO ( ctxIn ), pv ( pvIn ), - timer ( pvIn.getCAS()->timerQueue().createTimer(*this) ), pProto ( protoIn ) + timer ( pvIn.getCAS()->timerQueue().createTimer() ), pProto ( protoIn ) { - this->timer.start ( 0.1 ); + this->timer.start ( *this, 0.1 ); } // @@ -107,7 +107,7 @@ exAsyncReadIO::~exAsyncReadIO() // exAsyncReadIO::expire() // (a virtual function that runs when the base timer expires) // -epicsTimerNotify::expireStatus exAsyncReadIO::expire () +epicsTimerNotify::expireStatus exAsyncReadIO::expire ( const epicsTime & currentTime ) { caStatus status; diff --git a/src/cas/example/simple/exPV.cc b/src/cas/example/simple/exPV.cc index d2023c7db..6cbc09803 100644 --- a/src/cas/example/simple/exPV.cc +++ b/src/cas/example/simple/exPV.cc @@ -22,7 +22,7 @@ class exFixedStringDestructor: public gddDestructor { // exPV::exPV() // exPV::exPV ( pvInfo &setup, bool preCreateFlag, bool scanOnIn ) : - timer ( this->getCAS()->timerQueue().createTimer(*this) ), + timer ( this->getCAS()->timerQueue().createTimer() ), info ( setup ), interest ( false ), preCreate ( preCreateFlag ), @@ -39,7 +39,7 @@ exPV::exPV ( pvInfo &setup, bool preCreateFlag, bool scanOnIn ) : // someone is watching the PV) // if ( this->scanOn && this->info.getScanPeriod () > 0.0 ) { - this->timer.start ( this->getScanPeriod() ); + this->timer.start ( *this, this->getScanPeriod() ); } } @@ -97,7 +97,7 @@ caStatus exPV::update(smartConstGDDPointer pValueIn) // // exScanTimer::expire () // -epicsTimerNotify::expireStatus exPV::expire () +epicsTimerNotify::expireStatus exPV::expire ( const epicsTime & currentTime ) { this->scan(); if ( this->scanOn ) { @@ -130,7 +130,7 @@ caStatus exPV::interestRegister() this->interest = true; if ( this->scanOn && this->getScanPeriod() < this->timer.getExpireDelay() ) { - this->timer.start ( this->getScanPeriod() ); + this->timer.start ( *this, this->getScanPeriod() ); } return S_casApp_success; diff --git a/src/cas/example/simple/exServer.cc b/src/cas/example/simple/exServer.cc index 69c946c7f..cf7d7c42a 100644 --- a/src/cas/example/simple/exServer.cc +++ b/src/cas/example/simple/exServer.cc @@ -318,9 +318,9 @@ void exServer::show (unsigned level) const exAsyncExistIO::exAsyncExistIO ( const pvInfo &pviIn, const casCtx &ctxIn, exServer &casIn ) : casAsyncPVExistIO ( ctxIn ), pvi ( pviIn ), - timer ( casIn.timerQueue().createTimer ( *this ) ), cas ( casIn ) + timer ( casIn.timerQueue().createTimer () ), cas ( casIn ) { - this->timer.start ( 0.00001 ); + this->timer.start ( *this, 0.00001 ); } // @@ -336,7 +336,7 @@ exAsyncExistIO::~exAsyncExistIO() // exAsyncExistIO::expire() // (a virtual function that runs when the base timer expires) // -epicsTimerNotify::expireStatus exAsyncExistIO::expire () +epicsTimerNotify::expireStatus exAsyncExistIO::expire ( const epicsTime & currentTime ) { // // post IO completion @@ -352,10 +352,10 @@ epicsTimerNotify::expireStatus exAsyncExistIO::expire () exAsyncCreateIO::exAsyncCreateIO ( pvInfo &pviIn, exServer &casIn, const casCtx &ctxIn, bool scanOnIn ) : casAsyncPVAttachIO ( ctxIn ), pvi ( pviIn ), - timer ( casIn.timerQueue().createTimer ( *this ) ), + timer ( casIn.timerQueue().createTimer () ), cas ( casIn ), scanOn ( scanOnIn ) { - this->timer.start ( 0.00001 ); + this->timer.start ( *this, 0.00001 ); } // @@ -371,7 +371,7 @@ exAsyncCreateIO::~exAsyncCreateIO() // exAsyncCreateIO::expire() // (a virtual function that runs when the base timer expires) // -epicsTimerNotify::expireStatus exAsyncCreateIO::expire () +epicsTimerNotify::expireStatus exAsyncCreateIO::expire ( const epicsTime & currentTime ) { exPV *pPV; diff --git a/src/cas/example/simple/exServer.h b/src/cas/example/simple/exServer.h index 4303b66b5..be6203672 100644 --- a/src/cas/example/simple/exServer.h +++ b/src/cas/example/simple/exServer.h @@ -237,7 +237,7 @@ private: // // scan timer expire // - expireStatus expire (); + expireStatus expire ( const epicsTime & currentTime ); // // Std PV Attribute fetch support @@ -397,7 +397,7 @@ private: exAsyncPV &pv; epicsTimer &timer; smartConstGDDPointer pValue; - expireStatus expire (); + expireStatus expire ( const epicsTime & currentTime ); }; // @@ -411,7 +411,7 @@ private: exAsyncPV &pv; epicsTimer &timer; smartGDDPointer pProto; - expireStatus expire (); + expireStatus expire ( const epicsTime & currentTime ); }; // @@ -427,7 +427,7 @@ private: const pvInfo &pvi; epicsTimer &timer; exServer &cas; - expireStatus expire (); + expireStatus expire ( const epicsTime & currentTime ); }; @@ -445,7 +445,7 @@ private: epicsTimer &timer; exServer &cas; bool scanOn; - expireStatus expire (); + expireStatus expire ( const epicsTime & currentTime ); }; // diff --git a/src/cas/example/testdb/pvServ.cc b/src/cas/example/testdb/pvServ.cc index 518397530..8ba9cf674 100644 --- a/src/cas/example/testdb/pvServ.cc +++ b/src/cas/example/testdb/pvServ.cc @@ -1,6 +1,9 @@ // $Id$ // $Log$ +// Revision 1.5 1998/12/19 00:04:48 jhill +// renamed createPV() to pvAttach() +// // Revision 1.4 1997/06/25 05:56:38 jhill // align with API changes // @@ -289,9 +292,9 @@ void servPV::eventReady(void) // // scanTimer::expire () // -void scanTimer::expire () +void scanTimer::expire ( const epicsTime & currentTime ) { - serv.scan(); + serv.scan(); } // diff --git a/src/cas/example/testdb/pvServ.h b/src/cas/example/testdb/pvServ.h index dd7a8239c..265c4f8f5 100644 --- a/src/cas/example/testdb/pvServ.h +++ b/src/cas/example/testdb/pvServ.h @@ -2,6 +2,9 @@ /* * $Id$ * $Log$ + * Revision 1.4 1998/12/19 00:04:48 jhill + * renamed createPV() to pvAttach() + * * Revision 1.3 1997/06/13 09:15:48 jhill * connect proto changes * @@ -61,12 +64,10 @@ public: scanTimer (double delayIn, serv &servIn) : osiTimer(delayIn), serv(servIn), period(delayIn) {} - void expire (); - osiBool again() const; - const osiTime delay() const; private: serv &serv; double period; + void expire ( const epicsTime & currentTime ); }; class serv : public caServer diff --git a/src/cas/generic/caServerI.cc b/src/cas/generic/caServerI.cc index 32f701f80..1a582b19b 100644 --- a/src/cas/generic/caServerI.cc +++ b/src/cas/generic/caServerI.cc @@ -260,8 +260,8 @@ void caServerI::show (unsigned level) const { int bytes_reserved; - printf( "Channel Access Server Status V%d.%d\n", - CA_PROTOCOL_VERSION, CA_MINOR_VERSION); + printf( "Channel Access Server Status V%s\n", + CA_VERSION_STRING ( CA_MINOR_PROTOCOL_REVISION ) ); this->mutex.show(level); diff --git a/src/cas/generic/casDGClient.cc b/src/cas/generic/casDGClient.cc index 101505901..da8d9db1e 100644 --- a/src/cas/generic/casDGClient.cc +++ b/src/cas/generic/casDGClient.cc @@ -211,7 +211,7 @@ caStatus casDGClient::searchResponse(const caHdr &msg, // Old versions expect alloc of channel in response // to a search request. This is no longer supported. // - if ( !CA_V44(CA_PROTOCOL_VERSION,msg.m_count) ) { + if ( !CA_V44(msg.m_count) ) { if (this->getCAS().getDebugLevel()>0u) { char pName[64u]; this->clientHostName (pName, sizeof (pName)); @@ -248,7 +248,7 @@ caStatus casDGClient::searchResponse(const caHdr &msg, // (this allows multiple CA servers on one // host) // - if (CA_V48(CA_PROTOCOL_VERSION,msg.m_count)) { + if (CA_V48(msg.m_count)) { if (retVal.addrIsValid()) { caNetAddr addr = retVal.getAddr(); ina = addr.getSockIP(); @@ -298,7 +298,7 @@ caStatus casDGClient::searchResponse(const caHdr &msg, // This value is ignored by earlier clients. // pMinorVersion = (unsigned short *) (search_reply+1); - *pMinorVersion = htons (CA_MINOR_VERSION); + *pMinorVersion = htons ( CA_MINOR_PROTOCOL_REVISION ); this->commitMsg(); diff --git a/src/cas/generic/casInternal.h b/src/cas/generic/casInternal.h index 3eadc3b9b..edd08b2f6 100644 --- a/src/cas/generic/casInternal.h +++ b/src/cas/generic/casInternal.h @@ -34,6 +34,7 @@ // #include "tsDLList.h" #include "resourceLib.h" +#define CA_MINOR_PROTOCOL_REVISION 8 #include "caProto.h" #include "smartGDDPointer.h" diff --git a/src/cas/generic/casStrmClient.cc b/src/cas/generic/casStrmClient.cc index 0872a0fdb..467037309 100644 --- a/src/cas/generic/casStrmClient.cc +++ b/src/cas/generic/casStrmClient.cc @@ -217,7 +217,7 @@ caStatus casStrmClient::readAction () if (!pChan->readAccess()) { int v41; - v41 = CA_V41(CA_PROTOCOL_VERSION,this->minor_version_number); + v41 = CA_V41(this->minor_version_number); if(v41){ status = ECA_NORDACCESS; } @@ -330,7 +330,7 @@ caStatus casStrmClient::readNotifyAction () // verify read access // if (!pChan->readAccess()) { - if (CA_V41(CA_PROTOCOL_VERSION, this->minor_version_number)) { + if (CA_V41(this->minor_version_number)) { return this->readNotifyResponseECA_XXX (NULL, *mp, NULL, ECA_NORDACCESS); } else { @@ -778,7 +778,7 @@ caStatus casStrmClient::writeAction() if (!pChan->writeAccess()) { int v41; - v41 = CA_V41(CA_PROTOCOL_VERSION,this->minor_version_number); + v41 = CA_V41(this->minor_version_number); if (v41) { status = ECA_NOWTACCESS; } @@ -852,7 +852,7 @@ caStatus casStrmClient::writeNotifyAction() // verify write access // if (!pChan->writeAccess()) { - if (CA_V41(CA_PROTOCOL_VERSION,this->minor_version_number)) { + if (CA_V41(this->minor_version_number)) { return this->casStrmClient::writeNotifyResponseECA_XXX( *mp, ECA_NOWTACCESS); } @@ -1062,7 +1062,7 @@ caStatus casStrmClient::claimChannelAction() // an R3.11 client because we will not respond to their // search requests (if so we disconnect) // - if (!CA_V44(CA_PROTOCOL_VERSION,this->minor_version_number)) { + if (!CA_V44(this->minor_version_number)) { // // old connect protocol was dropped when the // new API was added to the server (they must @@ -1266,7 +1266,7 @@ caStatus createStatus) else { errMessage (createStatus, "- Server unable to create a new PV"); } - if (CA_V46(CA_PROTOCOL_VERSION,this->minor_version_number)) { + if (CA_V46(this->minor_version_number)) { status = allocMsg (0u, &reply); if (status) { @@ -1300,7 +1300,7 @@ caStatus casStrmClient::disconnectChan(caResId id) caStatus createStatus; caHdr *reply; - if (CA_V47(CA_PROTOCOL_VERSION,this->minor_version_number)) { + if (CA_V47(this->minor_version_number)) { status = allocMsg (0u, &reply); if (status) { @@ -1661,7 +1661,7 @@ caStatus casStrmClient::accessRightsResponse(casChannelI *pciu) /* * noop if this is an old client */ - v41 = CA_V41(CA_PROTOCOL_VERSION, this->minor_version_number); + v41 = CA_V41(this->minor_version_number); if(!v41){ return S_cas_success; } diff --git a/src/cas/generic/st/caServerOS.cc b/src/cas/generic/st/caServerOS.cc index b79704afa..5d5b6d7cd 100644 --- a/src/cas/generic/st/caServerOS.cc +++ b/src/cas/generic/st/caServerOS.cc @@ -23,13 +23,13 @@ public: private: epicsTimer &timer; caServerOS &os; - expireStatus expire (); + expireStatus expire ( const epicsTime & currentTime ); }; casBeaconTimer::casBeaconTimer ( double delay, caServerOS &osIn ) : - timer ( fileDescriptorManager.timerQueueRef().createTimer(*this) ), os ( osIn ) + timer ( fileDescriptorManager.timerQueueRef().createTimer() ), os ( osIn ) { - this->timer.start ( delay ); + this->timer.start ( *this, delay ); } casBeaconTimer::~casBeaconTimer () @@ -61,7 +61,7 @@ caServerOS::~caServerOS() // // casBeaconTimer::expire() // -epicsTimerNotify::expireStatus casBeaconTimer::expire() +epicsTimerNotify::expireStatus casBeaconTimer::expire( const epicsTime & currentTime ) { os.sendBeacon (); return expireStatus ( restart, os.getBeaconPeriod() ); diff --git a/src/cas/generic/st/casDGIntfOS.cc b/src/cas/generic/st/casDGIntfOS.cc index 0bd752762..c49f82362 100644 --- a/src/cas/generic/st/casDGIntfOS.cc +++ b/src/cas/generic/st/casDGIntfOS.cc @@ -74,7 +74,7 @@ public: private: epicsTimer &timer; casDGIntfOS &os; - expireStatus expire(); + expireStatus expire( const epicsTime & currentTime ); }; // @@ -88,7 +88,7 @@ public: private: epicsTimer &timer; casDGIntfOS &os; - expireStatus expire(); + expireStatus expire( const epicsTime & currentTime ); }; // @@ -130,9 +130,9 @@ casDGIntfOS::~casDGIntfOS() // casDGEvWakeup::casDGEvWakeup() // casDGEvWakeup::casDGEvWakeup ( casDGIntfOS &osIn ) : - timer ( fileDescriptorManager.timerQueueRef().createTimer(*this) ), os ( osIn ) + timer ( fileDescriptorManager.timerQueueRef().createTimer() ), os ( osIn ) { - this->timer.start ( 0.0 ); + this->timer.start ( *this, 0.0 ); } // @@ -158,7 +158,7 @@ void casDGEvWakeup::show ( unsigned level ) const // // casDGEvWakeup::expire() // -epicsTimerNotify::expireStatus casDGEvWakeup::expire() +epicsTimerNotify::expireStatus casDGEvWakeup::expire( const epicsTime & currentTime ) { this->os.casEventSys::process(); return noRestart; @@ -168,9 +168,9 @@ epicsTimerNotify::expireStatus casDGEvWakeup::expire() // casDGIOWakeup::casDGIOWakeup() // casDGIOWakeup::casDGIOWakeup ( casDGIntfOS &osIn ) : - timer ( fileDescriptorManager.timerQueueRef().createTimer(*this) ), os ( osIn ) + timer ( fileDescriptorManager.timerQueueRef().createTimer() ), os ( osIn ) { - this->timer.start ( 0.0 ); + this->timer.start ( *this, 0.0 ); } // @@ -189,7 +189,7 @@ casDGIOWakeup::~casDGIOWakeup() // guarantees that we will not call processInput() // recursively // -epicsTimerNotify::expireStatus casDGIOWakeup::expire() +epicsTimerNotify::expireStatus casDGIOWakeup::expire( const epicsTime & currentTime ) { // // in case there is something in the input buffer diff --git a/src/cas/generic/st/casDGOS.cc b/src/cas/generic/st/casDGOS.cc index b596ae6c3..e885c0cc3 100644 --- a/src/cas/generic/st/casDGOS.cc +++ b/src/cas/generic/st/casDGOS.cc @@ -22,7 +22,7 @@ public: private: epicsTimer &timer; casDGOS &os; - expireStatus expire (); + expireStatus expire ( const epicsTime & currentTime ); }; // @@ -55,7 +55,7 @@ void casDGEvWakeup::show(unsigned level) const // // casDGEvWakeup::expire() // -epicsTimerNotify::expireStatus casDGEvWakeup::expire() +epicsTimerNotify::expireStatus casDGEvWakeup::expire( const epicsTime & currentTime ) { casProcCond cond = this->os.eventSysProcess(); if ( cond != casProcOk ) { diff --git a/src/cas/generic/st/casStreamOS.cc b/src/cas/generic/st/casStreamOS.cc index 5051e307b..1cfed3f7f 100644 --- a/src/cas/generic/st/casStreamOS.cc +++ b/src/cas/generic/st/casStreamOS.cc @@ -115,16 +115,16 @@ public: private: epicsTimer &timer; casStreamOS &os; - expireStatus expire (); + expireStatus expire ( const epicsTime & currentTime ); }; // // casStreamEvWakeup() // casStreamEvWakeup::casStreamEvWakeup ( casStreamOS &osIn ) : - timer ( fileDescriptorManager.timerQueueRef().createTimer(*this) ), os(osIn) + timer ( fileDescriptorManager.timerQueueRef().createTimer() ), os(osIn) { - this->timer.start ( 0.0 ); + this->timer.start ( *this, 0.0 ); } // @@ -150,7 +150,7 @@ void casStreamEvWakeup::show(unsigned level) const // // casStreamEvWakeup::expire() // -epicsTimerNotify::expireStatus casStreamEvWakeup::expire() +epicsTimerNotify::expireStatus casStreamEvWakeup::expire( const epicsTime & currentTime ) { casProcCond cond; cond = this->os.casEventSys::process(); @@ -184,16 +184,16 @@ public: private: epicsTimer &timer; casStreamOS &os; - expireStatus expire (); + expireStatus expire ( const epicsTime & currentTime ); }; // // casStreamIOWakeup::casStreamIOWakeup() // casStreamIOWakeup::casStreamIOWakeup ( casStreamOS &osIn ) : - timer ( fileDescriptorManager.timerQueueRef().createTimer(*this) ), os(osIn) + timer ( fileDescriptorManager.timerQueueRef().createTimer() ), os(osIn) { - this->timer.start ( 0.0 ); + this->timer.start ( *this, 0.0 ); } // @@ -239,7 +239,7 @@ inline void casStreamOS::armRecv() // guarantees that we will not call processInput() // recursively // -epicsTimerNotify::expireStatus casStreamIOWakeup::expire () +epicsTimerNotify::expireStatus casStreamIOWakeup::expire ( const epicsTime & currentTime ) { // // in case there is something in the input buffer