From d8d0e6b86d9505ebb6da9eb2441bef8a6222a8e2 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 18 Jan 2001 19:57:14 +0000 Subject: [PATCH] allow creation of PV's that dont update periodically --- src/cas/example/simple/exPV.cc | 4 ++-- src/cas/example/simple/exServer.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cas/example/simple/exPV.cc b/src/cas/example/simple/exPV.cc index 0b48b7723..31e5e7b66 100644 --- a/src/cas/example/simple/exPV.cc +++ b/src/cas/example/simple/exPV.cc @@ -37,7 +37,7 @@ exPV::exPV (pvInfo &setup, bool preCreateFlag, bool scanOnIn) : // (we will speed this up to the normal rate when // someone is watching the PV) // - if (this->scanOn) { + if ( this->scanOn && this->info.getScanPeriod () > 0.0 ) { this->pScanTimer = new exScanTimer (this->getScanPeriod(), *this); } @@ -169,7 +169,7 @@ caStatus exPV::interestRegister() if (this->pScanTimer) { this->pScanTimer->reschedule(this->getScanPeriod()); } - else { + else if ( this->getScanPeriod () > 0.0 ) { this->pScanTimer = new exScanTimer (this->getScanPeriod(), *this); if (!this->pScanTimer) { diff --git a/src/cas/example/simple/exServer.cc b/src/cas/example/simple/exServer.cc index 5b57b389d..06930c84a 100644 --- a/src/cas/example/simple/exServer.cc +++ b/src/cas/example/simple/exServer.cc @@ -41,8 +41,8 @@ const unsigned exServer::pvListNElem = NELEMENTS (exServer::pvList); // // static on-the-fly PVs // -pvInfo exServer::bill (2.0, "bill", 10.0f, -10.0f, excasIoSync, 1u); -pvInfo exServer::billy (2.0, "billy", 10.0f, -10.0f, excasIoAsync, 1u); +pvInfo exServer::bill (-1.0, "bill", 10.0f, -10.0f, excasIoSync, 1u); +pvInfo exServer::billy (-1.0, "billy", 10.0f, -10.0f, excasIoAsync, 1u); // // exServer::exServer()