pvaClientCPP  4.8.1-dev
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
epics::pvaClient::PvaClientMonitorData Class Reference

A class that holds data returned by PvaClientMonitor. More...

#include <pv/pvaClient.h>

Inheritance diagram for epics::pvaClient::PvaClientMonitorData:
epics::pvaClient::PvaClientData

Public Member Functions

 POINTER_DEFINITIONS (PvaClientMonitorData)
 
 ~PvaClientMonitorData ()
 Destructor. More...
 
epics::pvData::BitSetPtr getOverrunBitSet ()
 Get the overrun BitSet for the pvStructure This shows which fields have had more than one change. More...
 
std::ostream & showOverrun (std::ostream &out)
 Show the fields that have changed. More...
 
void setData (epics::pvData::MonitorElementPtr const &monitorElement)
 
 POINTER_DEFINITIONS (PvaClientData)
 
void setMessagePrefix (std::string const &value)
 Set a prefix for throw messages. More...
 
epics::pvData::StructureConstPtr getStructure ()
 Get the structure. More...
 
epics::pvData::PVStructurePtr getPVStructure ()
 Get the pvStructure. More...
 
epics::pvData::BitSetPtr getChangedBitSet ()
 Get the changed BitSet for the pvStructure. More...
 
std::ostream & showChanged (std::ostream &out)
 Show the fields that have changed value since the last get. More...
 
void setData (epics::pvData::PVStructurePtr const &pvStructureFrom, epics::pvData::BitSetPtr const &bitSetFrom)
 New data is present. More...
 
bool hasValue ()
 Is there a top level field named value. More...
 
bool isValueScalar ()
 Is the value field a scalar? More...
 
bool isValueScalarArray ()
 Is the value field a scalar array? More...
 
epics::pvData::PVFieldPtr getValue ()
 Get the interface to the value field. More...
 
epics::pvData::PVScalarPtr getScalarValue ()
 Return the interface to a scalar value field. More...
 
std::tr1::shared_ptr< epics::pvData::PVArray > getArrayValue ()
 Get the interface to an array value field. More...
 
std::tr1::shared_ptr< epics::pvData::PVScalarArray > getScalarArrayValue ()
 Get the interface to a scalar array value field. More...
 
double getDouble ()
 Get the value as a double. More...
 
std::string getString ()
 
epics::pvData::shared_vector< const double > getDoubleArray ()
 Get the value as a double array. More...
 
epics::pvData::shared_vector< const std::string > getStringArray ()
 Get the value as a string array. More...
 
epics::pvData::Alarm getAlarm ()
 Get the alarm. If the pvStructure has an alarm field it's values are returned. Otherwise an exception is thrown. More...
 
epics::pvData::TimeStamp getTimeStamp ()
 Get the timeStamp. If the pvStructure has a timeStamp field, it's values are returned. Otherwise an exception is thrown. More...
 
void parse (const std::vector< std::string > &args)
 parse from args More...
 
void streamJSON (std::ostream &strm, bool ignoreUnprintable=true, bool multiLine=false)
 generate JSON output from the current PVStructure and displays it on the output stream. More...
 
void zeroArrayLength ()
 set length of all array fields to 0 More...
 

Static Public Member Functions

static PvaClientMonitorDataPtr create (epics::pvData::StructureConstPtr const &structure)
 

Protected Member Functions

epics::pvData::PVFieldPtr getSinglePVField ()
 
void checkValue ()
 

Protected Attributes

std::string messagePrefix
 

Friends

class PvaClientMonitor
 

Detailed Description

A class that holds data returned by PvaClientMonitor.

Definition at line 787 of file pvaClient.h.

Constructor & Destructor Documentation

◆ ~PvaClientMonitorData()

epics::pvaClient::PvaClientMonitorData::~PvaClientMonitorData ( )
inline

Destructor.

Definition at line 794 of file pvaClient.h.

Member Function Documentation

◆ checkValue()

void epics::pvaClient::PvaClientData::checkValue ( )
protectedinherited

◆ create()

PvaClientMonitorDataPtr epics::pvaClient::PvaClientMonitorData::create ( epics::pvData::StructureConstPtr const &  structure)
static

Factory method for creating an instance of PvaClientGetData. NOTE: Not normally called by clients

Parameters
structureIntrospection interface

Definition at line 48 of file pvaClientMonitorData.cpp.

◆ getAlarm()

Alarm epics::pvaClient::PvaClientData::getAlarm ( )
inherited

