pvDatabaseCPP  4.5.3-dev
Public Member Functions | Static Public Member Functions | List of all members
epics::pvCopy::PVCopy Class Reference

Support for subset of fields in a pvStructure. More...

#include <pvStructureCopy.h>

Inheritance diagram for epics::pvCopy::PVCopy:

Public Member Functions

 POINTER_DEFINITIONS (PVCopy)
 
virtual ~PVCopy ()
 
virtual void destroy ()
 
epics::pvData::PVStructurePtr getPVMaster ()
 
void traverseMaster (PVCopyTraverseMasterCallbackPtr const &callback)
 
epics::pvData::StructureConstPtr getStructure ()
 
epics::pvData::PVStructurePtr createPVStructure ()
 
std::size_t getCopyOffset (epics::pvData::PVFieldPtr const &masterPVField)
 
std::size_t getCopyOffset (epics::pvData::PVStructurePtr const &masterPVStructure, epics::pvData::PVFieldPtr const &masterPVField)
 
epics::pvData::PVFieldPtr getMasterPVField (std::size_t structureOffset)
 
void initCopy (epics::pvData::PVStructurePtr const &copyPVStructure, epics::pvData::BitSetPtr const &bitSet)
 
bool updateCopySetBitSet (epics::pvData::PVStructurePtr const &copyPVStructure, epics::pvData::BitSetPtr const &bitSet)
 
bool updateCopyFromBitSet (epics::pvData::PVStructurePtr const &copyPVStructure, epics::pvData::BitSetPtr const &bitSet)
 
void updateMaster (epics::pvData::PVStructurePtr const &copyPVStructure, epics::pvData::BitSetPtr const &bitSet)
 
epics::pvData::PVStructurePtr getOptions (std::size_t fieldOffset)
 
std::string dump ()
 

Static Public Member Functions

static PVCopyPtr create (epics::pvData::PVStructurePtr const &pvMaster, epics::pvData::PVStructurePtr const &pvRequest, std::string const &structureName)
 

Detailed Description

Support for subset of fields in a pvStructure.

Class that manages one or more PVStructures that holds an arbitrary subset of the fields in another PVStructure called master.

Definition at line 65 of file pvStructureCopy.h.

Constructor & Destructor Documentation

◆ ~PVCopy()

virtual epics::pvCopy::PVCopy::~PVCopy ( )
inlinevirtual

Definition at line 81 of file pvStructureCopy.h.

Member Function Documentation

◆ create()

PVCopyPtr epics::pvCopy::PVCopy::create ( epics::pvData::PVStructurePtr const &  pvMaster,
epics::pvData::PVStructurePtr const &  pvRequest,
std::string const &  structureName 
)
static

Create a new pvCopy

Parameters
pvMasterThe top-level structure for which a copy of an arbitrary subset of the fields in master will be created and managed.
pvRequestSelects the set of subfields desired and options for each field.
structureNameThe name for the top level of any PVStructure created.

Definition at line 73 of file pvCopy.cpp.

◆ createPVStructure()

PVStructurePtr epics::pvCopy::PVCopy::createPVStructure ( )

Create a copy instance. Monitors keep a queue of monitor elements. Since each element needs a PVStructure, multiple top-level structures will be created.

Definition at line 110 of file pvCopy.cpp.

◆ destroy()

void epics::pvCopy::PVCopy::destroy ( )
virtual

Definition at line 431 of file pvCopy.cpp.

◆ dump()

string epics::pvCopy::PVCopy::dump ( )

For debugging.

Definition at line 327 of file pvCopy.cpp.

◆ getCopyOffset() [1/2]

std::size_t epics::pvCopy::PVCopy::getCopyOffset ( epics::pvData::PVFieldPtr const &  masterPVField)

Given a field in pvMaster. return the offset in copy for the same field. A value of std::string::npos means that the copy does not have this field.

Parameters
masterPVFieldThe field in master.

◆ getCopyOffset() [2/2]

