NDS3  1.0.0
API reference manual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nds::PVBaseImpl Class Referenceabstract

Detailed Description

Base class for all the PVs.

#include <pvBaseImpl.h>

Inheritance diagram for nds::PVBaseImpl:
nds::PVBaseInImpl nds::PVBaseOutImpl nds::PVDelegateInImpl< T > nds::PVVariableInImpl< T > nds::PVActionImpl nds::PVDelegateOutImpl< T > nds::PVVariableOutImpl< T >

Public Member Functions

virtual void initialize (FactoryBaseImpl &controlSystem)
 Register the PV with the control system. More...
 
virtual void deinitialize ()
 Deregister the PV from the control system.
 
virtual void read (timespec *pTimestamp, std::int32_t *pValue) const
 Called when the control system wants to read the value. More...
 
virtual void write (const timespec &timestamp, const std::int32_t &value)
 Called when the control system wants to write a value. More...
 
virtual dataDirection_t getDataDirection () const =0
 Retrieve the data direction. More...
 
virtual dataType_t getDataType () const =0
 Return the PV's data type. More...
 
void setDescription (const std::string &description)
 Set the PV description. More...
 
void setUnits (const std::string &units)
 Set the engineering units associated with the PV. More...
 
void setScanType (const scanType_t scanType, const double periodSeconds)
 Set the scan type. More...
 
void setMaxElements (const size_t maxElements)
 Set the maximum number of elements if the data type is an array. More...
 
void setEnumeration (const enumerationStrings_t &enumerations)
 Assign enumeration strings to the PV. More...
 
void processAtInit (const bool bProcessAtInit)
 Specifies if the PV has to be processed during the initialization. More...
 
const std::string & getDescription () const
 Return the PV's description. More...
 
const std::string & getUnits () const
 Return the PV's engineering units. More...
 
scanType_t getScanType () const
 Return the scan type. More...
 
double getScanPeriodSeconds () const
 Return the scan period in seconds. More...
 
size_t getMaxElements () const
 Return the maximum number of elements that can be stored in the array (if the PV data type is an array). More...
 
const enumerationStrings_tgetEnumerations () const
 Return the list of string used to enumerate the integer values. More...
 
bool getProcessAtInit () const
 Return true if the PV has to bve processed during the initialization of the device. More...
 

Static Public Member Functions

template<typename T >
static dataType_t getDataTypeForCPPType ()
 Return the data type enumerator for the type in the template. More...
 

Protected Attributes

std::string m_description
 The PV's description.
 
std::string m_units
 Engineering units.
 
scanType_t m_scanType
 The PV's scan type.
 
double m_periodicScanSeconds
 The interval between data polling (in seconds).
 
size_t m_maxElements
 Maximum number of elements that can be stored in the PV.
 
enumerationStrings_t m_enumeration
 List of strings used for enumeration.
 
bool m_bProcessAtInit
 True if the PV has to be processed during the device initialization.
 

Member Function Documentation

virtual dataDirection_t nds::PVBaseImpl::getDataDirection ( ) const
pure virtual

Retrieve the data direction.

Returns
the data direction

Implemented in nds::PVBaseInImpl, and nds::PVBaseOutImpl.

virtual dataType_t nds::PVBaseImpl::getDataType ( ) const
pure virtual

Return the PV's data type.

Returns
the data type used by the PV

Implemented in nds::PVDelegateOutImpl< T >, nds::PVActionImpl, nds::PVDelegateInImpl< T >, nds::PVVariableOutImpl< T >, and nds::PVVariableInImpl< T >.

template<typename T >
static dataType_t nds::PVBaseImpl::getDataTypeForCPPType ( )
inlinestatic

Return the data type enumerator for the type in the template.

Template Parameters
typefor which the data type enumerator is requested
Returns
an enumerator for the data type in the template
const std::string& nds::PVBaseImpl::getDescription ( ) const

Return the PV's description.

Returns
the description associated with the PV
const enumerationStrings_t& nds::PVBaseImpl::getEnumerations ( ) const

Return the list of string used to enumerate the integer values.

Returns
list of string used for the enumeration
size_t nds::PVBaseImpl::getMaxElements ( ) const

Return the maximum number of elements that can be stored in the array (if the PV data type is an array).

Returns
the maximum number of elements that can be stored in the PV
bool nds::PVBaseImpl::getProcessAtInit ( ) const

Return true if the PV has to bve processed during the initialization of the device.

Returns
true if the PV has to be processed during the device initialization, false otherwise
double nds::PVBaseImpl::getScanPeriodSeconds ( ) const

Return the scan period in seconds.

Returns
the scan period in seconds.
scanType_t nds::PVBaseImpl::getScanType ( ) const

Return the scan type.

Returns
the scan type
const std::string& nds::PVBaseImpl::getUnits ( ) const

Return the PV's engineering units.

Returns
the engineering units associated with the PV
virtual void nds::PVBaseImpl::initialize ( FactoryBaseImpl controlSystem)
virtual

Register the PV with the control system.

Parameters
controlSystemthe control system on which the PV will be registered

Reimplemented in nds::PVBaseOutImpl, and nds::PVBaseInImpl.

void nds::PVBaseImpl::processAtInit ( const bool  bProcessAtInit)

Specifies if the PV has to be processed during the initialization.

Parameters
bProcessAtInittrue if the PV has to be processed during the initialization, false otherwise
virtual void nds::PVBaseImpl::read ( timespec *  pTimestamp,
std::int32_t *  pValue 
) const
virtual

Called when the control system wants to read the value.

The default implementation throws an exception.

Parameters
pTimestamp
pValue

Reimplemented in nds::PVActionImpl, nds::PVBaseOutImpl, and nds::PVBaseInImpl.

void nds::PVBaseImpl::setDescription ( const std::string &  description)

Set the PV description.

Parameters
descriptionthe description associated with the PV.
void nds::PVBaseImpl::setEnumeration ( const enumerationStrings_t enumerations)

Assign enumeration strings to the PV.

Parameters
enumerationslist of strings to use for the enumeration
void nds::PVBaseImpl::setMaxElements ( const size_t  maxElements)

Set the maximum number of elements if the data type is an array.

Parameters
maxElementsmaximum number of elements that will be stored in the array
void nds::PVBaseImpl::setScanType ( const scanType_t  scanType,
const double  periodSeconds 
)

Set the scan type.

Parameters
scanTypescan type
periodSecondsseconds between scans if scanType is scanType_t::periodic
void nds::PVBaseImpl::setUnits ( const std::string &  units)

Set the engineering units associated with the PV.

Parameters
unitsthe engineering units (e.g. "Ohm").
virtual void nds::PVBaseImpl::write ( const timespec &  timestamp,
const std::int32_t &  value 
)
virtual

Called when the control system wants to write a value.

The default implementation throws an exception.

Parameters
timestamp
value

Reimplemented in nds::PVActionImpl, and nds::PVBaseOutImpl.


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