Get the alarm. If the pvStructure has an alarm field it's values are returned. Otherwise an exception is thrown.

Returns
The alarm.
Exceptions
runtime_errorif failure.

Definition at line 270 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug(), and epics::pvaClient::PvaClientData::messagePrefix.

◆ getArrayValue()

PVArrayPtr epics::pvaClient::PvaClientData::getArrayValue ( )
inherited

Get the interface to an array value field.

Returns
The interface.
Exceptions
runtime_errorif failure.

Definition at line 182 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::checkValue(), epics::pvaClient::PvaClient::getDebug(), and epics::pvaClient::PvaClientData::messagePrefix.

◆ getChangedBitSet()

BitSetPtr epics::pvaClient::PvaClientData::getChangedBitSet ( )
inherited

Get the changed BitSet for the pvStructure.

This shows which fields have changed value since the last get.

Returns
The bitSet
Exceptions
runtime_errorif failure

Definition at line 107 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::messagePrefix.

◆ getDouble()

double epics::pvaClient::PvaClientData::getDouble ( )
inherited

Get the value as a double.

Returns
The value.
Exceptions
runtime_errorif failure.

Definition at line 204 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug(), and epics::pvaClient::PvaClientData::getSinglePVField().

◆ getDoubleArray()

shared_vector< const double > epics::pvaClient::PvaClientData::getDoubleArray ( )
inherited

Get the value as a double array.

Returns
The value.
Exceptions
runtime_errorif failure.

Definition at line 237 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug(), and epics::pvaClient::PvaClientData::getSinglePVField().

◆ getOverrunBitSet()

BitSetPtr epics::pvaClient::PvaClientMonitorData::getOverrunBitSet ( )

Get the overrun BitSet for the pvStructure This shows which fields have had more than one change.

Returns
The bitSet
Exceptions
runtime_errorif failure.

Definition at line 67 of file pvaClientMonitorData.cpp.

◆ getPVStructure()

PVStructurePtr epics::pvaClient::PvaClientData::getPVStructure ( )
inherited

Get the pvStructure.

Returns
the pvStructure.
Exceptions
runtime_errorif failure.

Definition at line 101 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::messagePrefix.

Referenced by epics::pvaClient::PvaClientData::getSinglePVField().

◆ getScalarArrayValue()

PVScalarArrayPtr epics::pvaClient::PvaClientData::getScalarArrayValue ( )
inherited

Get the interface to a scalar array value field.

Returns
Return the interface.
Exceptions
runtime_errorif failure.

Definition at line 193 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::checkValue(), epics::pvaClient::PvaClient::getDebug(), and epics::pvaClient::PvaClientData::messagePrefix.

◆ getScalarValue()

PVScalarPtr epics::pvaClient::PvaClientData::getScalarValue ( )
inherited

Return the interface to a scalar value field.

Returns
The interface for a scalar value field.
Exceptions
runtime_errorif failure.

Definition at line 172 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::checkValue(), epics::pvaClient::PvaClient::getDebug(), and epics::pvaClient::PvaClientData::messagePrefix.

◆ getSinglePVField()

PVFieldPtr epics::pvaClient::PvaClientData::getSinglePVField ( )
protectedinherited

◆ getString()

string epics::pvaClient::PvaClientData::getString ( )
inherited

Get the value as a string.

Returns
The value.
Exceptions
runtime_errorif failure.

Definition at line 225 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug(), and epics::pvaClient::PvaClientData::getSinglePVField().

◆ getStringArray()

shared_vector< const string > epics::pvaClient::PvaClientData::getStringArray ( )
inherited

Get the value as a string array.

Returns
The value.
Exceptions
runtime_errorif failure.

Definition at line 256 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug(), and epics::pvaClient::PvaClientData::getSinglePVField().

◆ getStructure()

StructureConstPtr epics::pvaClient::PvaClientData::getStructure ( )
inherited

Get the structure.

Returns
The Structure
Exceptions
runtime_errorif failure.

Definition at line 96 of file pvaClientData.cpp.

◆ getTimeStamp()

TimeStamp epics::pvaClient::PvaClientData::getTimeStamp ( )
inherited

Get the timeStamp. If the pvStructure has a timeStamp field, it's values are returned. Otherwise an exception is thrown.

Returns
The timeStamp.

Definition at line 286 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug(), and epics::pvaClient::PvaClientData::messagePrefix.

◆ getValue()

PVFieldPtr epics::pvaClient::PvaClientData::getValue ( )
inherited

