pvDatabaseCPP  4.7.1-dev
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
epics::pvDatabase::PvdbcrProcessRecord Class Reference

PvdbcrProcessRecord A record that processes other records in the master database. More...

#include <pvdbcrProcessRecord.h>

Inheritance diagram for epics::pvDatabase::PvdbcrProcessRecord:
epics::pvDatabase::PVRecord epics::pvCopy::PVCopyTraverseMasterCallback

Public Member Functions

 POINTER_DEFINITIONS (PvdbcrProcessRecord)
 
virtual ~PvdbcrProcessRecord ()
 
void setDelay (double delay)
 set the delay between prcocessing. More...
 
double getDelay ()
 get the delay between prcocessing. More...
 
virtual bool init ()
 a PVRecord method More...
 
virtual void process ()
 method that processes other records in the master database. More...
 
virtual void run ()
 thread method More...
 
void startThread ()
 thread method More...
 
void stop ()
 thread method More...
 
 POINTER_DEFINITIONS (PVRecord)
 
 POINTER_DEFINITIONS (PVCopyTraverseMasterCallback)
 
virtual void start ()
 Optional method for derived class. More...
 
virtual void remove ()
 remove record from database. More...
 
virtual epics::pvAccess::RPCServiceAsync::shared_pointer getService (epics::pvData::PVStructurePtr const &pvRequest)
 Optional method for derived class. More...
 
std::string getRecordName () const
 Get the name of the record. More...
 
PVRecordStructurePtr getPVRecordStructure () const
 Get the top level PVRecordStructure. More...
 
epics::pvData::PVStructurePtr getPVStructure () const
 Get the top level PVStructure. More...
 
PVRecordFieldPtr findPVRecordField (epics::pvData::PVFieldPtr const &pvField)
 Find the PVRecordField for the PVField. More...
 
void lock ()
 Lock the record. More...
 
void unlock ()
 Unlock the record. More...
 
bool tryLock ()
 Try to lock the record. More...
 
void lockOtherRecord (PVRecordPtr const &otherRecord)
 Lock another record. More...
 
bool addPVRecordClient (PVRecordClientPtr const &pvRecordClient)
 Add a client that wants to access the record. More...
 
bool addListener (PVListenerPtr const &pvListener, epics::pvCopy::PVCopyPtr const &pvCopy)
 Add a PVListener. More...
 
void nextMasterPVField (epics::pvData::PVFieldPtr const &pvField)
 PVCopyTraverseMasterCallback method. More...
 
bool removeListener (PVListenerPtr const &pvListener, epics::pvCopy::PVCopyPtr const &pvCopy)
 Remove a listener. More...
 
void beginGroupPut ()
 Begins a group of puts. More...
 
void endGroupPut ()
 Ends a group of puts. More...
 
int getTraceLevel ()
 get trace level (0,1,2) means (nothing,lifetime,process) More...
 
void setTraceLevel (int level)
 set trace level (0,1,2) means (nothing,lifetime,process) More...
 
int getAsLevel () const
 Get the ASlevel. More...
 
std::string getAsGroup () const
 Get the AS group name. More...
 
void setAsLevel (int level)
 set access security level. More...
 
void setAsGroup (const std::string &group)
 set access security group More...
 

Static Public Member Functions

static PvdbcrProcessRecordPtr create (std::string const &recordName, double delay=1.0, int asLevel=0, std::string const &asGroup=std::string("DEFAULT"))
 Create a record. More...
 
static PVRecordPtr create (std::string const &recordName, epics::pvData::PVStructurePtr const &pvStructure, int asLevel=0, const std::string &asGroup="DEFAULT")
 Creates a soft record. More...
 

Protected Member Functions

void initPVRecord ()
 Initializes the base class. More...
 

Detailed Description

PvdbcrProcessRecord A record that processes other records in the master database.

Definition at line 31 of file pvdbcrProcessRecord.h.

Constructor & Destructor Documentation

◆ ~PvdbcrProcessRecord()

virtual epics::pvDatabase::PvdbcrProcessRecord::~PvdbcrProcessRecord ( )
inlinevirtual

The Destructor.

Definition at line 55 of file pvdbcrProcessRecord.h.

Member Function Documentation

◆ addListener()

bool epics::pvDatabase::PVRecord::addListener ( PVListenerPtr const &  pvListener,
epics::pvCopy::PVCopyPtr const &  pvCopy 
)
inherited

Add a PVListener.

This must be called before calling pvRecordField.addListener.

Parameters
pvListenerThe listener.
pvCopyThe pvStructure that has the client fields.
Returns
true if the listener was added.

Definition at line 236 of file pvRecord.cpp.

◆ addPVRecordClient()

bool epics::pvDatabase::PVRecord::addPVRecordClient ( PVRecordClientPtr const &  pvRecordClient)
inherited

Add a client that wants to access the record.

Every client that accesses the record must call this so that the client can be notified when the record is deleted.

