15#include <pv/createRequest.h>
16#include <pv/convert.h>
18#define epicsExportSharedSymbols
22using namespace epics::pvData;
23using namespace epics::pvAccess;
26namespace epics {
namespace pvaClient {
29typedef std::tr1::shared_ptr<PVArray>
PVArrayPtr;
31static ConvertPtr convert = getConvert();
33static StructureConstPtr nullStructure;
34static PVStructurePtr nullPVStructure;
36static string noStructure(
"no pvStructure ");
37static string noValue(
"no value field");
38static string noScalar(
"value is not a scalar");
39static string notCompatibleScalar(
"value is not a compatible scalar");
40static string noArray(
"value is not an array");
41static string noScalarArray(
"value is not a scalarArray");
42static string notDoubleArray(
"value is not a doubleArray");
43static string notStringArray(
"value is not a stringArray");
44static string noAlarm(
"no alarm");
45static string noTimeStamp(
"no timeStamp");
54PvaClientMonitorData::PvaClientMonitorData(StructureConstPtr
const & structure)
61 PVStructurePtr pvStructure = monitorElement->pvStructurePtr;
62 BitSetPtr changedBitSet = monitorElement->changedBitSet;
64 overrunBitSet = monitorElement->overrunBitSet;
69 if(!overrunBitSet)
throw std::runtime_error(
messagePrefix + noStructure);
75 if(!overrunBitSet)
throw std::runtime_error(
messagePrefix + noStructure);
76 size_t nextSet = overrunBitSet->nextSetBit(0);
78 while(nextSet!=string::npos) {
84 string name = pvField->getFullName();
85 out << name <<
" = " << pvField << endl;
86 nextSet = overrunBitSet->nextSetBit(nextSet+1);
A base class for PvaClientGetData, PvaClientPutData, and PvaClientMonitorData.
epics::pvData::PVStructurePtr getPVStructure()
Get the pvStructure.
std::string messagePrefix
void setData(epics::pvData::PVStructurePtr const &pvStructureFrom, epics::pvData::BitSetPtr const &bitSetFrom)
New data is present.
A class that holds data returned by PvaClientMonitor.
epics::pvData::BitSetPtr getOverrunBitSet()
Get the overrun BitSet for the pvStructure This shows which fields have had more than one change.
void setData(epics::pvData::MonitorElementPtr const &monitorElement)
std::ostream & showOverrun(std::ostream &out)
Show the fields that have changed.
static PvaClientMonitorDataPtr create(epics::pvData::StructureConstPtr const &structure)
std::tr1::shared_ptr< PvaClientMonitorData > PvaClientMonitorDataPtr
std::tr1::shared_ptr< PVArray > PVArrayPtr