Program Listing for File pvControl.h¶
↰ Return to documentation for file (src/property/pv/pvControl.h)
/* pvControl.h */
/*
* Copyright information and license terms for this software can be
* found in the file LICENSE that is included with the distribution
*/
#ifndef PVCONTROL_H
#define PVCONTROL_H
#include <pv/pvData.h>
#include <pv/control.h>
#include <shareLib.h>
namespace epics { namespace pvData {
class epicsShareClass PVControl {
public:
PVControl(){}
//default constructors and destructor are OK
//returns (false,true) if pvField(is not, is) a valid control structure
//An automatic detach is issued if already attached.
/*
* Attach to a field of a PVData object.
* @param pvField The pvField.
* @return (false,true) if the pvField (is not, is) an control structure.
*/
bool attach(PVFieldPtr const & pvField);
void detach();
bool isAttached();
// each of the following throws logic_error if not attached to PVField
// set returns false if field is immutable
void get(Control & control) const;
bool set(Control const & control);
private:
PVDoublePtr pvLow;
PVDoublePtr pvHigh;
PVDoublePtr pvMinStep;
static std::string noControlFound;
static std::string notAttached;
};
}}
#endif /* PVCONTROL_H */