This is Unofficial EPICS BASE Doxygen Site
PVIF Struct Referenceabstract

#include "pvif.h"

Public Types

enum  proc_t { ProcPassive, ProcInhibit, ProcForce }
 

Public Member Functions

 PVIF (dbChannel *ch)
 
virtual ~PVIF ()
 
virtual void put (epics::pvData::BitSet &mask, unsigned dbe, db_field_log *pfl)=0
 
virtual epics::pvData::Status get (const epics::pvData::BitSet &mask, proc_t proc=ProcInhibit, bool permit=true)=0
 
virtual unsigned dbe (const epics::pvData::BitSet &mask)=0
 Calculate DBE mask from changed bitset. More...
 

Public Attributes

dbChannel *const chan
 

Detailed Description

Definition at line 355 of file pvif.h.

Member Enumeration Documentation

Enumerator
ProcPassive 
ProcInhibit 
ProcForce 

Definition at line 361 of file pvif.h.

361  {
362  ProcPassive,
363  ProcInhibit,
364  ProcForce,
365  };

Constructor & Destructor Documentation

PVIF::PVIF ( dbChannel *  ch)

Definition at line 163 of file pvif.cpp.

164  :chan(ch)
165 {}
dbChannel *const chan
Definition: pvif.h:359
virtual PVIF::~PVIF ( )
inlinevirtual

Definition at line 357 of file pvif.h.

357 {}

Member Function Documentation

virtual unsigned PVIF::dbe ( const epics::pvData::BitSet mask)
pure virtual

Calculate DBE mask from changed bitset.

pvd::Status PVIF::get ( const epics::pvData::BitSet mask,
proc_t  proc = ProcInhibit,
bool  permit = true 
)
pure virtual

May copy from pvalue to PDB record (call dbChannelPut()) caller must lock record

Definition at line 1166 of file pvif.cpp.

1167 {
1168  dbCommon *precord = dbChannelRecord(chan);
1169 
1170  bool tryproc = proc!=ProcPassive ? proc==ProcForce :
1171  dbChannelField(chan) == &precord->proc ||
1172  (dbChannelFldDes(chan)->process_passive &&
1173  precord->scan == 0);
1174 
1175  pvd::Status ret;
1176 
1177  if (tryproc) {
1178  if (!permit) {
1179  return pvd::Status::error("Process not permitted");
1180 
1181  } else if (precord->pact) {
1182  if (precord->tpro)
1183  printf("%s: Active %s\n",
1184  epicsThreadGetNameSelf(), precord->name);
1185  precord->rpro = TRUE;
1186  } else {
1187  /* indicate that dbPutField called dbProcess */
1188  precord->putf = TRUE;
1189  long err = dbProcess(precord);
1190  if(err) {
1191  char buf[32];
1192  errSymLookup(err, buf, sizeof(buf));
1193  std::ostringstream msg;
1194  msg<<"process error : "<<buf;
1195  ret = pvd::Status::error(msg.str());
1196  }
1197  }
1198  }
1199 
1200  return ret;
1201 }
static Status error(const std::string &m)
Definition: status.h:50
LIBCOM_API const char *epicsStdCall epicsThreadGetNameSelf(void)
Definition: osdThread.c:846
#define printf
Definition: epicsStdio.h:41
LIBCOM_API void errSymLookup(long status, char *pBuf, size_t bufLength)
Definition: errSymLib.c:190
#define TRUE
Definition: dbDefs.h:27
dbChannel *const chan
Definition: pvif.h:359
virtual void PVIF::put ( epics::pvData::BitSet mask,
unsigned  dbe,
db_field_log *  pfl 
)
pure virtual

Copy from PDB record to pvalue (call dbChannelGet()) caller must lock record

Member Data Documentation

dbChannel* const PVIF::chan

Definition at line 359 of file pvif.h.


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