Parameters
pvRecordClientThe client.
Returns
true if the client is added.

Definition at line 205 of file pvRecord.cpp.

◆ beginGroupPut()

void epics::pvDatabase::PVRecord::beginGroupPut ( )
inherited

Begins a group of puts.

Definition at line 289 of file pvRecord.cpp.

◆ create() [1/2]

PvdbcrProcessRecordPtr epics::pvDatabase::PvdbcrProcessRecord::create ( std::string const &  recordName,
double  delay = 1.0,
int  asLevel = 0,
std::string const &  asGroup = std::string("DEFAULT") 
)
static

Create a record.

Parameters
recordNameThe record name.
asLevelThe access security level.
asGroupThe access security group.
Returns
The PVRecord

Definition at line 34 of file pvdbcrProcessRecord.cpp.

◆ create() [2/2]

PVRecordPtr epics::pvDatabase::PVRecord::create ( std::string const &  recordName,
epics::pvData::PVStructurePtr const &  pvStructure,
int  asLevel = 0,
const std::string &  asGroup = "DEFAULT" 
)
staticinherited

Creates a soft record.

Parameters
recordNameThe name of the record, which is also the channelName.
pvStructureThe top level structure.
asLevelAS level (default: ASL0)
asGroupAS group (default: DEFAULT)
Returns
A shared pointer to the newly created record.

Definition at line 38 of file pvRecord.cpp.

◆ endGroupPut()

void epics::pvDatabase::PVRecord::endGroupPut ( )
inherited

Ends a group of puts.

Definition at line 304 of file pvRecord.cpp.

◆ findPVRecordField()

PVRecordFieldPtr epics::pvDatabase::PVRecord::findPVRecordField ( epics::pvData::PVFieldPtr const &  pvField)
inherited

Find the PVRecordField for the PVField.

This is called by the pvCopy facility.

Parameters
pvFieldThe PVField.
Returns
The shared pointer to the PVRecordField.

Referenced by epics::pvDatabase::PVRecord::nextMasterPVField(), and epics::pvDatabase::PVRecord::process().

◆ getAsGroup()

std::string epics::pvDatabase::PVRecord::getAsGroup ( ) const
inlineinherited

Get the AS group name.

Returns
The name.

Definition at line 250 of file pvDatabase.h.

◆ getAsLevel()

int epics::pvDatabase::PVRecord::getAsLevel ( ) const
inlineinherited

Get the ASlevel.

Returns
The level.

Definition at line 244 of file pvDatabase.h.

◆ getDelay()

double epics::pvDatabase::PvdbcrProcessRecord::getDelay ( )

get the delay between prcocessing.

Returns
delay in seconds

Definition at line 82 of file pvdbcrProcessRecord.cpp.

◆ getPVRecordStructure()

PVRecordStructurePtr epics::pvDatabase::PVRecord::getPVRecordStructure ( ) const
inlineinherited

Get the top level PVRecordStructure.

Returns
The shared pointer.

Definition at line 135 of file pvDatabase.h.

Referenced by epics::pvDatabase::operator<<().

◆ getPVStructure()

epics::pvData::PVStructurePtr epics::pvDatabase::PVRecord::getPVStructure ( ) const
inlineinherited

Get the top level PVStructure.

Returns
The top level PVStructure.

Definition at line 141 of file pvDatabase.h.

◆ getRecordName()

std::string epics::pvDatabase::PVRecord::getRecordName ( ) const
inlineinherited

Get the name of the record.

Returns
The name.

Definition at line 129 of file pvDatabase.h.

Referenced by epics::pvDatabase::operator<<().

◆ getService()

virtual epics::pvAccess::RPCServiceAsync::shared_pointer epics::pvDatabase::PVRecord::getService ( epics::pvData::PVStructurePtr const &  pvRequest)
inlinevirtualinherited

Optional method for derived class.

Return a service corresponding to the specified request PVStructure.

Parameters
pvRequestThe request PVStructure
Returns
The corresponding service

Definition at line 106 of file pvDatabase.h.

◆ getTraceLevel()

int epics::pvDatabase::PVRecord::getTraceLevel ( )
inlineinherited

get trace level (0,1,2) means (nothing,lifetime,process)

Returns
the level

Definition at line 233 of file pvDatabase.h.

◆ init()

bool epics::pvDatabase::PvdbcrProcessRecord::init ( )
virtual

a PVRecord method

Returns
success or failure

Reimplemented from epics::pvDatabase::PVRecord.

Definition at line 67 of file pvdbcrProcessRecord.cpp.

◆ initPVRecord()

void epics::pvDatabase::PVRecord::initPVRecord ( )
protectedinherited

Initializes the base class.

Must be called by derived classes.

Definition at line 116 of file pvRecord.cpp.

◆ lock()

void epics::pvDatabase::PVRecord::lock ( )
inherited

Lock the record.

Any code must lock while accessing a record.

Definition at line 170 of file pvRecord.cpp.

