This is Unofficial EPICS BASE Doxygen Site
epics::pvData Namespace Reference

pvData More...

Namespaces

 detail
 
 format
 
 meta
 
 ScalarTypeFunc
 Convenience functions for ScalarType.
 
 TypeFunc
 Convenience functions for Type.
 
 yajl
 

Classes

class  Alarm
 Methods for manipulating alarm. More...
 
class  AlarmSeverityFunc
 methods for AlarmSeverity More...
 
class  AlarmStatusFunc
 methods for AlarmStatus More...
 
class  AnyScalar
 
class  Array
 This class implements introspection object for Array. More...
 
class  BaseException
 Base for pvData exceptions. More...
 
class  BitSet
 A vector of bits. More...
 
class  BitSetSerializable
 Class for serializing bitSets. More...
 
class  BitSetUtil
 Compress a bitSet. More...
 
class  BoundedScalarArray
 This class implements introspection object for bounded scalar array. More...
 
class  BoundedString
 This class implements introspection object for BoundedString. More...
 
class  ByteBuffer
 This class implements a Bytebuffer that is like the java.nio.ByteBuffer. More...
 
class  Control
 Methods for a control structure. More...
 
class  Convert
 Conversion and Copy facility for pvData. More...
 
class  CreateRequest
 Create pvRequest structure for Channel methods. More...
 
class  DeserializableControl
 Callback class for deserialization. More...
 
class  Display
 Methods for a display structure. More...
 
struct  escape
 
class  Event
 C++ wrapper for epicsEvent from EPICS base. More...
 
class  ExceptionMixin
 
class  Field
 This class implements introspection object for field. More...
 
class  FieldBuilder
 Interface for in-line creating of introspection interfaces. More...
 
class  FieldCreate
 This is a singleton class for creating introspection interfaces. More...
 
class  FixedScalarArray
 This class implements introspection object for bounded scalar array. More...
 
struct  JSONPrintOptions
 Options used during printing. More...
 
class  Lock
 A lock for multithreading. More...
 
class  NoDefaultMethods
 Base class for not allowing default methods. More...
 
class  PostHandler
 This class is implemented by code that calls setPostHander. More...
 
class  PVAlarm
 Methods for accessing an alarm structure. More...
 
class  PVArray
 PVArray is the base class for all array types. More...
 
class  PVControl
 Methods for accessing an control structure. More...
 
class  PVDataCreate
 This is a singleton class for creating data instances. More...
 
struct  PVDataVersion
 
class  PVDisplay
 Methods for accessing an display structure. More...
 
class  PVEnumerated
 Methods for accessing an enumerated structure. More...
 
class  PVField
 PVField is the base class for each PVData field. More...
 
class  PVRequestMapper
 
class  PVScalar
 PVScalar is the base class for each scalar field. More...
 
class  PVScalarArray
 Base class for a scalarArray. More...
 
class  PVScalarValue
 Class that holds the data for each possible scalar type. More...
 
class  PVString
 PVString is special case, since it implements SerializableArray. More...
 
class  PVStructure
 Data interface for a structure,. More...
 
class  PVTimeStamp
 Methods for accessing a timeStamp structure. More...
 
class  PVUnion
 PVUnion has a single subfield. More...
 
class  PVValueArray
 template class for all extensions of PVArray. More...
 
class  PVValueArray< PVStructurePtr >
 Data class for a structureArray. More...
 
class  PVValueArray< PVUnionPtr >
 Data class for a unionArray. More...
 
class  Scalar
 This class implements introspection object for Scalar. More...
 
class  ScalarArray
 This class implements introspection object for scalar array. More...
 
struct  ScalarTypeID
 
struct  ScalarTypeTraits
 
class  Serializable
 Base class for serialization. More...
 
class  SerializableArray
 Class for serializing arrays. More...
 
class  SerializableControl
 Callback class for serialization. More...
 
class  SerializeHelper
 Serialization helper. More...
 
class  shared_vector
 A holder for a contiguous piece of memory. More...
 
class  shared_vector< E, typename meta::is_void< E >::type >
 Specialization for storing untyped pointers. More...
 
class  StandardField
 Standard Fields is a class or creating or sharing Field objects for standard fields. More...
 
class  StandardPVField
 StandardPVField is a class or creating standard data fields. More...
 
class  Status
 Status. More...
 
class  Structure
 This class implements introspection object for a structure. More...
 
class  StructureArray
 This class implements introspection object for a structureArray. More...
 
class  Thread
 C++ wrapper for epicsThread from EPICS base. More...
 
class  Timer
 Support for delayed or periodic callback execution. More...
 
class  TimerCallback
 Class that must be implemented by code that makes Timer requests. More...
 
class  TimeStamp
 Methods for manipulating timeStamp. More...
 
class  Union
 This class implements introspection object for a union. More...
 
class  UnionArray
 This class implements introspection object for a unionArray. More...
 
class  ValueBuilder
 

Typedefs

typedef ::epics::pvAccess::Destroyable Destroyable EPICS_DEPRECATED
 
typedef std::tr1::shared_ptr< BitSetBitSetPtr
 
typedef std::tr1::shared_ptr< EventEventPtr
 
typedef epicsMutex Mutex
 
typedef std::tr1::shared_ptr< ThreadThreadPtr
 
typedef std::tr1::shared_ptr< epicsThread > EpicsThreadPtr
 
typedef epicsThreadRunable Runnable
 
typedef std::tr1::shared_ptr< TimerCallbackTimerCallbackPtr
 
typedef std::tr1::shared_ptr< TimerTimerPtr
 
typedef std::tr1::shared_ptr< ConvertConvertPtr
 
typedef std::tr1::shared_ptr< PostHandlerPostHandlerPtr
 
typedef std::tr1::shared_ptr< PVFieldPVFieldPtr
 
typedef std::vector< PVFieldPtrPVFieldPtrArray
 
typedef std::vector< PVFieldPtr >::iterator PVFieldPtrArray_iterator
 
typedef std::vector< PVFieldPtr >::const_iterator PVFieldPtrArray_const__iterator
 
typedef std::tr1::shared_ptr< PVScalarPVScalarPtr
 
typedef std::tr1::shared_ptr< PVScalarArrayPVScalarArrayPtr
 
typedef std::tr1::shared_ptr< PVStructurePVStructurePtr
 
typedef std::vector< PVStructurePtrPVStructurePtrArray
 
typedef std::vector< PVStructurePtr >::iterator PVStructurePtrArray_iterator
 
typedef std::vector< PVStructurePtr >::const_iterator PVStructurePtrArray_const__iterator
 
typedef PVValueArray< PVStructurePtrPVStructureArray
 
typedef std::tr1::shared_ptr< PVStructureArrayPVStructureArrayPtr
 
typedef std::vector< PVStructureArrayPtrPVStructureArrayPtrArray
 
typedef std::tr1::shared_ptr< PVStructureArrayPtrArrayPVStructureArrayPtrArrayPtr
 
typedef std::tr1::shared_ptr< PVUnionPVUnionPtr
 
typedef std::vector< PVUnionPtrPVUnionPtrArray
 
typedef std::vector< PVUnionPtr >::iterator PVUnionPtrArray_iterator
 
typedef std::vector< PVUnionPtr >::const_iterator PVUnionPtrArray_const__iterator
 
typedef PVValueArray< PVUnionPtrPVUnionArray
 
typedef std::tr1::shared_ptr< PVUnionArrayPVUnionArrayPtr
 
typedef std::vector< PVUnionArrayPtrPVUnionArrayPtrArray
 
typedef std::tr1::shared_ptr< PVUnionArrayPtrArrayPVUnionArrayPtrArrayPtr
 
typedef std::tr1::shared_ptr< PVDataCreatePVDataCreatePtr
 
typedef PVScalarValue< booleanPVBoolean
 
typedef PVScalarValue< int8PVByte
 
typedef PVScalarValue< int16PVShort
 
typedef PVScalarValue< int32PVInt
 
typedef PVScalarValue< int64PVLong
 
typedef PVScalarValue< uint8PVUByte
 
typedef PVScalarValue< uint16PVUShort
 
typedef PVScalarValue< uint32PVUInt
 
typedef PVScalarValue< uint64PVULong
 
typedef PVScalarValue< float > PVFloat
 
typedef PVScalarValue< double > PVDouble
 
typedef std::tr1::shared_ptr< PVBooleanPVBooleanPtr
 
typedef std::tr1::shared_ptr< PVBytePVBytePtr
 
typedef std::tr1::shared_ptr< PVShortPVShortPtr
 
typedef std::tr1::shared_ptr< PVIntPVIntPtr
 
typedef std::tr1::shared_ptr< PVLongPVLongPtr
 
typedef std::tr1::shared_ptr< PVUBytePVUBytePtr
 
typedef std::tr1::shared_ptr< PVUShortPVUShortPtr
 
typedef std::tr1::shared_ptr< PVUIntPVUIntPtr
 
typedef std::tr1::shared_ptr< PVULongPVULongPtr
 
typedef std::tr1::shared_ptr< PVFloatPVFloatPtr
 
typedef std::tr1::shared_ptr< PVDoublePVDoublePtr
 
typedef std::tr1::shared_ptr< PVStringPVStringPtr
 
typedef PVValueArray< booleanPVBooleanArray
 
typedef std::tr1::shared_ptr< PVBooleanArrayPVBooleanArrayPtr
 
typedef PVValueArray< int8PVByteArray
 
typedef std::tr1::shared_ptr< PVByteArrayPVByteArrayPtr
 
typedef PVValueArray< int16PVShortArray
 
typedef std::tr1::shared_ptr< PVShortArrayPVShortArrayPtr
 
typedef PVValueArray< int32PVIntArray
 
typedef std::tr1::shared_ptr< PVIntArrayPVIntArrayPtr
 
typedef PVValueArray< int64PVLongArray
 
typedef std::tr1::shared_ptr< PVLongArrayPVLongArrayPtr
 
typedef PVValueArray< uint8PVUByteArray
 
typedef std::tr1::shared_ptr< PVUByteArrayPVUByteArrayPtr
 
typedef PVValueArray< uint16PVUShortArray
 
typedef std::tr1::shared_ptr< PVUShortArrayPVUShortArrayPtr
 
typedef PVValueArray< uint32PVUIntArray
 
typedef std::tr1::shared_ptr< PVUIntArrayPVUIntArrayPtr
 
typedef PVValueArray< uint64PVULongArray
 
typedef std::tr1::shared_ptr< PVULongArrayPVULongArrayPtr
 
