From e40fa396b576f401d95acefb446d1d38712e3635 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 5 Aug 1999 00:15:54 +0000 Subject: [PATCH] updated to reflect osiTimer API changes eliminated unused PV attribute stubs --- src/cas/example/simple/exPV.cc | 89 ++++------------------------------ 1 file changed, 10 insertions(+), 79 deletions(-) diff --git a/src/cas/example/simple/exPV.cc b/src/cas/example/simple/exPV.cc index 13d186517..f1f5deee0 100644 --- a/src/cas/example/simple/exPV.cc +++ b/src/cas/example/simple/exPV.cc @@ -86,7 +86,8 @@ caStatus exPV::update(gdd &valueIn) return cas; } - this->pValue->setTimeStamp (&this->currentTime); + aitTimeStamp ts = this->currentTime; + this->pValue->setTimeStamp (&ts); this->pValue->setStat (epicsAlarmNone); this->pValue->setSevr (epicsSevNone); @@ -120,15 +121,15 @@ void exScanTimer::expire () // // exScanTimer::again() // -osiBool exScanTimer::again() const +bool exScanTimer::again() const { - return osiTrue; + return true; } // // exScanTimer::delay() // -const osiTime exScanTimer::delay() const +double exScanTimer::delay() const { return pv.getScanPeriod(); } @@ -223,10 +224,11 @@ void exPV::initFT() return; } - exPV::ft.installReadFunc ("status", &exPV::getStatus); - exPV::ft.installReadFunc ("severity", &exPV::getSeverity); - exPV::ft.installReadFunc ("seconds", &exPV::getSeconds); - exPV::ft.installReadFunc ("nanoseconds", &exPV::getNanoseconds); + // + // time stamp, status, and severity are extracted from the + // GDD associated with the "value" application type. + // + exPV::ft.installReadFunc ("value", &exPV::getValue); exPV::ft.installReadFunc ("precision", &exPV::getPrecision); exPV::ft.installReadFunc ("graphicHigh", &exPV::getHighLimit); exPV::ft.installReadFunc ("graphicLow", &exPV::getLowLimit); @@ -237,82 +239,11 @@ void exPV::initFT() exPV::ft.installReadFunc ("alarmHighWarning", &exPV::getHighLimit); exPV::ft.installReadFunc ("alarmLowWarning", &exPV::getLowLimit); exPV::ft.installReadFunc ("units", &exPV::getUnits); - exPV::ft.installReadFunc ("value", &exPV::getValue); exPV::ft.installReadFunc ("enums", &exPV::getEnums); exPV::hasBeenInitialized = 1; } -// -// exPV::getStatus() -// -caStatus exPV::getStatus(gdd &value) -{ - if (this->pValue!=NULL) { - value.put(this->pValue->getStat()); - } - else { - value.put((aitUint16)epicsAlarmUDF); - } - return S_cas_success; -} - -// -// exPV::getSeverity() -// -caStatus exPV::getSeverity(gdd &value) -{ - if (this->pValue!=NULL) { - value.put(this->pValue->getSevr()); - } - else { - value.put((aitUint16)epicsSevInvalid); - } - return S_cas_success; -} - -// -// exPV::getSeconds() -// -caStatus exPV::getSeconds(gdd &value) -{ - osiTime ts; - aitUint32 sec; - - if (this->pValue!=NULL) { - this->pValue->getTimeStamp (&ts); - } - else { - ts = osiTime::getCurrent(); - } - - sec = ts.getSec(); - value.put (sec); - - return S_cas_success; -} - -// -// exPV::getNanoseconds() -// -caStatus exPV::getNanoseconds(gdd &value) -{ - osiTime ts; - aitUint32 nSec; - - if (this->pValue!=NULL) { - this->pValue->getTimeStamp (&ts); - } - else { - ts = osiTime::getCurrent(); - } - - nSec = ts.getNSec(); - value.put (nSec); - - return S_cas_success; -} - // // exPV::getPrecision() //