checkDISP
This commit is contained in:
@ -400,7 +400,7 @@ void PDBSinglePut::put(pvd::PVStructure::shared_pointer const & value,
|
|||||||
p2p::auto_ptr<PVIF> putpvif(channel->pv->builder->attach(channel->pv->chan, value, FieldName()));
|
p2p::auto_ptr<PVIF> putpvif(channel->pv->builder->attach(channel->pv->chan, value, FieldName()));
|
||||||
try{
|
try{
|
||||||
DBScanLocker L(chan);
|
DBScanLocker L(chan);
|
||||||
putpvif->get(*changed, doProc);
|
ret = putpvif->get(*changed, doProc);
|
||||||
|
|
||||||
}catch(std::runtime_error& e){
|
}catch(std::runtime_error& e){
|
||||||
ret = pvd::Status::error(e.what());
|
ret = pvd::Status::error(e.what());
|
||||||
|
@ -641,6 +641,14 @@ void findFormat(pvTimeAlarm& pvmeta, pdbRecordIterator& info, const epics::pvDat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pvd::Status checkDISP(dbChannel *chan)
|
||||||
|
{
|
||||||
|
dbCommon *prec = dbChannelRecord(chan);
|
||||||
|
pvd::Status ret;
|
||||||
|
if(prec->disp && dbChannelField(chan)!=&prec->disp)
|
||||||
|
ret = pvd::Status::error("Put Disabled");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
template<typename PVX, typename META>
|
template<typename PVX, typename META>
|
||||||
struct PVIFScalarNumeric : public PVIF
|
struct PVIFScalarNumeric : public PVIF
|
||||||
@ -698,7 +706,10 @@ struct PVIFScalarNumeric : public PVIF
|
|||||||
|
|
||||||
virtual pvd::Status get(const epics::pvData::BitSet& mask, proc_t proc, bool permit) OVERRIDE FINAL
|
virtual pvd::Status get(const epics::pvData::BitSet& mask, proc_t proc, bool permit) OVERRIDE FINAL
|
||||||
{
|
{
|
||||||
pvd::Status ret;
|
pvd::Status ret = checkDISP(chan);
|
||||||
|
if(!ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
bool newval = mask.logical_and(pvmeta.maskVALUEPut);
|
bool newval = mask.logical_and(pvmeta.maskVALUEPut);
|
||||||
if(newval) {
|
if(newval) {
|
||||||
if(permit)
|
if(permit)
|
||||||
@ -906,7 +917,10 @@ struct PVIFPlain : public PVIF
|
|||||||
|
|
||||||
virtual pvd::Status get(const epics::pvData::BitSet& mask, proc_t proc, bool permit) OVERRIDE FINAL
|
virtual pvd::Status get(const epics::pvData::BitSet& mask, proc_t proc, bool permit) OVERRIDE FINAL
|
||||||
{
|
{
|
||||||
pvd::Status ret;
|
pvd::Status ret = checkDISP(chan);
|
||||||
|
if(!ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
bool newval = mask.get(fieldOffset);
|
bool newval = mask.get(fieldOffset);
|
||||||
if(newval) {
|
if(newval) {
|
||||||
if(permit)
|
if(permit)
|
||||||
|
Reference in New Issue
Block a user