typedef PVValueArray< float > PVFloatArray
 
typedef std::tr1::shared_ptr< PVFloatArrayPVFloatArrayPtr
 
typedef PVValueArray< double > PVDoubleArray
 
typedef std::tr1::shared_ptr< PVDoubleArrayPVDoubleArrayPtr
 
typedef PVValueArray< std::string > PVStringArray
 
typedef std::tr1::shared_ptr< PVStringArrayPVStringArrayPtr
 
typedef std::tr1::shared_ptr< const FieldFieldConstPtr
 
typedef std::vector< FieldConstPtrFieldConstPtrArray
 
typedef std::tr1::shared_ptr< const ScalarScalarConstPtr
 
typedef std::tr1::shared_ptr< const ArrayArrayConstPtr
 
typedef std::tr1::shared_ptr< const ScalarArrayScalarArrayConstPtr
 
typedef std::tr1::shared_ptr< const StructureStructureConstPtr
 
typedef std::tr1::shared_ptr< const StructureArrayStructureArrayConstPtr
 
typedef std::tr1::shared_ptr< const UnionUnionConstPtr
 
typedef std::tr1::shared_ptr< const UnionArrayUnionArrayConstPtr
 
typedef std::tr1::shared_ptr< const BoundedStringBoundedStringConstPtr
 
typedef std::tr1::shared_ptr< FieldCreateFieldCreatePtr
 
typedef std::tr1::shared_ptr< FieldBuilderFieldBuilderPtr
 
typedef detail::pick_type< int8_t, signed char, detail::pick_type< uint8_t, char, unsigned char >::type >::type boolean
 
typedef int8_t int8
 
typedef int16_t int16
 
typedef int32_t int32
 
typedef int64_t int64
 
typedef uint8_t uint8
 
typedef uint16_t uint16
 
typedef uint32_t uint32
 
typedef uint64_t uint64
 
typedef std::vector< std::string > StringArray
 
typedef std::tr1::shared_ptr< StringArrayStringArrayPtr
 
typedef std::vector< std::string >::iterator StringArray_iterator
 
typedef std::vector< std::string >::const_iterator StringArray_const_iterator
 
typedef std::tr1::shared_ptr< StandardFieldStandardFieldPtr
 
typedef std::tr1::shared_ptr< StandardPVFieldStandardPVFieldPtr
 

Enumerations

enum  DebugLevel { noDebug, lowDebug, highDebug }
 
enum  ThreadPriority {
  lowestPriority =epicsThreadPriorityLow, lowerPriority =epicsThreadPriorityLow + 15, lowPriority =epicsThreadPriorityMedium - 15, middlePriority =epicsThreadPriorityMedium,
  highPriority =epicsThreadPriorityMedium + 15, higherPriority =epicsThreadPriorityHigh - 15, highestPriority =epicsThreadPriorityHigh
}
 
enum  AlarmSeverity {
  noAlarm, minorAlarm, majorAlarm, invalidAlarm,
  undefinedAlarm
}
 enum definition of AlarmSeverity More...
 
enum  AlarmStatus {
  noStatus, deviceStatus, driverStatus, recordStatus,
  dbStatus, confStatus, undefinedStatus, clientStatus
}
 enum definition of AlarmStatus More...
 
enum  Type {
  scalar, scalarArray, structure, structureArray,
  union_, unionArray
}
 
enum  ScalarType {
  pvBoolean, pvByte, pvShort, pvInt,
  pvLong, pvUByte, pvUShort, pvUInt,
  pvULong, pvFloat, pvDouble, pvString
}
 

Functions

PVStructure::shared_pointer createRequest (std::string const &request)
 
bool compare (const Field &a, const Field &b)
 
bool compare (const Scalar &a, const Scalar &b)
 
bool compare (const ScalarArray &a, const ScalarArray &b)
 
bool compare (const Structure &a, const Structure &b)
 
bool compare (const StructureArray &a, const StructureArray &b)
 
bool compare (const Union &a, const Union &b)
 
bool compare (const UnionArray &a, const UnionArray &b)
 
bool compare (const BoundedString &a, const BoundedString &b)
 
bool operator== (const PVField &left, const PVField &right)
 
std::ostream & operator<< (std::ostream &o, const Field &f)
 
void printRaw (std::ostream &strm, const PVStructure::Formatter &format, const PVStructure &cur)
 
std::ostream & operator<< (std::ostream &strm, const PVStructure::Formatter &format)
 
epicsShareFunc std::ostream & operator<< (std::ostream &strm, const escape &Q)
 
std::ostream & operator<< (format::array_at_internal const &manip, const PVArray &array)
 
std::ostream & operator<< (std::ostream &o, const PVField &f)
 
template<typename T >
void copy (PVValueArray< T > &pvFrom, size_t fromOffset, size_t fromStride, PVValueArray< T > &pvTo, size_t toOffset, size_t toStride, size_t count)
 Copy a subarray from one scalar array to another. More...
 
void copy (PVScalarArray &pvFrom, size_t fromOffset, size_t fromStride, PVScalarArray &pvTo, size_t toOffset, size_t toStride, size_t count)
 Copy a subarray from one scalar array to another. More...
 
void copy (PVStructureArray &pvFrom, size_t fromOffset, size_t fromStride, PVStructureArray &pvTo, size_t toOffset, size_t toStride, size_t count)
 Copy a subarray from one structure array to another. More...
 
void copy (PVUnionArray &pvFrom, size_t pvFromOffset, size_t pvFromStride, PVUnionArray &pvTo, size_t toOffset, size_t toStride, size_t count)
 
void copy (PVArray &pvFrom, size_t fromOffset, size_t fromStride, PVArray &pvTo, size_t toOffset, size_t toStride, size_t count)
 Copy a subarray from one array to another. More...
 
void copy (PVArray::shared_pointer const &pvFrom, size_t fromOffset, size_t fromStride, PVArray::shared_pointer &pvTo, size_t toOffset, size_t toStride, size_t count)
 Copy a subarray from one array to another. More...
 
StandardPVFieldPtr getStandardPVField ()
 
std::ostream & operator<< (std::ostream &o, const Type &type)
 
std::ostream & operator<< (std::ostream &o, const ScalarType &scalarType)
 
epics::pvData::PVStructure::shared_pointer parseJSON (std::istream &strm)
 
bool yajl_parse_helper (std::istream &src, yajl_handle handle)
 
epicsShareFunc void parseJSON (std::istream &strm, PVField &dest, BitSet *assigned)
 
void printJSON (std::ostream &strm, const PVStructure &val, const BitSet &mask, const JSONPrintOptions &opts)
 
void printJSON (std::ostream &strm, const PVField &val, const JSONPrintOptions &opts)
 
FORCE_INLINE void printJSON (std::ostream &strm, const PVField::const_shared_pointer &val, const JSONPrintOptions &opts=JSONPrintOptions())
 
FORCE_INLINE void parseJSON (std::istream &strm, const PVField::shared_pointer &dest, BitSet *assigned=0)
 
std::ostream & operator<< (std::ostream &strm, const AnyScalar &v)
 
epicsShareExtern std::ostream & operator<< (std::ostream &o, const BitSet &b)
 
template<typename T >
EPICS_ALWAYS_INLINEswap (T val)
 
void epicsShareFunc serializeToVector (const Serializable *S, int byteOrder, std::vector< epicsUInt8 > &out)
 Push serialize and append to the provided byte vector. No caching is done. Only complete serialization. More...
 
void epicsShareFunc deserializeFromBuffer (Serializable *S, ByteBuffer &in)
 deserializeFromBuffer Deserialize into S from provided vector More...
 
void deserializeFromVector (Serializable *S, int byteOrder, const std::vector< epicsUInt8 > &in)
 deserializeFromBuffer Deserialize into S from provided vector More...
 
FORCE_INLINE std::ostream & operator<< (std::ostream &o, const Status &status)
 
FORCE_INLINE std::ostream & operator<< (std::ostream &o, const Status::StatusType &statusType)
 
epicsShareExtern std::ostream & operator<< (std::ostream &o, const Timer &timer)
 
epicsShareExtern void castUnsafeV (size_t count, ScalarType to, void *dest, ScalarType from, const void *src)
 
FORCE_INLINE const PVDataCreatePtrgetPVDataCreate ()
 
void getVersion (epics::pvData::PVDataVersion *ptr)
 
FORCE_INLINE const FieldCreatePtrgetFieldCreate ()
 
template<typename T >
epicsShareExtern void copy (PVValueArray< T > &pvFrom, size_t fromOffset, size_t fromStride, PVValueArray< T > &pvTo, size_t toOffset, size_t toStride, size_t count)
 Copy a subarray from one scalar array to another. More...
 
std::string * get (StringArray &value)
 
std::string const * get (StringArray const &value)
 
std::string * get (StringArrayPtr &value)
 
std::string const * get (StringArrayPtr const &value)
 
StringArraygetVector (StringArrayPtr &value)
 
StringArray const & getVector (StringArrayPtr const &value)
 
FORCE_INLINE const StandardFieldPtrgetStandardField ()
 

Variables

epicsShareExtern const int32 milliSecPerSec = 1000
 
epicsShareExtern const int32 microSecPerSec = 1000000
 
epicsShareExtern const int32 nanoSecPerSec = 1000000000
 
epicsShareExtern const int64 posixEpochAtEpicsEpoch = POSIX_TIME_AT_EPICS_EPOCH
 

Detailed Description

Typedef Documentation

typedef std::tr1::shared_ptr<const Array> epics::pvData::ArrayConstPtr

typedef for a shared pointer to an immutable Array.

Definition at line 154 of file pvIntrospect.h.

typedef std::tr1::shared_ptr<BitSet> epics::pvData::BitSetPtr

Definition at line 26 of file bitSet.h.

typedef detail::pick_type<int8_t, signed char, detail::pick_type<uint8_t, char, unsigned char>::type >::type epics::pvData::boolean

This is a set of typedefs used by pvData. boolean, i.e. can only have the values false or true

Definition at line 71 of file pvType.h.

typedef std::tr1::shared_ptr<const BoundedString> epics::pvData::BoundedStringConstPtr

typedef for a shared pointer to an immutable BoundedString.

Definition at line 178 of file pvIntrospect.h.

typedef std::tr1::shared_ptr<Convert> epics::pvData::ConvertPtr

Definition at line 23 of file convert.h.

Definition at line 61 of file destroyable.h.

typedef std::tr1::shared_ptr<epicsThread> epics::pvData::EpicsThreadPtr

Definition at line 41 of file thread.h.

