using new copy API
This commit is contained in:
@ -9,7 +9,6 @@
|
||||
* @date 2014.04.16
|
||||
*/
|
||||
|
||||
#include <pv/convert.h>
|
||||
#include <pv/monitorPlugin.h>
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
@ -23,7 +22,6 @@ using std::string;
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
static string pluginName("onChange");
|
||||
static ConvertPtr convert(getConvert());
|
||||
|
||||
class OnChangePlugin;
|
||||
typedef std::tr1::shared_ptr<OnChangePlugin> OnChangePluginPtr;
|
||||
@ -58,9 +56,9 @@ public:
|
||||
PVStructurePtr const &pvTop,
|
||||
MonitorElementPtr const &monitorElement)
|
||||
{
|
||||
bool isSame = convert->equals(pvNew,pvField);
|
||||
bool isSame = (*pvNew == *pvField);
|
||||
if(isSame) return false;
|
||||
convert->copy(pvNew,pvField);
|
||||
pvField->copyUnchecked(*pvNew);
|
||||
return raiseMonitor;
|
||||
}
|
||||
private:
|
||||
|
@ -10,7 +10,6 @@
|
||||
*/
|
||||
|
||||
#include <pv/standardPVField.h>
|
||||
#include <pv/convert.h>
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include <pv/exampleLink.h>
|
||||
@ -46,8 +45,7 @@ ExampleLink::ExampleLink(
|
||||
PVStructurePtr const & pvStructure)
|
||||
: PVRecord(recordName,pvStructure),
|
||||
providerName(providerName),
|
||||
channelName(channelName),
|
||||
convert(getConvert())
|
||||
channelName(channelName)
|
||||
{
|
||||
}
|
||||
|
||||
@ -121,7 +119,7 @@ void ExampleLink::process()
|
||||
}
|
||||
alarm.setSeverity(severity);
|
||||
} else {
|
||||
convert->copy(getPVValue,pvValue);
|
||||
pvValue->copyUnchecked(*getPVValue);
|
||||
}
|
||||
alarm.setMessage(status.getMessage());
|
||||
pvAlarm.set(alarm);
|
||||
@ -160,7 +158,7 @@ void ExampleLink::getDone(
|
||||
BitSetPtr const & bitSet)
|
||||
{
|
||||
this->status = status;
|
||||
convert->copyStructure(pvStructure,getPVStructure);
|
||||
getPVStructure->copyUnchecked(*pvStructure);
|
||||
this->bitSet = bitSet;
|
||||
event.signal();
|
||||
}
|
||||
|
@ -83,7 +83,6 @@ private:
|
||||
epics::pvData::PVStructurePtr const & pvStructure);
|
||||
std::string providerName;
|
||||
std::string channelName;
|
||||
epics::pvData::ConvertPtr convert;
|
||||
epics::pvData::PVDoubleArrayPtr pvValue;
|
||||
epics::pvData::PVTimeStamp pvTimeStamp;
|
||||
epics::pvData::TimeStamp timeStamp;
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include <pv/pvData.h>
|
||||
#include <pv/pvCopy.h>
|
||||
#include <pv/convert.h>
|
||||
#include <pv/pvTimeStamp.h>
|
||||
|
||||
#ifdef pvdatabaseEpicsExportSharedSymbols
|
||||
@ -237,7 +236,6 @@ private:
|
||||
|
||||
std::string recordName;
|
||||
epics::pvData::PVStructurePtr pvStructure;
|
||||
epics::pvData::ConvertPtr convert;
|
||||
PVRecordStructurePtr pvRecordStructure;
|
||||
std::list<PVListenerPtr> pvListenerList;
|
||||
std::list<PVRecordClientPtr> pvRecordClientList;
|
||||
|
@ -39,7 +39,6 @@ PVRecord::PVRecord(
|
||||
PVStructurePtr const & pvStructure)
|
||||
: recordName(recordName),
|
||||
pvStructure(pvStructure),
|
||||
convert(getConvert()),
|
||||
depthGroupPut(0),
|
||||
traceLevel(0),
|
||||
isDestroyed(false),
|
||||
@ -98,7 +97,6 @@ void PVRecord::destroy()
|
||||
}
|
||||
pvRecordStructure->destroy();
|
||||
pvRecordStructure.reset();
|
||||
convert.reset();
|
||||
pvStructure.reset();
|
||||
unlock();
|
||||
} catch(...) {
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
#include <epicsThread.h>
|
||||
#include <pv/timeStamp.h>
|
||||
#include <pv/convert.h>
|
||||
#include <pv/pvSubArrayCopy.h>
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
@ -30,7 +29,6 @@ using std::string;
|
||||
|
||||
namespace epics { namespace pvDatabase {
|
||||
|
||||
static ConvertPtr convert = getConvert();
|
||||
static StructureConstPtr nullStructure;
|
||||
static PVStructurePtr nullPVStructure;
|
||||
static BitSetPtr nullBitSet;
|
||||
|
@ -37,7 +37,6 @@ static Status wasDestroyedStatus(Status::STATUSTYPE_ERROR,"was destroyed");
|
||||
static Status alreadyStartedStatus(Status::STATUSTYPE_ERROR,"already started");
|
||||
static Status notStartedStatus(Status::STATUSTYPE_ERROR,"not started");
|
||||
|
||||
static ConvertPtr convert = getConvert();
|
||||
|
||||
|
||||
typedef Queue<MonitorElement> MonitorElementQueue;
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <pv/standardField.h>
|
||||
#include <pv/standardPVField.h>
|
||||
#include <pv/channelProviderLocal.h>
|
||||
#include <pv/convert.h>
|
||||
#include "powerSupply.h"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user