minor changes to monitor.h
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -63,8 +63,8 @@ namespace epics { namespace pvData {
|
||||
virtual Status stop() = 0;
|
||||
/**
|
||||
* If monitor has occurred return data.
|
||||
* @return monitorElement for modified data on null
|
||||
* if no monitors have occurred.
|
||||
* @return monitorElement for modified data.
|
||||
* Must call get to determine if data is available.
|
||||
*/
|
||||
virtual MonitorElement::shared_pointer poll() = 0;
|
||||
/**
|
||||
@@ -72,7 +72,7 @@ namespace epics { namespace pvData {
|
||||
* @param monitorElement
|
||||
*/
|
||||
virtual void release(
|
||||
MonitorElement::shared_pointer& monitorElement) = 0;
|
||||
MonitorElement::shared_pointer monitorElement) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -92,18 +92,18 @@ namespace epics { namespace pvData {
|
||||
* @param structure The structure defining the data.
|
||||
*/
|
||||
virtual void monitorConnect(const Status &status,
|
||||
Monitor::shared_pointer& monitor, StructureConstPtr& structure) = 0;
|
||||
Monitor &monitor, StructureConstPtr structure) = 0;
|
||||
/**
|
||||
* A monitor event has occurred.
|
||||
* The requester must call Monitor.poll to get data.
|
||||
* @param monitor The monitor.
|
||||
*/
|
||||
virtual void monitorEvent(Monitor::shared_pointer& monitor) = 0;
|
||||
virtual void monitorEvent(Monitor &monitor) = 0;
|
||||
/**
|
||||
* The data source is no longer available.
|
||||
* @param monitor The monitor.
|
||||
*/
|
||||
virtual void unlisten(Monitor::shared_pointer& monitor) = 0;
|
||||
virtual void unlisten(Monitor &monitor) = 0;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -67,7 +67,8 @@ MonitorQueueElement *MonitorElementImpl::getQueueElement()
|
||||
MonitorQueue::MonitorQueue(PVStructure::shared_pointer* structures,int number)
|
||||
: number(number),
|
||||
structures(structures),
|
||||
queue(0)
|
||||
queue(0),
|
||||
nullElement(MonitorElement::shared_pointer())
|
||||
{
|
||||
if(number<2) {
|
||||
throw std::logic_error(String("queueSize must be >=2"));
|
||||
@@ -127,7 +128,7 @@ MonitorElement::shared_pointer MonitorQueue::getFree()
|
||||
{
|
||||
|
||||
MonitorQueueElement *queueElement = queue->getFree();
|
||||
if(queueElement==0) return MonitorElement::shared_pointer();
|
||||
if(queueElement==0) return nullElement;
|
||||
return *queueElement->getObject();
|
||||
}
|
||||
|
||||
@@ -140,7 +141,7 @@ void MonitorQueue::setUsed(MonitorElement::shared_pointer element)
|
||||
MonitorElement::shared_pointer MonitorQueue::getUsed()
|
||||
{
|
||||
MonitorQueueElement *queueElement = queue->getUsed();
|
||||
if(queueElement==0) return MonitorElement::shared_pointer();
|
||||
if(queueElement==0) return nullElement;
|
||||
return *queueElement->getObject();
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ private:
|
||||
int number;
|
||||
PVStructure::shared_pointer* structures;
|
||||
Queue<MonitorElement::shared_pointer> *queue;
|
||||
MonitorElement::shared_pointer nullElement;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -251,7 +251,10 @@ public:
|
||||
virtual void deserialize(ByteBuffer *pbuffer,
|
||||
DeserializableControl*pflusher,BitSet *pbitSet);
|
||||
PVStructure(PVStructure *parent,StructureConstPtr structure);
|
||||
PVStructure(PVStructure *parent,StructureConstPtr structure,PVFieldPtrArray pvFields);
|
||||
PVStructure(
|
||||
PVStructure *parent,
|
||||
StructureConstPtr structure,
|
||||
PVFieldPtrArray pvFields);
|
||||
private:
|
||||
void setParentPvt(PVField *pvField,PVStructure *parent);
|
||||
class PVStructurePvt * pImpl;
|
||||
|
||||
@@ -35,14 +35,16 @@ public:
|
||||
PVScalar * scalarValue(PVStructure *parent,ScalarType type);
|
||||
PVStructure * scalarValue(PVStructure *parent,
|
||||
ScalarType type,String properties);
|
||||
PVScalarArray * scalarArrayValue(PVStructure *parent,ScalarType elementType);
|
||||
PVScalarArray * scalarArrayValue(
|
||||
PVStructure *parent,ScalarType elementType);
|
||||
PVStructure * scalarArrayValue(PVStructure *parent,
|
||||
ScalarType elementType, String properties);
|
||||
PVStructureArray * structureArrayValue(PVStructure *parent,
|
||||
StructureConstPtr structure);
|
||||
PVStructure * structureArrayValue(PVStructure *parent,
|
||||
StructureConstPtr structure,String properties);
|
||||
PVStructure * enumeratedValue(PVStructure *parent,StringArray choices,int number);
|
||||
PVStructure * enumeratedValue(
|
||||
PVStructure *parent,StringArray choices,int number);
|
||||
PVStructure * enumeratedValue(PVStructure *parent,
|
||||
StringArray choices,int number, String properties);
|
||||
PVStructure * alarm(PVStructure *parent);
|
||||
|
||||
Reference in New Issue
Block a user