typedef std::tr1::shared_ptr<Event> epics::pvData::EventPtr

Definition at line 24 of file event.h.

typedef std::tr1::shared_ptr<FieldBuilder> epics::pvData::FieldBuilderPtr

Definition at line 1062 of file pvIntrospect.h.

typedef std::tr1::shared_ptr<const Field> epics::pvData::FieldConstPtr

typedef for a shared pointer to an immutable Field.

Definition at line 137 of file pvIntrospect.h.

typedef for an array of shared pointer to an immutable Field.

Definition at line 146 of file pvIntrospect.h.

typedef std::tr1::shared_ptr<FieldCreate> epics::pvData::FieldCreatePtr

Definition at line 1059 of file pvIntrospect.h.

typedef int16_t epics::pvData::int16

A 16 bit signed integer

Definition at line 79 of file pvType.h.

typedef int32_t epics::pvData::int32

A 32 bit signed integer

Definition at line 83 of file pvType.h.

typedef int64_t epics::pvData::int64

A 64 bit signed integer

Definition at line 87 of file pvType.h.

typedef int8_t epics::pvData::int8

A 8 bit signed integer

Definition at line 75 of file pvType.h.

typedef epicsMutex epics::pvData::Mutex

Definition at line 28 of file lock.h.

typedef std::tr1::shared_ptr<PostHandler> epics::pvData::PostHandlerPtr

typedef for a pointer to a PostHandler.

Definition at line 55 of file pvData.h.

Definition at line 493 of file pvData.h.

Definitions for the various scalarArray types.

Definition at line 1430 of file pvData.h.

typedef std::tr1::shared_ptr<PVBooleanArray> epics::pvData::PVBooleanArrayPtr

Definition at line 1431 of file pvData.h.

typedef std::tr1::shared_ptr<PVBoolean> epics::pvData::PVBooleanPtr

Definition at line 504 of file pvData.h.

Definition at line 494 of file pvData.h.

Definition at line 1433 of file pvData.h.

typedef std::tr1::shared_ptr<PVByteArray> epics::pvData::PVByteArrayPtr

Definition at line 1434 of file pvData.h.

typedef std::tr1::shared_ptr<PVByte> epics::pvData::PVBytePtr

Definition at line 505 of file pvData.h.

typedef std::tr1::shared_ptr<PVDataCreate> epics::pvData::PVDataCreatePtr

Definition at line 124 of file pvData.h.

Definition at line 503 of file pvData.h.

Definition at line 1460 of file pvData.h.

typedef std::tr1::shared_ptr<PVDoubleArray> epics::pvData::PVDoubleArrayPtr

Definition at line 1461 of file pvData.h.

typedef std::tr1::shared_ptr<PVDouble> epics::pvData::PVDoublePtr

Definition at line 514 of file pvData.h.

typedef std::tr1::shared_ptr<PVField> epics::pvData::PVFieldPtr

typedef for a pointer to a PVField.

Definition at line 66 of file pvData.h.

typedef for a pointer to a array of pointer to PVField.

Definition at line 70 of file pvData.h.

typedef std::vector<PVFieldPtr>::const_iterator epics::pvData::PVFieldPtrArray_const__iterator

Definition at line 72 of file pvData.h.

typedef std::vector<PVFieldPtr>::iterator epics::pvData::PVFieldPtrArray_iterator

Definition at line 71 of file pvData.h.

Definition at line 502 of file pvData.h.

Definition at line 1457 of file pvData.h.

typedef std::tr1::shared_ptr<PVFloatArray> epics::pvData::PVFloatArrayPtr

Definition at line 1458 of file pvData.h.

typedef std::tr1::shared_ptr<PVFloat> epics::pvData::PVFloatPtr

Definition at line 513 of file pvData.h.

Definition at line 496 of file pvData.h.

Definition at line 1439 of file pvData.h.

typedef std::tr1::shared_ptr<PVIntArray> epics::pvData::PVIntArrayPtr

Definition at line 1440 of file pvData.h.

typedef std::tr1::shared_ptr<PVInt> epics::pvData::PVIntPtr

Definition at line 507 of file pvData.h.

Definition at line 497 of file pvData.h.

Definition at line 1442 of file pvData.h.

typedef std::tr1::shared_ptr<PVLongArray> epics::pvData::PVLongArrayPtr

Definition at line 1443 of file pvData.h.

typedef std::tr1::shared_ptr<PVLong> epics::pvData::PVLongPtr

Definition at line 508 of file pvData.h.

typedef std::tr1::shared_ptr<PVScalarArray> epics::pvData::PVScalarArrayPtr

typedef for a pointer to a PVScalarArray.

Definition at line 82 of file pvData.h.

typedef std::tr1::shared_ptr<PVScalar> epics::pvData::PVScalarPtr

typedef for a pointer to a PVScalar.

Definition at line 77 of file pvData.h.

Definition at line 495 of file pvData.h.

Definition at line 1436 of file pvData.h.

typedef std::tr1::shared_ptr<PVShortArray> epics::pvData::PVShortArrayPtr

Definition at line 1437 of file pvData.h.

typedef std::tr1::shared_ptr<PVShort> epics::pvData::PVShortPtr

Definition at line 506 of file pvData.h.

Definition at line 1463 of file pvData.h.

typedef std::tr1::shared_ptr<PVStringArray> epics::pvData::PVStringArrayPtr

Definition at line 1464 of file pvData.h.

typedef std::tr1::shared_ptr<PVString> epics::pvData::PVStringPtr

Definition at line 540 of file pvData.h.

typedef for a pointer to a PVStructureArray.

Definition at line 99 of file pvData.h.

Definition at line 100 of file pvData.h.

Definition at line 101 of file pvData.h.

Definition at line 102 of file pvData.h.

typedef std::tr1::shared_ptr<PVStructure> epics::pvData::PVStructurePtr

typedef for a pointer to a PVStructure.

Definition at line 87 of file pvData.h.

typedef for a pointer to a array of pointer to PVStructure.

Definition at line 91 of file pvData.h.

Definition at line 93 of file pvData.h.

Definition at line 92 of file pvData.h.

Definition at line 498 of file pvData.h.

Definition at line 1445 of file pvData.h.

typedef std::tr1::shared_ptr<PVUByteArray> epics::pvData::PVUByteArrayPtr

Definition at line 1446 of file pvData.h.

typedef std::tr1::shared_ptr<PVUByte> epics::pvData::PVUBytePtr

Definition at line 509 of file pvData.h.

Definition at line 500 of file pvData.h.

Definition at line 1451 of file pvData.h.

typedef std::tr1::shared_ptr<PVUIntArray> epics::pvData::PVUIntArrayPtr

Definition at line 1452 of file pvData.h.

typedef std::tr1::shared_ptr<PVUInt> epics::pvData::PVUIntPtr

Definition at line 511 of file pvData.h.

Definition at line 501 of file pvData.h.

Definition at line 1454 of file pvData.h.

typedef std::tr1::shared_ptr<PVULongArray> epics::pvData::PVULongArrayPtr

Definition at line 1455 of file pvData.h.

typedef std::tr1::shared_ptr<PVULong> epics::pvData::PVULongPtr

Definition at line 512 of file pvData.h.

typedef for a pointer to a PVUnionArray.

Definition at line 119 of file pvData.h.

typedef std::tr1::shared_ptr<PVUnionArray> epics::pvData::PVUnionArrayPtr

Definition at line 120 of file pvData.h.

Definition at line 121 of file pvData.h.

Definition at line 122 of file pvData.h.

typedef std::tr1::shared_ptr<PVUnion> epics::pvData::PVUnionPtr

typedef for a pointer to a PVUnion.

Definition at line 107 of file pvData.h.

typedef for a pointer to a array of pointer to PVUnion.

Definition at line 111 of file pvData.h.

typedef std::vector<PVUnionPtr>::const_iterator epics::pvData::PVUnionPtrArray_const__iterator

Definition at line 113 of file pvData.h.

typedef std::vector<PVUnionPtr>::iterator epics::pvData::PVUnionPtrArray_iterator

Definition at line 112 of file pvData.h.

Definition at line 499 of file pvData.h.

Definition at line 1448 of file pvData.h.

typedef std::tr1::shared_ptr<PVUShortArray> epics::pvData::PVUShortArrayPtr

Definition at line 1449 of file pvData.h.

typedef std::tr1::shared_ptr<PVUShort> epics::pvData::PVUShortPtr

Definition at line 510 of file pvData.h.

typedef epicsThreadRunable epics::pvData::Runnable

Definition at line 43 of file thread.h.

typedef std::tr1::shared_ptr<const ScalarArray> epics::pvData::ScalarArrayConstPtr

typedef for a shared pointer to an immutable ScalarArray.

Definition at line 158 of file pvIntrospect.h.

typedef std::tr1::shared_ptr<const Scalar> epics::pvData::ScalarConstPtr

typedef for a shared pointer to an immutable Scalar.

Definition at line 150 of file pvIntrospect.h.

typedef std::tr1::shared_ptr<StandardField> epics::pvData::StandardFieldPtr

Definition at line 22 of file standardField.h.

typedef std::tr1::shared_ptr<StandardPVField> epics::pvData::StandardPVFieldPtr

Definition at line 23 of file standardPVField.h.

typedef std::vector<std::string> epics::pvData::StringArray

A string array.

Definition at line 110 of file pvType.h.

typedef std::vector<std::string>::const_iterator epics::pvData::StringArray_const_iterator

Definition at line 137 of file pvType.h.

typedef std::vector<std::string>::iterator epics::pvData::StringArray_iterator

Definition at line 136 of file pvType.h.

typedef std::tr1::shared_ptr<StringArray> epics::pvData::StringArrayPtr

Definition at line 111 of file pvType.h.

typedef std::tr1::shared_ptr<const StructureArray> epics::pvData::StructureArrayConstPtr

typedef for a shared pointer to an immutable StructureArray.

Definition at line 166 of file pvIntrospect.h.

typedef std::tr1::shared_ptr<const Structure> epics::pvData::StructureConstPtr

typedef for a shared pointer to an immutable Structure.

Definition at line 162 of file pvIntrospect.h.

typedef std::tr1::shared_ptr<Thread> epics::pvData::ThreadPtr

Definition at line 39 of file thread.h.

typedef std::tr1::shared_ptr<TimerCallback> epics::pvData::TimerCallbackPtr

Definition at line 32 of file timer.h.

typedef std::tr1::shared_ptr<Timer> epics::pvData::TimerPtr

Definition at line 34 of file timer.h.

typedef uint16_t epics::pvData::uint16

A 16 bit unsigned integer

Definition at line 95 of file pvType.h.

typedef uint32_t epics::pvData::uint32

A 32 bit unsigned integer

Definition at line 99 of file pvType.h.

typedef uint64_t epics::pvData::uint64

A 64 bit unsigned integer

Definition at line 103 of file pvType.h.

typedef uint8_t epics::pvData::uint8

A 8 bit unsigned integer

Definition at line 91 of file pvType.h.

typedef std::tr1::shared_ptr<const UnionArray> epics::pvData::UnionArrayConstPtr

typedef for a shared pointer to an immutable UnionArray.

Definition at line 174 of file pvIntrospect.h.

typedef std::tr1::shared_ptr<const Union> epics::pvData::UnionConstPtr

typedef for a shared pointer to an immutable Union.

Definition at line 170 of file pvIntrospect.h.

Enumeration Type Documentation

enum definition of AlarmSeverity

AlarmSeverity is:

Enumerator
noAlarm 
minorAlarm 
majorAlarm 
invalidAlarm 
undefinedAlarm 

Definition at line 30 of file alarm.h.

enum definition of AlarmStatus

AlarmStatus is:

Enumerator
noStatus 
deviceStatus 
driverStatus 
recordStatus 
dbStatus 
confStatus 
undefinedStatus 
clientStatus 

Definition at line 45 of file alarm.h.

Enumerator
noDebug 
lowDebug 
highDebug 

Definition at line 14 of file factory.h.

Definition of support scalar types.

Enumerator
pvBoolean 

The type is boolean, i.e. value can be false or true

pvByte 

The type is byte, i.e. a 8 bit signed integer.

pvShort 

The type is short, i.e. a 16 bit signed integer.

pvInt 

The type is int, i.e. a 32 bit signed integer.

pvLong 

The type is long, i.e. a 64 bit signed integer.

pvUByte 

The type is unsigned byte, i.e. a 8 bit unsigned integer.

pvUShort 

The type is unsigned short, i.e. a 16 bit unsigned integer.

pvUInt 

The type is unsigned int, i.e. a 32 bit unsigned integer.

pvULong 

The type is unsigned long, i.e. a 64 bit unsigned integer.

pvFloat 

The type is float, i.e. 32 bit IEEE floating point,

pvDouble 

The type is float, i.e. 64 bit IEEE floating point,

pvString 

The type is string, i.e. a UTF8 character string.

Definition at line 229 of file pvIntrospect.h.

Enumerator
lowestPriority 
lowerPriority 
lowPriority 
middlePriority 
highPriority 
higherPriority 
highestPriority 

Definition at line 29 of file thread.h.

Definition of support field types.

Enumerator
scalar 

The type is scalar. It has a scalarType

scalarArray 

The type is scalarArray. Each element is a scalar of the same scalarType.

structure 

The type is structure.

structureArray 

The type is structureArray. Each element is a structure.

union_ 

The type is an union.

unionArray 

The type is an array of unions.

Definition at line 183 of file pvIntrospect.h.

Function Documentation

void epics::pvData::castUnsafeV ( size_t  count,
ScalarType  to,
void *  dest,
ScalarType  from,
const void *  src 
)

Definition at line 72 of file typeCast.cpp.

73 {
74 #define COPYMEM(N) copyMem<N>(count, dest, src)
75 #define CAST(TO, FROM) castVTyped<TO, FROM>(count, dest, src)
76 
77  switch(to) {
78  case pvBoolean:
79  switch(from) {
80  case pvBoolean: COPYMEM(1); return;
81  case pvString: CAST(boolean, std::string); return;
82  default: noconvert(); return;
83  }
84  break;
85 
86  case pvByte:
87  switch(from) {
88  case pvBoolean: noconvert(); return;
89  case pvByte:
90  case pvUByte: COPYMEM(1); return;
91  case pvShort: CAST(int8, int16); return;
92  case pvUShort: CAST(int8, uint16); return;
93  case pvInt: CAST(int8, int32); return;
94  case pvUInt: CAST(int8, uint32); return;
95  case pvLong: CAST(int8, int64); return;
96  case pvULong: CAST(int8, uint64); return;
97  case pvFloat: CAST(int8, float); return;
98  case pvDouble: CAST(int8, double); return;
99  case pvString: CAST(int8, std::string); return;
100  }
101  break;
102 
103  case pvUByte:
104  switch(from) {
105  case pvBoolean: noconvert(); return;
106  case pvByte:
107  case pvUByte: COPYMEM(1); return;
108  case pvShort: CAST(uint8, int16); return;
109  case pvUShort: CAST(uint8, uint16); return;
110  case pvInt: CAST(uint8, int32); return;
111  case pvUInt: CAST(uint8, uint32); return;
112  case pvLong: CAST(uint8, int64); return;
113  case pvULong: CAST(uint8, uint64); return;
114  case pvFloat: CAST(uint8, float); return;
115  case pvDouble: CAST(uint8, double); return;
116  case pvString: CAST(uint8, std::string); return;
117  }
118  break;
119 
120  case pvShort:
121  switch(from) {
122  case pvBoolean: noconvert(); return;
123  case pvByte: CAST(int16, int8); return;
124  case pvUByte: CAST(int16, uint8); return;
125  case pvShort:
126  case pvUShort: COPYMEM(2); return;
127  case pvInt: CAST(int16, int32); return;
128  case pvUInt: CAST(int16, uint32); return;
129  case pvLong: CAST(int16, int64); return;
130  case pvULong: CAST(int16, uint64); return;
131  case pvFloat: CAST(int16, float); return;
132  case pvDouble: CAST(int16, double); return;
133  case pvString: CAST(int16, std::string); return;
134  }
135  break;
136 
137  case pvUShort:
138  switch(from) {
139  case pvBoolean: noconvert(); return;
140  case pvByte: CAST(uint16, int8); return;
141  case pvUByte: CAST(uint16, uint8); return;
142  case pvShort:
143  case pvUShort: COPYMEM(2); return;
144  case pvInt: CAST(uint16, int32); return;
145  case pvUInt: CAST(uint16, uint32); return;
146  case pvLong: CAST(uint16, int64); return;
147  case pvULong: CAST(uint16, uint64); return;
148  case pvFloat: CAST(uint16, float); return;
149  case pvDouble: CAST(uint16, double); return;
150  case pvString: CAST(uint16, std::string); return;
151  }
152  break;
153 
154  case pvInt:
155  switch(from) {
156  case pvBoolean: noconvert(); return;
157  case pvByte: CAST(int32, int8); return;
158  case pvUByte: CAST(int32, uint8); return;
159  case pvShort: CAST(int32, int16); return;
160  case pvUShort: CAST(int32, uint16); return;
161  case pvInt:
162  case pvUInt: COPYMEM(4); return;
163  case pvLong: CAST(int32, int64); return;
164  case pvULong: CAST(int32, uint64); return;
165  case pvFloat: CAST(int32, float); return;
166  case pvDouble: CAST(int32, double); return;
167  case pvString: CAST(int32, std::string); return;
168  }
169  break;
170 
171  case pvUInt:
172  switch(from) {
173  case pvBoolean: noconvert(); return;
174  case pvByte: CAST(uint32, int8); return;
175  case pvUByte: CAST(uint32, uint8); return;
176  case pvShort: CAST(uint32, int16); return;
177  case pvUShort: CAST(uint32, uint16); return;
178  case pvInt:
179  case pvUInt: COPYMEM(4); return;
180  case pvLong: CAST(uint32, int64); return;
181  case pvULong: CAST(uint32, uint64); return;
182  case pvFloat: CAST(uint32, float); return;
183  case pvDouble: CAST(uint32, double); return;
184  case pvString: CAST(uint32, std::string); return;
185  }
186  break;
187 
188  case pvLong:
189  switch(from) {
190  case pvBoolean: noconvert(); return;
191  case pvByte: CAST(int64, int8); return;
192  case pvUByte: CAST(int64, uint8); return;
193  case pvShort: CAST(int64, int16); return;
194  case pvUShort: CAST(int64, uint16); return;
195  case pvInt: CAST(int64, int32); return;
196  case pvUInt: CAST(int64, uint32); return;
197  case pvLong:
198  case pvULong: COPYMEM(8); return;
199  case pvFloat: CAST(int64, float); return;
200  case pvDouble: CAST(int64, double); return;
201  case pvString: CAST(int64, std::string); return;
202  }
203  break;
204 
205  case pvULong:
206  switch(from) {
207  case pvBoolean: noconvert(); return;
208  case pvByte: CAST(uint64, int8); return;
209  case pvUByte: CAST(uint64, uint8); return;
210  case pvShort: CAST(uint64, int16); return;
211  case pvUShort: CAST(uint64, uint16); return;
212  case pvInt: CAST(uint64, int32); return;
213  case pvUInt: CAST(uint64, uint32); return;
214  case pvLong:
215  case pvULong: COPYMEM(8); return;
216  case pvFloat: CAST(uint64, float); return;
217  case pvDouble: CAST(uint64, double); return;
218  case pvString: CAST(uint64, std::string); return;
219  }
220  break;
221 
222  case pvFloat:
223  switch(from) {
224  case pvBoolean: noconvert(); return;
225  case pvByte: CAST(float, int8); return;
226  case pvUByte: CAST(float, uint8); return;
227  case pvShort: CAST(float, int16); return;
228  case pvUShort: CAST(float, uint16); return;
229  case pvInt: CAST(float, int32); return;
230  case pvUInt: CAST(float, uint32); return;
231  case pvLong: CAST(float, int64); return;
232  case pvULong: CAST(float, uint64); return;
233  case pvFloat: COPYMEM(4); return;
234  case pvDouble: CAST(float, double); return;
235  case pvString: CAST(float, std::string); return;
236  }
237  break;
238 
239  case pvDouble:
240  switch(from) {
241  case pvBoolean: noconvert(); return;
242  case pvByte: CAST(double, int8); return;
243  case pvUByte: CAST(double, uint8); return;
244  case pvShort: CAST(double, int16); return;
245  case pvUShort: CAST(double, uint16); return;
246  case pvInt: CAST(double, int32); return;
247  case pvUInt: CAST(double, uint32); return;
248  case pvLong: CAST(double, int64); return;
249  case pvULong: CAST(double, uint64); return;
250  case pvFloat: CAST(double, float); return;
251  case pvDouble: COPYMEM(8); return;
252  case pvString: CAST(double, std::string); return;
253  }
254  break;
255 
256  case pvString:
257  switch(from) {
258  case pvBoolean: CAST(std::string, boolean); return;
259  case pvByte: CAST(std::string, int8); return;
260  case pvUByte: CAST(std::string, uint8); return;
261  case pvShort: CAST(std::string, int16); return;
262  case pvUShort: CAST(std::string, uint16); return;
263  case pvInt: CAST(std::string, int32); return;
264  case pvUInt: CAST(std::string, uint32); return;
265  case pvLong: CAST(std::string, int64); return;
266  case pvULong: CAST(std::string, uint64); return;
267  case pvFloat: CAST(std::string, float); return;
268  case pvDouble: CAST(std::string, double); return;
269  case pvString: copyV<std::string>(count, dest, src); return;
270  }
271  break;
272  }
273 
274  THROW_EXCEPTION2(std::logic_error, "Undefined cast");
275 }
int8_t int8
Definition: pvType.h:75
#define THROW_EXCEPTION2(TYPE, MSG)
uint16_t uint16
Definition: pvType.h:95
#define COPYMEM(N)
uint64_t uint64
Definition: pvType.h:103
int64_t int64
Definition: pvType.h:87
#define CAST(TO, FROM)
int16_t int16
Definition: pvType.h:79
int32_t int32
Definition: pvType.h:83
uint8_t uint8
Definition: pvType.h:91
uint32_t uint32
Definition: pvType.h:99
bool epicsShareExtern epics::pvData::compare ( const Field a,
const Field b 
)

Field equality conditions: 1) same instance 2) same type (field and scalar/element), same name, same subfields (if any)

Definition at line 26 of file Compare.cpp.

27 {
28  if(&a==&b)
29  return true;
30  if(a.getType()!=b.getType())
31  return false;
32  switch(a.getType()) {
33  case scalar: {
34  const Scalar &A=static_cast<const Scalar&>(a);
35  const Scalar &B=static_cast<const Scalar&>(b);
36  return compare(A, B);
37  }
38  case scalarArray: {
39  const ScalarArray &A=static_cast<const ScalarArray&>(a);
40  const ScalarArray &B=static_cast<const ScalarArray&>(b);
41  return compare(A, B);
42  }
43  case structure: {
44  const Structure &A=static_cast<const Structure&>(a);
45  const Structure &B=static_cast<const Structure&>(b);
46  return compare(A, B);
47  }
48  case structureArray: {
49  const StructureArray &A=static_cast<const StructureArray&>(a);
50  const StructureArray &B=static_cast<const StructureArray&>(b);
51  return compare(A, B);
52  }
53  case union_: {
54  const Union &A=static_cast<const Union&>(a);
55  const Union &B=static_cast<const Union&>(b);
56  return compare(A, B);
57  }
58  case unionArray: {
59  const UnionArray &A=static_cast<const UnionArray&>(a);
60  const UnionArray &B=static_cast<const UnionArray&>(b);
61  return compare(A, B);
62  }
63  default:
64  throw std::logic_error("Invalid Field type in comparison");
65  }
66 }
bool compare(const BoundedString &a, const BoundedString &b)
Definition: Compare.cpp:136
bool epicsShareExtern epics::pvData::compare ( const Scalar a,
const Scalar b 
)

Definition at line 68 of file Compare.cpp.

69 {
70  if(&a==&b)
71  return true;
72  return a.getScalarType()==b.getScalarType();
73 }
bool epicsShareExtern epics::pvData::compare ( const ScalarArray a,
const ScalarArray b 
)

Definition at line 75 of file Compare.cpp.

76 {
77  if(&a==&b)
78  return true;
79  return a.getElementType()==b.getElementType();
80 }
bool epicsShareExtern epics::pvData::compare ( const Structure a,
const Structure b 
)

Definition at line 82 of file Compare.cpp.

83 {
84  if(&a==&b)
85  return true;
86  if (a.getID()!=b.getID())
87  return false;
88  size_t nflds=a.getNumberFields();
89  if (b.getNumberFields()!=nflds)
90  return false;
91 
92  // std::equals does not work, since FieldConstPtrArray is an array of shared_pointers
93  FieldConstPtrArray const & af = a.getFields();
94  FieldConstPtrArray const & bf = b.getFields();
95  for (size_t i = 0; i < nflds; i++)
96  if (*(af[i].get()) != *(bf[i].get()))
97  return false;
98 
99  StringArray const & an = a.getFieldNames();
100  StringArray const & bn = b.getFieldNames();
101  return std::equal( an.begin(), an.end(), bn.begin() );
102 }
int i
Definition: scan.c:967
std::vector< FieldConstPtr > FieldConstPtrArray
Definition: pvIntrospect.h:146
std::vector< std::string > StringArray
Definition: pvType.h:110
bool epicsShareExtern epics::pvData::compare ( const StructureArray a,
const StructureArray b 
)

Definition at line 104 of file Compare.cpp.

105 {
106  return *(a.getStructure().get())==*(b.getStructure().get());
107 }
bool epicsShareExtern epics::pvData::compare ( const Union a,
const Union b 
)

Definition at line 109 of file Compare.cpp.

110 {
111  if(&a==&b)
112  return true;
113  if (a.getID()!=b.getID())
114  return false;
115  size_t nflds=a.getNumberFields();
116  if (b.getNumberFields()!=nflds)
117  return false;
118 
119  // std::equals does not work, since FieldConstPtrArray is an array of shared_pointers
120  FieldConstPtrArray const & af = a.getFields();
121  FieldConstPtrArray const & bf = b.getFields();
122  for (size_t i = 0; i < nflds; i++)
123  if (*(af[i].get()) != *(bf[i].get()))
124  return false;
125 
126  StringArray const & an = a.getFieldNames();
127  StringArray const & bn = b.getFieldNames();
128  return std::equal( an.begin(), an.end(), bn.begin() );
129 }
int i
Definition: scan.c:967
std::vector< FieldConstPtr > FieldConstPtrArray
Definition: pvIntrospect.h:146
std::vector< std::string > StringArray
Definition: pvType.h:110
bool epicsShareExtern epics::pvData::compare ( const UnionArray a,
const UnionArray b 
)

Definition at line 131 of file Compare.cpp.

132 {
133  return *(a.getUnion().get())==*(b.getUnion().get());
134 }
bool epicsShareExtern epics::pvData::compare ( const BoundedString a,
const BoundedString b 
)

Definition at line 136 of file Compare.cpp.

137 {
138  if(&a==&b)
139  return true;
140  return a.getMaximumLength()==b.getMaximumLength();
141 }
template<typename T >
void epics::pvData::copy ( PVValueArray< T > &  pvFrom,
size_t  fromOffset,
size_t  fromStride,
PVValueArray< T > &  pvTo,
size_t  toOffset,
size_t  toStride,
size_t  count 
)

Copy a subarray from one scalar array to another.

Warning
The two scalar arrays must both be PVValueArrays of the same type.
Parameters
pvFromThe source array.
fromOffsetThe offset in the source.
fromStrideThe interval between elements in pvFrom.
pvToThe destination array.
toOffsetThe offset in the destination.
toStrideThe interval between elements in pvTo.
countThe total number of elements to copy from pvFrom to pvTo.

Definition at line 23 of file pvSubArrayCopy.cpp.

31 {
32  if(pvTo.isImmutable()) throw std::invalid_argument("pvSubArrayCopy: pvTo is immutable");
33  if(fromStride<1 || toStride<1) throw std::invalid_argument("stride must be >=1");
34  size_t fromLength = pvFrom.getLength();
35  size_t maxcount = (fromLength -fromOffset + fromStride -1)/fromStride;
36  if(count>maxcount) throw std::invalid_argument("pvSubArrayCopy pvFrom length error");
37  size_t newLength = toOffset + count*toStride;
38  size_t capacity = pvTo.getCapacity();
39  if(newLength>capacity) capacity = newLength;
40  shared_vector<T> temp(capacity);
41  typename PVValueArray<T>::const_svector vecFrom = pvFrom.view();
42  typename PVValueArray<T>::const_svector vecTo = pvTo.view();
43  for(size_t i=0; i<pvTo.getLength(); ++i) temp[i] = vecTo[i];
44  for(size_t i=pvTo.getLength(); i< capacity; ++i) temp[i] = T();
45  for(size_t i=0; i<count; ++i) temp[i*toStride + toOffset] = vecFrom[i*fromStride+fromOffset];
46  shared_vector<const T> temp2(freeze(temp));
47  pvTo.replace(temp2);
48 }
int i
Definition: scan.c:967
template<typename T >
epicsShareExtern void epics::pvData::copy ( PVValueArray< T > &  pvFrom,
size_t  fromOffset,
size_t  fromStride,
PVValueArray< T > &  pvTo,
size_t  toOffset,
size_t  toStride,
size_t  count 
)

Copy a subarray from one scalar array to another.

Warning
The two scalar arrays must both be PVValueArrays of the same type.
Parameters
pvFromThe source array.
fromOffsetThe offset in the source.
fromStrideThe interval between elements in pvFrom.
pvToThe destination array.
toOffsetThe offset in the destination.
toStrideThe interval between elements in pvTo.
countThe total number of elements to copy from pvFrom to pvTo.

Definition at line 23 of file pvSubArrayCopy.cpp.

31 {
32  if(pvTo.isImmutable()) throw std::invalid_argument("pvSubArrayCopy: pvTo is immutable");
33  if(fromStride<1 || toStride<1) throw std::invalid_argument("stride must be >=1");
34  size_t fromLength = pvFrom.getLength();
35  size_t maxcount = (fromLength -fromOffset + fromStride -1)/fromStride;
36  if(count>maxcount) throw std::invalid_argument("pvSubArrayCopy pvFrom length error");
37  size_t newLength = toOffset + count*toStride;
38  size_t capacity = pvTo.getCapacity();
39  if(newLength>capacity) capacity = newLength;
40  shared_vector<T> temp(capacity);
41  typename PVValueArray<T>::const_svector vecFrom = pvFrom.view();
42  typename PVValueArray<T>::const_svector vecTo = pvTo.view();
43  for(size_t i=0; i<pvTo.getLength(); ++i) temp[i] = vecTo[i];
44  for(size_t i=pvTo.getLength(); i< capacity; ++i) temp[i] = T();
45  for(size_t i=0; i<count; ++i) temp[i*toStride + toOffset] = vecFrom[i*fromStride+fromOffset];
46  shared_vector<const T> temp2(freeze(temp));
47  pvTo.replace(temp2);
48 }
int i
Definition: scan.c:967
epicsShareExtern void epics::pvData::copy ( PVScalarArray pvFrom,
size_t  fromOffset,
size_t  fromStride,
PVScalarArray pvTo,
size_t  toOffset,
size_t  toStride,
size_t  count 
)

Copy a subarray from one scalar array to another.

Warning
The two scalar arrays must both be PVValueArrays of the same type.
Parameters
pvFromThe source array.
fromOffsetThe offset in the source.
fromStrideThe interval between elements in pvFrom.
pvToThe destination array.
toOffsetThe offset in the destination.
toStrideThe interval between elements in pvTo.
countThe total number of elements to copy from pvFrom to pvTo.

Definition at line 50 of file pvSubArrayCopy.cpp.

58 {
59  ScalarType scalarType = from.getScalarArray()->getElementType();
60  ScalarType otherType = to.getScalarArray()->getElementType();
61  if(scalarType!=otherType) {
62  throw std::invalid_argument("pvSubArrayCopy element types do not match");
63  }
64  switch(scalarType)
65  {
66  case pvBoolean:
67  {
68  copy(dynamic_cast<PVValueArray<boolean> &>(from),fromOffset,fromStride,
69  dynamic_cast<PVValueArray<boolean>& >(to),
70  toOffset,toStride,count);
71  }
72  break;
73  case pvByte:
74  {
75  copy(dynamic_cast<PVValueArray<int8> &>(from),fromOffset,fromStride,
76  dynamic_cast<PVValueArray<int8>& >(to),
77  toOffset,toStride,count);
78  }
79  break;
80  case pvShort:
81  {
82  copy(dynamic_cast<PVValueArray<int16> &>(from),fromOffset,fromStride,
83  dynamic_cast<PVValueArray<int16>& >(to),
84  toOffset,toStride,count);
85  }
86  break;
87  case pvInt:
88  {
89  copy(dynamic_cast<PVValueArray<int32> &>(from),fromOffset,fromStride,
90  dynamic_cast<PVValueArray<int32>& >(to),
91  toOffset,toStride,count);
92  }
93  break;
94  case pvLong:
95  {
96  copy(dynamic_cast<PVValueArray<int64> &>(from),fromOffset,fromStride,
97  dynamic_cast<PVValueArray<int64>& >(to),
98  toOffset,toStride,count);
99  }
100  break;
101  case pvUByte:
102  {
103  copy(dynamic_cast<PVValueArray<uint8> &>(from),fromOffset,fromStride,
104  dynamic_cast<PVValueArray<uint8>& >(to),
105  toOffset,toStride,count);
106  }
107  break;
108  case pvUShort:
109  {
110  copy(dynamic_cast<PVValueArray<uint16> &>(from),fromOffset,fromStride,
111  dynamic_cast<PVValueArray<uint16>& >(to),
112  toOffset,toStride,count);
113  }
114  break;
115  case pvUInt:
116  {
117  copy(dynamic_cast<PVValueArray<uint32> &>(from),fromOffset,fromStride,
118  dynamic_cast<PVValueArray<uint32>& >(to),
119  toOffset,toStride,count);
120  }
121  break;
122  case pvULong:
123  {
124  copy(dynamic_cast<PVValueArray<uint64> &>(from),fromOffset,fromStride,
125  dynamic_cast<PVValueArray<uint64>& >(to),
126  toOffset,toStride,count);
127  }
128  break;
129  case pvFloat:
130  {
131  copy(dynamic_cast<PVValueArray<float> &>(from),fromOffset,fromStride,
132  dynamic_cast<PVValueArray<float>& >(to),
133  toOffset,toStride,count);
134  }
135  break;
136  case pvDouble:
137  {
138  copy(dynamic_cast<PVValueArray<double> &>(from),fromOffset,fromStride,
139  dynamic_cast<PVValueArray<double>& >(to),
140  toOffset,toStride,count);
141  }
142  break;
143  case pvString:
144  {
145  copy(dynamic_cast<PVValueArray<string> &>(from),fromOffset,fromStride,
146  dynamic_cast<PVValueArray<string>& >(to),
147  toOffset,toStride,count);
148  }
149  break;
150  }
151 }
void copy(PVArray::shared_pointer const &pvFrom, size_t pvFromOffset, size_t pvFromStride, PVArray::shared_pointer &pvTo, size_t pvToOffset, size_t pvToStride, size_t count)
Copy a subarray from one array to another.
epicsShareExtern void epics::pvData::copy ( PVStructureArray pvFrom,
size_t  fromOffset,
size_t  fromStride,
PVStructureArray pvTo,
size_t  toOffset,
size_t  toStride,
size_t  count 
)

Copy a subarray from one structure array to another.

Warning
The two structure arrays must have the same structure introspection interface.
Parameters
pvFromThe source array.
fromOffsetThe offset in the source.
fromStrideThe interval between elements in pvFrom.
pvToThe destination array.
toOffsetThe offset in the destination.
toStrideThe interval between elements in pvTo.
countThe total number of elements to copy from pvFrom to pvTo.

Definition at line 153 of file pvSubArrayCopy.cpp.

161 {
162  if(pvTo.isImmutable()) {
163  throw std::logic_error("pvSubArrayCopy pvTo is immutable");
164  }
165  if(pvFromStride<1 || toStride<1) throw std::invalid_argument("stride must be >=1");
166  StructureArrayConstPtr pvFromStructure = pvFrom.getStructureArray();
167  StructureArrayConstPtr toStructure = pvTo.getStructureArray();
168  if(pvFromStructure->getStructure()!=toStructure->getStructure()) {
169  throw std::invalid_argument(
170  "pvSubArrayCopy structureArray pvTo and pvFrom have different structures");
171  }
172  size_t pvFromLength = pvFrom.getLength();
173  size_t maxcount = (pvFromLength -pvFromOffset + pvFromStride -1)/pvFromStride;
174  if(count>maxcount) throw std::invalid_argument("pvSubArrayCopy pvFrom length error");
175  size_t newLength = toOffset + count*toStride;
176  size_t capacity = pvTo.getCapacity();
177  if(newLength>capacity) capacity = newLength;
178  shared_vector<PVStructurePtr> temp(capacity);
179  PVValueArray<PVStructurePtr>::const_svector vecFrom = pvFrom.view();
180  PVValueArray<PVStructurePtr>::const_svector vecTo = pvTo.view();
181  for(size_t i=0; i<pvTo.getLength(); ++i) temp[i] = vecTo[i];
182  for(size_t i=pvTo.getLength(); i< capacity; ++i)
183  temp[i] = getPVDataCreate()->createPVStructure(toStructure->getStructure());
184  for(size_t i=0; i<count; ++i) temp[i*toStride + toOffset] = vecFrom[i*pvFromStride+pvFromOffset];
185  shared_vector<const PVStructurePtr> temp2(freeze(temp));
186  pvTo.replace(temp2);
187 }
int i
Definition: scan.c:967
std::tr1::shared_ptr< const StructureArray > StructureArrayConstPtr
Definition: pvIntrospect.h:166
FORCE_INLINE const PVDataCreatePtr & getPVDataCreate()
Definition: pvData.h:1648
void epics::pvData::copy ( PVUnionArray pvFrom,
size_t  pvFromOffset,
size_t  pvFromStride,
PVUnionArray pvTo,
size_t  toOffset,
size_t  toStride,
size_t  count 
)

Definition at line 189 of file pvSubArrayCopy.cpp.

197 {
198  if(pvTo.isImmutable()) {
199  throw std::logic_error("pvSubArrayCopy pvTo is immutable");
200  }
201  if(pvFromStride<1 || toStride<1) throw std::invalid_argument("stride must be >=1");
202  UnionArrayConstPtr pvFromUnion = pvFrom.getUnionArray();
203  UnionArrayConstPtr toUnion = pvTo.getUnionArray();
204  if(pvFromUnion->getUnion()!=toUnion->getUnion()) {
205  throw std::invalid_argument(
206  "pvSubArrayCopy unionArray pvTo and pvFrom have different unions");
207  }
208  size_t pvFromLength = pvFrom.getLength();
209  size_t maxcount = (pvFromLength -pvFromOffset + pvFromStride -1)/pvFromStride;
210  if(count>maxcount) throw std::invalid_argument("pvSubArrayCopy pvFrom length error");
211  size_t newLength = toOffset + count*toStride;
212  size_t capacity = pvTo.getCapacity();
213  if(newLength>capacity) capacity = newLength;
214  shared_vector<PVUnionPtr> temp(capacity);
215  PVValueArray<PVUnionPtr>::const_svector vecFrom = pvFrom.view();
216  PVValueArray<PVUnionPtr>::const_svector vecTo = pvTo.view();
217  for(size_t i=0; i<pvTo.getLength(); ++i) temp[i] = vecTo[i];
218  for(size_t i=pvTo.getLength(); i< capacity; ++i)
219  temp[i] = getPVDataCreate()->createPVUnion(toUnion->getUnion());
220  for(size_t i=0; i<count; ++i) temp[i*toStride + toOffset] = vecFrom[i*pvFromStride+pvFromOffset];
221  shared_vector<const PVUnionPtr> temp2(freeze(temp));
222  pvTo.replace(temp2);
223 }
int i
Definition: scan.c:967
FORCE_INLINE const PVDataCreatePtr & getPVDataCreate()
Definition: pvData.h:1648
std::tr1::shared_ptr< const UnionArray > UnionArrayConstPtr
Definition: pvIntrospect.h:174
epicsShareExtern void epics::pvData::copy ( PVArray pvFrom,
size_t  fromOffset,
size_t  fromStride,
PVArray pvTo,
size_t  toOffset,
size_t  toStride,
size_t  count 
)

Copy a subarray from one array to another.

Warning
The two arrays must have the same introspection interface.
Parameters
pvFromThe source array.
fromOffsetThe offset in the source.
fromStrideThe interval between elements in pvFrom.
pvToThe destination array.
toOffsetThe offset in the destination.
toStrideThe interval between elements in pvTo.
countThe total number of elements to copy from pvFrom to pvTo.

Definition at line 225 of file pvSubArrayCopy.cpp.

233 {
234  Type pvFromType = pvFrom.getField()->getType();
235  Type pvToType = pvTo.getField()->getType();
236  if(pvFromType!=pvToType) throw std::invalid_argument("pvSubArrayCopy: pvFrom and pvTo different types");
237  if(pvFromType==scalarArray) {
238  ScalarType pvFromScalarType= static_cast<ScalarType>(pvFromType);
239  ScalarType pvToScalarType = static_cast<ScalarType>(pvToType);
240  if(pvFromScalarType!=pvToScalarType){
241  throw std::invalid_argument("pvSubArrayCopy: pvFrom and pvTo different types");
242  }
243  }
244  if(pvTo.isImmutable()) throw std::invalid_argument("pvSubArrayCopy: pvTo is immutable");
245  if(pvFromType==scalarArray) {
246  copy(dynamic_cast<PVScalarArray &>(pvFrom) ,pvFromOffset,pvFromStride,
247  dynamic_cast<PVScalarArray&>(pvTo),
248  pvToOffset,pvToStride,count);
249  }
250  if(pvFromType==structureArray) {
251  copy(dynamic_cast<PVStructureArray &>(pvFrom) ,pvFromOffset,pvFromStride,
252  dynamic_cast<PVStructureArray&>(pvTo),
253  pvToOffset,pvToStride,count);
254  }
255  if(pvFromType==unionArray) {
256  copy(dynamic_cast<PVUnionArray &>(pvFrom) ,pvFromOffset,pvFromStride,
257  dynamic_cast<PVUnionArray&>(pvTo),
258  pvToOffset,pvToStride,count);
259  }
260 }
void copy(PVArray::shared_pointer const &pvFrom, size_t pvFromOffset, size_t pvFromStride, PVArray::shared_pointer &pvTo, size_t pvToOffset, size_t pvToStride, size_t count)
Copy a subarray from one array to another.
epicsShareExtern void epics::pvData::copy ( PVArray::shared_pointer const &  pvFrom,
size_t  fromOffset,
size_t  fromStride,
PVArray::shared_pointer &  pvTo,
size_t  toOffset,
size_t  toStride,
size_t  count 
)

Copy a subarray from one array to another.

Warning
The two arrays must have the same introspection interface.
Parameters
pvFromThe source array.
fromOffsetThe offset in the source.
fromStrideThe interval between elements in pvFrom.
pvToThe destination array.
toOffsetThe offset in the destination.
toStrideThe interval between elements in pvTo.
countThe total number of elements to copy from pvFrom to pvTo.

Definition at line 262 of file pvSubArrayCopy.cpp.

270 {
271  copy(*pvFrom,pvFromOffset,pvFromStride,*pvTo,pvToOffset,pvToStride,count);
272 }
void copy(PVArray::shared_pointer const &pvFrom, size_t pvFromOffset, size_t pvFromStride, PVArray::shared_pointer &pvTo, size_t pvToOffset, size_t pvToStride, size_t count)
Copy a subarray from one array to another.
epicsShareExtern PVStructure::shared_pointer epics::pvData::createRequest ( std::string const &  request)

Parse and build pvRequest structure.

request the Request string to be parsed. eg. "field(value)"

Returns
The resulting strucuture. Never NULL
Exceptions
std::exceptionfor various parsing errors

Definition at line 478 of file createRequest.cpp.

479 {
480  CreateRequestImpl I;
481  return I.createRequest(request);
482 }
std::string request
void epics::pvData::deserializeFromBuffer ( Serializable S,
ByteBuffer in 
)

deserializeFromBuffer Deserialize into S from provided vector

Parameters
SA Serializeable object. The current contents will be replaced
inThe input buffer (byte order of this buffer is used)
Exceptions
std::logic_errorif input buffer is too small. State of S is then undefined.

Definition at line 263 of file serializeHelper.cpp.

265  {
266  FromString F(buf);
267  S->deserialize(&buf, &F);
268  }
virtual void deserialize(ByteBuffer *buffer, DeserializableControl *flusher)=0
void epics::pvData::deserializeFromVector ( Serializable S,
int  byteOrder,
const std::vector< epicsUInt8 > &  in 
)
inline

deserializeFromBuffer Deserialize into S from provided vector

Parameters
SA Serializeable object. The current contents will be replaced
byteOrderByte order to write (EPICS_ENDIAN_LITTLE or EPICS_ENDIAN_BIG)
inThe input vector
Exceptions
std::logic_errorif input buffer is too small. State of S is then undefined.

Definition at line 190 of file serialize.h.

193  {
194  ByteBuffer B((char*)&in[0], in.size(), byteOrder); // we promise not the modify 'in'
195  deserializeFromBuffer(S, B);
196  }
void epicsShareFunc deserializeFromBuffer(Serializable *S, ByteBuffer &in)
deserializeFromBuffer Deserialize into S from provided vector
std::string* epics::pvData::get ( StringArray value)
inline

Definition at line 112 of file pvType.h.

113 {
114  return &value[0];
115 }
Definition: link.h:174
std::string const* epics::pvData::get ( StringArray const &  value)
inline

Definition at line 116 of file pvType.h.

117 {
118  return static_cast<std::string const *>(&value[0]);
119 }
Definition: link.h:174
std::string* epics::pvData::get ( StringArrayPtr value)
inline

Definition at line 120 of file pvType.h.

121 {
122  return get(*value.get());
123 }
Definition: link.h:174
std::string const* epics::pvData::get ( StringArrayPtr const &  value)
inline

Definition at line 124 of file pvType.h.

125 {
126  return get(*value.get());
127 }
Definition: link.h:174
FORCE_INLINE const FieldCreatePtr& epics::pvData::getFieldCreate ( )

Get the single class that implements FieldCreate,

Returns
The fieldCreate factory.

Definition at line 1416 of file pvIntrospect.h.

1416  {
1417  return FieldCreate::getFieldCreate();
1418 }
FORCE_INLINE const FieldCreatePtr & getFieldCreate()
FORCE_INLINE const StandardFieldPtr& epics::pvData::getStandardField ( )

Definition at line 236 of file standardField.h.

236  {
238 }
FORCE_INLINE const StandardFieldPtr & getStandardField()
epicsShareExtern StandardPVFieldPtr epics::pvData::getStandardPVField ( )

Definition at line 99 of file StandardPVField.cpp.

99  {
101 }
StandardPVFieldPtr getStandardPVField()
StringArray& epics::pvData::getVector ( StringArrayPtr value)
inline

Definition at line 128 of file pvType.h.

129 {
130  return *value.get();
131 }
Definition: link.h:174
StringArray const& epics::pvData::getVector ( StringArrayPtr const &  value)
inline

Definition at line 132 of file pvType.h.

133 {
134  return *value.get();
135 }
Definition: link.h:174
epicsShareExtern void epics::pvData::getVersion ( epics::pvData::PVDataVersion ptr)

Definition at line 13 of file pvdVersion.cpp.

14 {
15  ptr->major = EPICS_PVD_MAJOR_VERSION;
16  ptr->minor = EPICS_PVD_MINOR_VERSION;
17  ptr->maint = EPICS_PVD_MAINTENANCE_VERSION;
18  ptr->devel = EPICS_PVD_DEVELOPMENT_FLAG;
19 }
epicsShareExtern std::ostream & epics::pvData::operator<< ( std::ostream &  o,
const Type type 
)

Definition at line 36 of file TypeFunc.cpp.

37 {
38  return o << TypeFunc::name(type);
39 }
const char * name(ScalarType t)
Definition: TypeFunc.cpp:76
pvd::StructureConstPtr type
epicsShareExtern std::ostream & epics::pvData::operator<< ( format::array_at_internal const &  manip,
const PVArray array 
)

Definition at line 50 of file PVArray.cpp.

51 {
52  return array.dumpValue(manip.stream, manip.index);
53 }
epicsShareExtern std::ostream & epics::pvData::operator<< ( std::ostream &  o,
const PVField f 
)

Definition at line 92 of file PVField.cpp.

93 {
94  return f.dumpValue(o);
95 };
epicsShareExtern std::ostream & epics::pvData::operator<< ( std::ostream &  o,
const Field f 
)

Definition at line 114 of file FieldCreateFactory.cpp.

115 {
116  return f.dump(o);
117 };
epicsShareExtern std::ostream & epics::pvData::operator<< ( std::ostream &  o,
const ScalarType scalarType 
)

Definition at line 128 of file TypeFunc.cpp.

129 {
130  return o << ScalarTypeFunc::name(scalarType);
131 }
const char * name(ScalarType t)
Definition: TypeFunc.cpp:76
std::ostream & epics::pvData::operator<< ( std::ostream &  o,
const Timer timer 
)

Definition at line 210 of file timer.cpp.

211 {
212  timer.dump(o);
213  return o;
214 }
epicsShareExtern std::ostream & epics::pvData::operator<< ( std::ostream &  strm,
const AnyScalar v 
)

Definition at line 145 of file anyscalar.cpp.

146 {
147  switch(v.type()) {
148 #define CASE(BASETYPE, PVATYPE, DBFTYPE, PVACODE) case pv ## PVACODE: strm<<v._as<PVATYPE>(); break;
149 #define CASE_REAL_INT64
150 #define CASE_STRING
151 #include "pv/typemap.h"
152 #undef CASE
153 #undef CASE_REAL_INT64
154 #undef CASE_STRING
155  default:
156  strm<<"(nil)"; break;
157  }
158  return strm;
159 }
FORCE_INLINE std::ostream& epics::pvData::operator<< ( std::ostream &  o,
const Status status 
)

Definition at line 150 of file status.h.

150  {
151  status.dump(o);
152  return o;
153  }
void dump(std::ostream &o) const
Definition: status.cpp:83
pvd::Status status
FORCE_INLINE std::ostream& epics::pvData::operator<< ( std::ostream &  o,
const Status::StatusType statusType 
)

Definition at line 155 of file status.h.

155  {
156  o << Status::StatusTypeName[statusType];
157  return o;
158  }
epicsShareExtern std::ostream & epics::pvData::operator<< ( std::ostream &  o,
const BitSet b 
)

Definition at line 365 of file bitSet.cpp.

366  {
367  o << '{';
368  int32 i = b.nextSetBit(0);
369  if (i != -1) {
370  o << i;
371  for (i = b.nextSetBit(i+1); i >= 0; i = b.nextSetBit(i+1)) {
372  int32 endOfRun = b.nextClearBit(i);
373  do { o << ", " << i; } while (++i < endOfRun);
374  }
375  }
376  o << '}';
377  return o;
378  }
int i
Definition: scan.c:967
int32_t int32
Definition: pvType.h:83
epicsShareFunc std::ostream & epics::pvData::operator<< ( std::ostream &  strm,
const PVStructure::Formatter format 
)

Definition at line 402 of file printer.cpp.