Referenced by epics::pvDatabase::PVRecord::lockOtherRecord().

◆ lockOtherRecord()

void epics::pvDatabase::PVRecord::lockOtherRecord ( PVRecordPtr const &  otherRecord)
inherited

Lock another record.

A client that holds the lock for one record can lock one other record. A client must not call this if the client already has the lock for more then one record.

Parameters
otherRecordThe other record to lock.

Definition at line 191 of file pvRecord.cpp.

References epics::pvDatabase::PVRecord::lock(), and epics::pvDatabase::PVRecord::unlock().

◆ nextMasterPVField()

void epics::pvDatabase::PVRecord::nextMasterPVField ( epics::pvData::PVFieldPtr const &  pvField)
virtualinherited

PVCopyTraverseMasterCallback method.

Parameters
pvFieldThe next client field.

Implements epics::pvCopy::PVCopyTraverseMasterCallback.

Definition at line 252 of file pvRecord.cpp.

References epics::pvDatabase::PVRecord::findPVRecordField().

◆ POINTER_DEFINITIONS() [1/3]

epics::pvCopy::PVCopyTraverseMasterCallback::POINTER_DEFINITIONS ( PVCopyTraverseMasterCallback  )
inherited

◆ POINTER_DEFINITIONS() [2/3]

epics::pvDatabase::PvdbcrProcessRecord::POINTER_DEFINITIONS ( PvdbcrProcessRecord  )

◆ POINTER_DEFINITIONS() [3/3]

epics::pvDatabase::PVRecord::POINTER_DEFINITIONS ( PVRecord  )
inherited

◆ process()

void epics::pvDatabase::PvdbcrProcessRecord::process ( )
virtual

method that processes other records in the master database.

Reimplemented from epics::pvDatabase::PVRecord.

Definition at line 100 of file pvdbcrProcessRecord.cpp.

◆ remove()

void epics::pvDatabase::PVRecord::remove ( )
virtualinherited

remove record from database.

Remove the PVRecord. Release any resources used and get rid of listeners and requesters. If derived class overrides this then it must call PVRecord::remove() after it has destroyed any resorces it uses.

Definition at line 104 of file pvRecord.cpp.

References epics::pvDatabase::PVDatabase::getMaster().

◆ removeListener()

bool epics::pvDatabase::PVRecord::removeListener ( PVListenerPtr const &  pvListener,
epics::pvCopy::PVCopyPtr const &  pvCopy 
)
inherited

Remove a listener.

Parameters
pvListenerThe listener.
pvCopyThe pvStructure that has the client fields.
Returns
true if the listener was removed.

Definition at line 264 of file pvRecord.cpp.

◆ run()

void epics::pvDatabase::PvdbcrProcessRecord::run ( )
virtual

thread method

Definition at line 135 of file pvdbcrProcessRecord.cpp.

◆ setAsGroup()

void epics::pvDatabase::PVRecord::setAsGroup ( const std::string &  group)
inlineinherited

set access security group

Parameters
groupThe group name

Definition at line 260 of file pvDatabase.h.

◆ setAsLevel()

void epics::pvDatabase::PVRecord::setAsLevel ( int  level)
inlineinherited

set access security level.

Parameters
levelThe level

Definition at line 255 of file pvDatabase.h.

◆ setDelay()

void epics::pvDatabase::PvdbcrProcessRecord::setDelay ( double  delay)

set the delay between prcocessing.

Parameters
delayin seconds

Definition at line 80 of file pvdbcrProcessRecord.cpp.

◆ setTraceLevel()

void epics::pvDatabase::PVRecord::setTraceLevel ( int  level)
inlineinherited

set trace level (0,1,2) means (nothing,lifetime,process)

Parameters
levelThe level

Definition at line 238 of file pvDatabase.h.

◆ start()

virtual void epics::pvDatabase::PVRecord::start ( )
inlinevirtualinherited

Optional method for derived class.

It is called before record is added to database.

Definition at line 79 of file pvDatabase.h.

◆ startThread()

void epics::pvDatabase::PvdbcrProcessRecord::startThread ( )

thread method

Definition at line 84 of file pvdbcrProcessRecord.cpp.

◆ stop()

void epics::pvDatabase::PvdbcrProcessRecord::stop ( )

thread method

Definition at line 94 of file pvdbcrProcessRecord.cpp.

◆ tryLock()

bool epics::pvDatabase::PVRecord::tryLock ( )
inherited

Try to lock the record.

If true then just like lock. If falseclient can not access record. Code can try to simultaneously hold the lock for more than two records by calling this method but must be willing to accept failure.

Returns
true if the record is locked.

Definition at line 184 of file pvRecord.cpp.

◆ unlock()

void epics::pvDatabase::PVRecord::unlock ( )
inherited

Unlock the record.

The code that calls lock must unlock when done accessing the record.

Definition at line 177 of file pvRecord.cpp.

Referenced by epics::pvDatabase::PVRecord::lockOtherRecord().


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