PVData C++
8.0.6
|
#include <copy/pv/createRequest.h>
Public Types | |
enum | mode_t { Mask, Slice } |
Public Member Functions | |
PVRequestMapper (const PVStructure &base, const PVStructure &pvRequest, mode_t mode=Mask) | |
void | reset () |
return to state of default ctor | |
const StructureConstPtr & | base () const |
const StructureConstPtr & | requested () const |
const BitSet & | requestedMask () const |
PVStructurePtr | buildRequested () const |
PVStructurePtr | buildBase () const |
void | compute (const PVStructure &base, const PVStructure &pvRequest, mode_t mode=Mask) |
const std::string & | warnings () const |
After compute(), check if !warnings().empty() | |
void | copyBaseToRequested (const PVStructure &base, const BitSet &baseMask, PVStructure &request, BitSet &requestMask) const |
void | copyBaseFromRequested (PVStructure &base, BitSet &baseMask, const PVStructure &request, const BitSet &requestMask) const |
void | maskBaseToRequested (const BitSet &baseMask, BitSet &requestMask) const |
void | maskBaseFromRequested (BitSet &baseMask, const BitSet &requestMask) const |
void | swap (PVRequestMapper &other) |
Exchange contents of two mappers. O(0) and never throws. | |
Helper for implementations of epics::pvAccess::ChannelProvider in interpreting the 'field' substructure of a pvRequest. Copies between an internal (base) Structure, and a client/user visible (requested) Structure.
Definition at line 74 of file createRequest.h.
Definition at line 76 of file createRequest.h.
epics::pvData::PVRequestMapper::PVRequestMapper | ( | const PVStructure & | base, |
const PVStructure & | pvRequest, | ||
mode_t | mode = Mask |
||
) |
|
inline |
Definition at line 104 of file createRequest.h.
PVStructurePtr epics::pvData::PVRequestMapper::buildBase | ( | ) | const |
PVStructurePtr epics::pvData::PVRequestMapper::buildRequested | ( | ) | const |
void epics::pvData::PVRequestMapper::compute | ( | const PVStructure & | base, |
const PVStructure & | pvRequest, | ||
mode_t | mode = Mask |
||
) |
(re)compute the selected subset of provided base structure.
base | A full base structure. Must be "top level" (field offset zero). |
pvRequest | The user/client provided request modifier |
mode | Control how the mapping is constructed. |
std::runtime_error | For errors involving invalid pvRequest |
std::logic_error | if the provided base is not a "top level" PVStructure. |
void epics::pvData::PVRequestMapper::copyBaseFromRequested | ( | PVStructure & | base, |
BitSet & | baseMask, | ||
const PVStructure & | request, | ||
const BitSet & | requestMask | ||
) | const |
Copy field values into Base structure from Requested structure
base | An instance of the base Structure. Field values are copied into it. Need not be the same instance passed to compute(). |
baseMask | A bit mask indicating which base fields were copied. BitSet::clear() is not called. |
request | An instance of the requested() Structure. Field values are copied from it. |
requestMask | A bit mask selecting those requested fields to copy. |
void epics::pvData::PVRequestMapper::copyBaseToRequested | ( | const PVStructure & | base, |
const BitSet & | baseMask, | ||
PVStructure & | request, | ||
BitSet & | requestMask | ||
) | const |
Copy field values from Base structure into Requested structure
base | An instance of the base Structure. Field values are copied from it. Need not be the same instance passed to compute(). |
baseMask | A bit mask selecting those base fields to copy. |
request | An instance of the requested() Structure. Field values are copied to it. |
requestMask | A bit mask indicating which requested fields were copied. BitSet::clear() is not called. |
|
inline |
Translate requested bit mask into base bit mask. BitSet::clear() is not called.
Definition at line 187 of file createRequest.h.
|
inline |
Translate Base bit mask into requested bit mask. BitSet::clear() is not called.
Definition at line 179 of file createRequest.h.
|
inline |
Definition at line 106 of file createRequest.h.
|
inline |
A mask of all fields in the base structure which are also in the requested structure, and any parent/structure "compress" bits. eg. bit 0 is always set.
eg. allows early detection of empty monitor updates.
Definition at line 121 of file createRequest.h.