403 {
404  if(format.xfmt==PVStructure::Formatter::JSON) {
405  JSONPrintOptions opts;
406  opts.multiLine = false;
407  printJSON(strm, format.xtop, format.xshow ? *format.xshow : BitSet().set(0), opts);
408  strm<<'\n';
409  return strm;
410 
411  } else if(format.xfmt==PVStructure::Formatter::NT) {
412  std::string id(format.xtop.getStructure()->getID()),
413  idprefix(id.substr(0, id.find_first_of('.')));
414 
415  // NTTable
416  if(idprefix=="epics:nt/NTTable:1") {
417  if(printTable(strm, format.xtop))
418  return strm;
419  } else {
420  //NTScalar, NTScalarArray, NTEnum, or anything with '.value'
421 
422  PVField::const_shared_pointer value(format.xtop.getSubField("value"));
423  if(value) {
424  switch(value->getField()->getType()) {
425  case scalar:
426  strm<<format::indent();
427  printTimeT(strm, format.xtop);
428  strm<<std::setprecision(6)<<*static_cast<const PVScalar*>(value.get())<<' ';
429  printAlarmT(strm, format.xtop);
430  strm<<'\n';
431  return strm;
432 
433  case scalarArray:
434  strm<<format::indent();
435  printTimeT(strm, format.xtop);
436  printAlarmT(strm, format.xtop);
437  strm<<std::setprecision(6)<<*static_cast<const PVScalarArray*>(value.get())<<'\n';
438  return strm;
439 
440  case structure:
441  if(printEnumT(strm, format.xtop, true)) {
442  strm<<'\n';
443  return strm;
444  }
445  break;
446  default:
447  break;
448  }
449  }
450  }
451  }
452  // fall through unhandled as Raw
453 
454  PVStructure::Formatter format2(format);
455 
456  if(format2.xmode==PVStructure::Formatter::Auto)
457  format2.xmode = useEscapes(strm) ? PVStructure::Formatter::ANSI : PVStructure::Formatter::Plain;
458 
459  printRaw(strm, format2, format.xtop);
460 
461  return strm;
462 }
FORCE_INLINE std::tr1::shared_ptr< PVField > getSubField(A a)
Definition: pvData.h:744
Definition: link.h:174
void printRaw(std::ostream &strm, const PVStructure::Formatter &format, const PVStructure &cur)
Definition: printer.cpp:317
Options used during printing.
Definition: json.h:42
A vector of bits.
Definition: bitSet.h:56
void printJSON(std::ostream &strm, const PVStructure &val, const BitSet &mask, const JSONPrintOptions &opts)
Definition: print.cpp:211
const StructureConstPtr & getStructure() const
Definition: pvData.h:731
bool multiLine
include new lines
Definition: json.h:44
epicsShareFunc std::ostream & epics::pvData::operator<< ( std::ostream &  strm,
const escape Q 
)

Definition at line 482 of file printer.cpp.

483 {
484  for(size_t pos = 0, len = Q.orig.size(); pos < len; pos++) {
485  const char C = Q.orig[pos];
486  char quote = '\\', next;
487  // compare me with epicsStrnEscapedFromRaw()
488  switch(C) {
489  case '\a': next = 'a'; break;
490  case '\b': next = 'b'; break;
491  case '\f': next = 'f'; break;
492  case '\n': next = 'n'; break;
493  case '\r': next = 'r'; break;
494  case '\t': next = 't'; break;
495  case '\v': next = 'v'; break;
496  case '\\': next = '\\'; break;
497  case '\'': next = '\''; break;
498  case '\"': next = '\"'; if(Q.S==escape::CSV) quote = '"'; break;
499  default:
500  if(!isprint(C)) {
501  // print three charator escape
502  strm<<"\\x"<<hexdigit(C>>4)<<hexdigit(C);
503  } else {
504  // literal
505  strm.put(C);
506  }
507  continue;
508  }
509  // print two charactor escape
510  strm.put(quote);
511  strm.put(next);
512  }
513 
514  return strm;
515 }
#define quote(v)
bool epicsShareExtern epics::pvData::operator== ( const PVField left,
const PVField right 
)

Definition at line 328 of file Compare.cpp.

329 {
330  if(&left == &right)
331  return true;
332 
333  Type lht = left.getField()->getType();
334  if(lht != right.getField()->getType())
335  return false;
336 
337  switch(lht) {
338  case scalar: return compareField(static_cast<const PVScalar*>(&left), static_cast<const PVScalar*>(&right));
339  case scalarArray: return compareField(static_cast<const PVScalarArray*>(&left), static_cast<const PVScalarArray*>(&right));
340  case structure: return compareField(static_cast<const PVStructure*>(&left), static_cast<const PVStructure*>(&right));
341  case structureArray: return compareField(static_cast<const PVStructureArray*>(&left), static_cast<const PVStructureArray*>(&right));
342  case union_: return compareField(static_cast<const PVUnion*>(&left), static_cast<const PVUnion*>(&right));
343  case unionArray: return compareField(static_cast<const PVUnionArray*>(&left), static_cast<const PVUnionArray*>(&right));
344  }
345  throw std::logic_error("PVField with invalid type!");
346 }
void epics::pvData::printRaw ( std::ostream &  strm,
const PVStructure::Formatter format,
const PVStructure cur 
)

Definition at line 317 of file printer.cpp.

318 {
319  typedef std::deque<std::pair<const PVField*, size_t> > todo_t;
320  todo_t todo;
321  BitSet show, highlight;
322 
323  const long orig_indent = format::indent_value(strm);
324 
325  {
326  if(format.xshow)
327  show = *format.xshow;
328  else
329  show.set(0);
330 
331  if(format.xhighlight)
332  highlight = *format.xhighlight;
333 
334  expandBS(format.xtop, show, true);
335  expandBS(format.xtop, highlight, false);
336  highlight &= show; // can't highlight hidden fields (paranoia)
337  }
338 
339  if(!show.get(0)) return; // nothing to do here...
340 
341  todo.push_front(std::make_pair(&format.xtop, orig_indent));
342 
343  while(!todo.empty()) {
344  todo_t::value_type cur(todo.front());
345  todo.pop_front();
346 
347  format::indent_value(strm) = cur.second;
348 
349  bool hl = highlight.get(cur.first->getFieldOffset()) && format.xmode==PVStructure::Formatter::ANSI;
350  if(hl)
351  strm<<"\x1b[1m"; // Bold
352 
353  switch(cur.first->getField()->getType()) {
354  case structure: {
355  const PVStructure* str = static_cast<const PVStructure*>(cur.first);
356 
357  const PVFieldPtrArray& flds = str->getPVFields();
358 
359  for(PVFieldPtrArray::const_reverse_iterator it(flds.rbegin()), end(flds.rend()); it!=end; ++it) {
360  const PVField *fld = (*it).get();
361  if(!show.get(fld->getFieldOffset())) continue;
362 
363  todo.push_front(std::make_pair(fld, cur.second+1));
364  }
365 
366  std::string id(cur.first->getField()->getID());
367 
368  strm<<format::indent()<<id<<' '<<cur.first->getFieldName();
369  if(id=="alarm_t") {
370  strm.put(' ');
371  printAlarmTx(strm, *str);
372  } else if(id=="time_t") {
373  strm.put(' ');
374  printTimeTx(strm, *str);
375  } else if(id=="enum_t") {
376  strm.put(' ');
377  printEnumT(strm, *str, false);
378  }
379  strm.put('\n');
380  }
381  break;
382  case scalar:
383  case scalarArray:
384  strm<<format::indent()<<cur.first->getField()->getID()<<' '<<cur.first->getFieldName()
385  <<' '<<*cur.first
386  <<'\n';
387  break;
388  case structureArray:
389  case union_:
390  case unionArray:
391  strm<<*cur.first;
392  break;
393  }
394 
395  if(hl)
396  strm<<"\x1b[0m"; // reset
397  }
398 
399  format::indent_value(strm) = orig_indent;
400 }
const std::string & getFieldName() const
Definition: pvData.h:166
const PVFieldPtrArray & getPVFields() const
Definition: pvData.h:736
bool get(uint32 bitIndex) const
Definition: bitSet.cpp:130
const FieldConstPtr & getField() const
Definition: pvData.h:208
A vector of bits.
Definition: bitSet.h:56
#define str(v)
PVField is the base class for each PVData field.
Definition: pvData.h:152
std::size_t getFieldOffset() const
Definition: PVField.cpp:44
std::vector< PVFieldPtr > PVFieldPtrArray
Definition: pvData.h:70
Data interface for a structure,.
Definition: pvData.h:712
long & indent_value(std::ios_base &ios)
Definition: printer.cpp:30
BitSet & set(uint32 bitIndex)
Definition: bitSet.cpp:103
void epics::pvData::serializeToVector ( const Serializable S,
int  byteOrder,
std::vector< epicsUInt8 > &  out 
)

Push serialize and append to the provided byte vector. No caching is done. Only complete serialization.

Parameters
SA Serializable object
byteOrderByte order to write (EPICS_ENDIAN_LITTLE or EPICS_ENDIAN_BIG)
outThe output vector. Results are appended

Definition at line 206 of file serializeHelper.cpp.

209  {
210  ToString TS(out, byteOrder);
211  S->serialize(&TS.bufwrap, &TS);
212  TS.flushSerializeBuffer();
213  assert(TS.bufwrap.getPosition()==0);
214  }
#define assert(exp)
Declare that a condition should be true.
Definition: epicsAssert.h:70
virtual void serialize(ByteBuffer *buffer, SerializableControl *flusher) const =0
template<typename T >
EPICS_ALWAYS_INLINE T epics::pvData::swap ( val)

Unconditional byte order swap. defined for integer and floating point types

Definition at line 209 of file byteBuffer.h.

210 {
211  return detail::asInt<T>::from(
212  detail::swap<sizeof(T)>::op(
213  detail::asInt<T>::to(val)));
214 }
EPICS_ALWAYS_INLINE T swap(T val)
Definition: byteBuffer.h:209
ChannelPut::shared_pointer op
Definition: pvAccess.cpp:132

Variable Documentation

const int32 epics::pvData::microSecPerSec = 1000000

Definition at line 23 of file timeStamp.h.

const int32 epics::pvData::milliSecPerSec = 1000

Definition at line 22 of file timeStamp.h.

const int32 epics::pvData::nanoSecPerSec = 1000000000

Definition at line 24 of file timeStamp.h.

const int64 epics::pvData::posixEpochAtEpicsEpoch = POSIX_TIME_AT_EPICS_EPOCH

Definition at line 25 of file timeStamp.h.