Get the interface to the value field.

Returns
The interface.
Exceptions
runtime_errorif failure.

Definition at line 165 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::checkValue(), and epics::pvaClient::PvaClient::getDebug().

◆ hasValue()

bool epics::pvaClient::PvaClientData::hasValue ( )
inherited

Is there a top level field named value.

Returns
The answer.

Definition at line 142 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug().

◆ isValueScalar()

bool epics::pvaClient::PvaClientData::isValueScalar ( )
inherited

Is the value field a scalar?

Returns
The answer.

Definition at line 149 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug().

◆ isValueScalarArray()

bool epics::pvaClient::PvaClientData::isValueScalarArray ( )
inherited

Is the value field a scalar array?

Returns
The answer.

Definition at line 157 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug().

◆ parse()

void epics::pvaClient::PvaClientData::parse ( const std::vector< std::string > &  args)
inherited

parse from args

Accepts arguments of the form json or field='value' where value is json syntax. field is name.name...

Parameters
argsThe arguments.
Exceptions
runtime_errorif failure.

Definition at line 345 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::messagePrefix.

Referenced by epics::pvaClient::PvaClientData::zeroArrayLength().

◆ POINTER_DEFINITIONS() [1/2]

epics::pvaClient::PvaClientData::POINTER_DEFINITIONS ( PvaClientData  )
inherited

◆ POINTER_DEFINITIONS() [2/2]

epics::pvaClient::PvaClientMonitorData::POINTER_DEFINITIONS ( PvaClientMonitorData  )

◆ setData() [1/2]

void epics::pvaClient::PvaClientData::setData ( epics::pvData::PVStructurePtr const &  pvStructureFrom,
epics::pvData::BitSetPtr const &  bitSetFrom 
)
inherited

New data is present.

This is called by other pvaClient classes, i. e. not by client.

Parameters
pvStructureFromThe new data.
bitSetFromthe bitSet showing which values have changed.

Definition at line 131 of file pvaClientData.cpp.

References epics::pvaClient::PvaClient::getDebug().

◆ setData() [2/2]

void epics::pvaClient::PvaClientMonitorData::setData ( epics::pvData::MonitorElementPtr const &  monitorElement)

Put data into PVStructure from monitorElement NOTE: Not normally called by clients

Parameters
monitorElementthe monitorElement that has new data.

Definition at line 59 of file pvaClientMonitorData.cpp.

◆ setMessagePrefix()

void epics::pvaClient::PvaClientData::setMessagePrefix ( std::string const &  value)
inherited

Set a prefix for throw messages.

This is called by other pvaClient classes.

Parameters
valueThe prefix.

Definition at line 91 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::messagePrefix.

◆ showChanged()

std::ostream & epics::pvaClient::PvaClientData::showChanged ( std::ostream &  out)
inherited

Show the fields that have changed value since the last get.

Parameters
outThe stream that shows the changed fields.
Returns
The stream that was passed as out.

Definition at line 113 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::messagePrefix.

◆ showOverrun()

std::ostream & epics::pvaClient::PvaClientMonitorData::showOverrun ( std::ostream &  out)

Show the fields that have changed.

Parameters
outThe stream that shows the changed fields.
Returns
The stream that was passed as out.

Definition at line 73 of file pvaClientMonitorData.cpp.

◆ streamJSON()

void epics::pvaClient::PvaClientData::streamJSON ( std::ostream &  strm,
bool  ignoreUnprintable = true,
bool  multiLine = false 
)
inherited

generate JSON output from the current PVStructure and displays it on the output stream.

Parameters
strmThe output stream.
ignoreUnprintablefalse or true; The default is true.
multilinefalse or true; The default is false.
Exceptions
runtime_errorif failure.

Definition at line 392 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::zeroArrayLength().

◆ zeroArrayLength()

void epics::pvaClient::PvaClientData::zeroArrayLength ( )
inherited

set length of all array fields to 0

Definition at line 302 of file pvaClientData.cpp.

References epics::pvaClient::PvaClientData::messagePrefix, and epics::pvaClient::PvaClientData::parse().

Referenced by epics::pvaClient::PvaClientData::streamJSON().

Friends And Related Function Documentation

◆ PvaClientMonitor

friend class PvaClientMonitor
friend

Definition at line 820 of file pvaClient.h.

Member Data Documentation

◆ messagePrefix

std::string epics::pvaClient::PvaClientData::messagePrefix
protectedinherited

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