std::size_t epics::pvCopy::PVCopy::getCopyOffset ( epics::pvData::PVStructurePtr const &  masterPVStructure,
epics::pvData::PVFieldPtr const &  masterPVField 
)

Given a field in pvMaster. return the offset in copy for the same field. A value of std::string::npos means that the copy does not have this field.

Parameters
masterPVStructureA structure in master that has masterPVField.
masterPVFieldThe field in master.

◆ getMasterPVField()

PVFieldPtr epics::pvCopy::PVCopy::getMasterPVField ( std::size_t  structureOffset)

Given an offset in the copy get the corresponding field in pvMaster.

Parameters
structureOffsetThe offset in the copy.

Definition at line 161 of file pvCopy.cpp.

◆ getOptions()

PVStructurePtr epics::pvCopy::PVCopy::getOptions ( std::size_t  fieldOffset)

Get the options for the field at the specified offset.

Parameters
fieldOffsetthe offset in copy.
Returns
A NULL is returned if no options were specified for the field. If options were specified,PVStructurePtr is a structures with a set of PVString subfields that specify name,value pairs.s name is the subField name and value is the subField value.

Definition at line 300 of file pvCopy.cpp.

◆ getPVMaster()

PVStructurePtr epics::pvCopy::PVCopy::getPVMaster ( )

Get the top-level structure of master

Returns
The master top-level structure. This should not be modified.

Definition at line 95 of file pvCopy.cpp.

◆ getStructure()

StructureConstPtr epics::pvCopy::PVCopy::getStructure ( )

Get the introspection interface for a PVStructure for e copy.

Definition at line 105 of file pvCopy.cpp.

◆ initCopy()

void epics::pvCopy::PVCopy::initCopy ( epics::pvData::PVStructurePtr const &  copyPVStructure,
epics::pvData::BitSetPtr const &  bitSet 
)

Initialize the fields in copyPVStructure by giving each field the value from the corresponding field in pvMaster. bitSet will be set to show that all fields are changed.

Parameters
copyPVStructureA copy top-level structure.
bitSetA bitSet for copyPVStructure.

Definition at line 183 of file pvCopy.cpp.

◆ POINTER_DEFINITIONS()

epics::pvCopy::PVCopy::POINTER_DEFINITIONS ( PVCopy  )

◆ traverseMaster()

void epics::pvCopy::PVCopy::traverseMaster ( PVCopyTraverseMasterCallbackPtr const &  callback)

Traverse all the fields in master.

Parameters
callbackThis is called for each field on master.

Definition at line 100 of file pvCopy.cpp.

◆ updateCopyFromBitSet()

bool epics::pvCopy::PVCopy::updateCopyFromBitSet ( epics::pvData::PVStructurePtr const &  copyPVStructure,
epics::pvData::BitSetPtr const &  bitSet 
)

For each set bit in bitSet set the field in copyPVStructure to the value of the corresponding field in pvMaster.

Parameters
copyPVStructureA copy top-level structure.
bitSetA bitSet for copyPVStructure.
Returns
(false,true) if client (should not,should) receive changes.

◆ updateCopySetBitSet()

bool epics::pvCopy::PVCopy::updateCopySetBitSet ( epics::pvData::PVStructurePtr const &  copyPVStructure,
epics::pvData::BitSetPtr const &  bitSet 
)

Set all fields in copyPVStructure to the value of the corresponding field in pvMaster. Each field that is changed has it's corresponding bit set in bitSet.

Parameters
copyPVStructureA copy top-level structure.
bitSetA bitSet for copyPVStructure.
Returns
(false,true) if client (should not,should) receive changes.

◆ updateMaster()

void epics::pvCopy::PVCopy::updateMaster ( epics::pvData::PVStructurePtr const &  copyPVStructure,
epics::pvData::BitSetPtr const &  bitSet 
)

For each set bit in bitSet set the field in pvMaster to the value of the corresponding field in copyPVStructure

Parameters
copyPVStructureA copy top-level structure.
bitSetA bitSet for copyPVStructure.

Definition at line 280 of file pvCopy.cpp.


The documentation for this class was generated from the following files: