mrfioc2  2.6.0
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
EVRMRM Class Reference

Modular Register Map Event Receivers. More...

#include <drvem.h>

Inheritance diagram for EVRMRM:
Inheritance graph
[legend]
Collaboration diagram for EVRMRM:
Collaboration graph
[legend]

Classes

struct  Config
 

Public Member Functions

 EVRMRM (const std::string &n, bus_configuration &busConfig, const Config *c, volatile unsigned char *, epicsUInt32)
 
virtual ~EVRMRM ()
 
virtual void lock () const OVERRIDE FINAL
 
virtual void unlock () const OVERRIDE FINAL
 
virtual std::string model () const OVERRIDE FINAL
 Hardware model. More...
 
epicsUInt32 fpgaFirmware ()
 
formFactor getFormFactor ()
 
std::string formFactorStr ()
 
virtual MRFVersion version () const OVERRIDE FINAL
 Firmware Version. More...
 
virtual bool enabled () const OVERRIDE FINAL
 
virtual void enable (bool v) OVERRIDE FINAL
 
virtual bool mappedOutputState () const OVERRIDE FINAL
 
MRMGpiogpio ()
 
virtual bool specialMapped (epicsUInt32 code, epicsUInt32 func) const OVERRIDE FINAL
 
virtual void specialSetMap (epicsUInt32 code, epicsUInt32 func, bool) OVERRIDE FINAL
 
virtual double clock () const OVERRIDE FINAL
 
virtual void clockSet (double) OVERRIDE FINAL
 
epicsUInt16 clockMode () const
 
void clockModeSet (epicsUInt16 mode)
 
virtual bool pllLocked () const OVERRIDE FINAL
 Internal PLL Status. More...
 
virtual epicsUInt32 irqCount () const OVERRIDE FINAL
 
virtual bool linkStatus () const OVERRIDE FINAL
 
virtual IOSCANPVT linkChanged () const OVERRIDE FINAL
 
virtual epicsUInt32 recvErrorCount () const OVERRIDE FINAL
 
virtual epicsUInt32 uSecDiv () const OVERRIDE FINAL
 Approximate divider from event clock period to 1us. More...
 
virtual bool extInhib () const OVERRIDE FINAL
 Using external hardware input for inhibit? More...
 
virtual void setExtInhib (bool) OVERRIDE FINAL
 
virtual epicsUInt32 tsDiv () const OVERRIDE FINAL
 When using internal TS source gives the divider from event clock period to TS period. More...
 
virtual void setSourceTS (TSSource) OVERRIDE FINAL
 Select source which increments TS counter. More...
 
virtual TSSource SourceTS () const OVERRIDE FINAL
 
virtual double clockTS () const OVERRIDE FINAL
 
virtual void clockTSSet (double) OVERRIDE FINAL
 
virtual bool interestedInEvent (epicsUInt32 event, bool set) OVERRIDE FINAL
 
virtual bool TimeStampValid () const OVERRIDE FINAL
 
virtual IOSCANPVT TimeStampValidEvent () const OVERRIDE FINAL
 
virtual bool getTimeStamp (epicsTimeStamp *ts, epicsUInt32 event) OVERRIDE FINAL
 
virtual bool getTicks (epicsUInt32 *tks) OVERRIDE FINAL
 
virtual IOSCANPVT eventOccurred (epicsUInt32 event) const OVERRIDE FINAL
 
virtual void eventNotifyAdd (epicsUInt32, eventCallback, void *) OVERRIDE FINAL
 
virtual void eventNotifyDel (epicsUInt32, eventCallback, void *) OVERRIDE FINAL
 
bool convertTS (epicsTimeStamp *ts)
 In place conversion between raw posix sec+ticks to EPICS sec+nsec. More...
 
virtual epicsUInt16 dbus () const OVERRIDE FINAL
 
virtual epicsUInt32 heartbeatTIMOCount () const OVERRIDE FINAL
 
virtual IOSCANPVT heartbeatTIMOOccured () const OVERRIDE FINAL
 
virtual epicsUInt32 FIFOFullCount () const OVERRIDE FINAL
 
virtual epicsUInt32 FIFOOverRate () const OVERRIDE FINAL
 
virtual epicsUInt32 FIFOEvtCount () const OVERRIDE FINAL
 
virtual epicsUInt32 FIFOLoopCount () const OVERRIDE FINAL
 
void enableIRQ (void)
 
bool dcEnabled () const
 
void dcEnable (bool v)
 
double dcTarget () const
 
void dcTargetSet (double)
 
double dcRx () const
 Measured delay. More...
 
double dcInternal () const
 Delay compensation applied. More...
 
epicsUInt32 dcStatusRaw () const
 
epicsUInt32 topId () const
 
bool psPolarity () const
 
void psPolaritySet (bool v)
 
epicsUInt32 dummy () const
 
void setEvtCode (epicsUInt32 code) OVERRIDE FINAL
 
epicsUInt32 timeSrc () const
 
void setTimeSrc (epicsUInt32 mode)
 
- Public Member Functions inherited from mrf::ObjectInst< EVRMRM, EVR >
virtual propertyBasegetPropertyBase (const char *pname, const std::type_info &ptype)
 
virtual void visitProperties (bool(*cb)(propertyBase *, void *), void *arg)
 
- Public Member Functions inherited from EVR
 EVR (const std::string &n, bus_configuration &busConfig)
 
virtual ~EVR ()=0
 
std::string versionStr () const
 
virtual std::string versionSw () const
 Software Version. More...
 
virtual std::string getCommitHash () const
 
virtual std::string position () const
 Position of EVR device in enclosure. More...
 
bus_configurationgetBusConfiguration ()
 
void setSourceTSraw (epicsUInt32 r)
 
epicsUInt32 SourceTSraw () const
 
- Public Member Functions inherited from mrf::Object
const std::string & name () const
 
const Objectparent () const
 
child_iterator beginChild () const
 
child_iterator endChild () const
 
template<typename P >
mrf::auto_ptr< property< P > > getProperty (const char *pname)
 
- Public Member Functions inherited from MRMSPI
 MRMSPI (volatile unsigned char *base)
 
virtual ~MRMSPI ()
 
virtual void select (unsigned id) OVERRIDE FINAL
 Select numbered device. 0 clears selection. More...
 
virtual epicsUInt8 cycle (epicsUInt8 in) OVERRIDE FINAL
 
- Public Member Functions inherited from mrf::SPIInterface
 SPIInterface ()
 
virtual ~SPIInterface ()
 
virtual void cycles (size_t nops, const Operation *ops)
 
double timeout () const
 timeout in seconds for an individual cycle() More...
 
void setTimeout (double t)
 
- Public Member Functions inherited from TimeStampSource
 TimeStampSource (double period)
 
virtual ~TimeStampSource ()
 
void resyncSecond ()
 Call to re-initialize timestamp counter from system time. More...
 
void tickSecond ()
 Call just after the start of each second. More...
 
bool validSeconds () const
 Whether tickSecond() has been called for the past 5 seconds. More...
 
double deltaSeconds () const
 last difference between More...
 
void softSecondsSrc (bool enable)
 enable sending of event 125 by software timer. Simulation of external HW clock More...
 
bool isSoftSeconds () const
 
std::string nextSecond () const
 

Static Public Member Functions

static void isr (EVRMRM *evr, bool pci)
 
static void isr_pci (void *)
 
static void isr_vme (void *)
 
static void isr_poll (void *)
 
- Static Public Member Functions inherited from mrf::ObjectInst< EVRMRM, EVR >
static int initObject ()
 
- Static Public Member Functions inherited from mrf::ObjectInst< EVR >
static int initObject ()
 
- Static Public Member Functions inherited from mrf::Object
static ObjectgetObject (const std::string &name)
 
static ObjectgetCreateObject (const std::string &name, const std::string &klass, const create_args_t &args=create_args_t())
 
static void addFactory (const std::string &klass, create_factory_t fn)
 
static void visitObjects (bool(*)(Object *, void *), void *)
 

Public Attributes

epicsMutex evrLock
 Guards access to instance All callers must take this lock before any operations on this object. More...
 
const Config *const conf
 
volatile unsigned char *const base
 
epicsUInt32 baselen
 
mrmDataBufTx buftx
 
mrmBufRx bufrx
 
mrf::auto_ptr< SFPsfp
 

Friends

struct EVRMRMTSBuffer
 

Additional Inherited Members

- Public Types inherited from EVR
typedef void(* eventCallback) (void *userarg, epicsUInt32 event)
 
- Public Types inherited from mrf::Object
typedef m_obj_children_t::const_iterator child_iterator
 
typedef std::map< std::string, std::string > create_args_t
 
typedef Object *(* create_factory_t) (const std::string &name, const std::string &klass, const create_args_t &args)
 
- Protected Member Functions inherited from mrf::ObjectInst< EVRMRM, EVR >
 ObjectInst (const std::string &n)
 
 ObjectInst (const std::string &n, A &a)
 
virtual ~ObjectInst ()
 
- Protected Member Functions inherited from mrf::ObjectInst< EVR >
 ObjectInst (const std::string &n)
 
 ObjectInst (const std::string &n, A &a)
 
- Protected Member Functions inherited from mrf::Object
 Object (const std::string &n, const Object *par=0)
 
virtual ~Object ()=0
 
- Protected Member Functions inherited from TimeStampSource
virtual void postSoftSecondsSrc ()
 
- Protected Attributes inherited from mrf::SPIInterface
epicsMutex mutex
 

Detailed Description

Modular Register Map Event Receivers.

Definition at line 94 of file drvem.h.

Constructor & Destructor Documentation

◆ EVRMRM()

EVRMRM::EVRMRM ( const std::string &  n,
bus_configuration busConfig,
const Config c,
volatile unsigned char *  b,
epicsUInt32  bl 
)

Definition at line 126 of file drvem.cpp.

130  :base_t(n,busConfig)
131  ,MRMSPI(b+U32_SPIDData)
132  ,TimeStampSource(1.0)
133  ,evrLock()
134  ,conf(c)
135  ,base(b)
136  ,baselen(bl)
137  ,buftx(n+":BUFTX", b+U32_DataTxCtrl, b+U32_DataTx_base)
138  ,bufrx(n+":BUFRX", b, 10) // Sets depth of Rx queue
139  ,count_recv_error(0)
140  ,count_hardware_irq(0)
141  ,count_heartbeat(0)
142  ,shadowIRQEna(0)
143  ,count_FIFO_overflow(0)
144  ,outputs()
145  ,prescalers()
146  ,pulsers()
147  ,shortcmls()
148  ,gpio_(*this)
149  ,drain_fifo_method(*this)
150  ,drain_fifo_task(drain_fifo_method, "EVRFIFO",
151  epicsThreadGetStackSize(epicsThreadStackBig),
152  epicsThreadPriorityHigh )
153  // 3 because 2 IRQ events, and 1 shutdown event
154  ,drain_fifo_wakeup(3,sizeof(int))
155  ,count_FIFO_sw_overrate(0)
156  ,timeSrcMode(Disable)
157  ,stampClock(0.0)
158  ,shadowSourceTS(TSSourceInternal)
159  ,shadowCounterPS(0)
160  ,timestampValid(0)
161  ,lastInvalidTimestamp(0)
162  ,lastValidTimestamp(0)
163 {
164 try{
165  const epicsUInt32 rawver = fpgaFirmware();
166  const epicsUInt32 boardtype = (rawver&FWVersion_type_mask)>>FWVersion_type_shift;
167  const epicsUInt32 formfactor = (rawver&FWVersion_form_mask)>>FWVersion_form_shift;
168  const MRFVersion ver(rawver);
169 
170  if(boardtype!=0x1)
171  throw std::runtime_error("Address does not correspond to an EVR");
172 
173  if(ver<MRFVersion(0,3))
174  throw std::runtime_error("Firmware 0 version < 3 not supported");
175  else if(ver.firmware()==2 && ver<MRFVersion(2,7))
176  throw std::runtime_error("Firmware 2 version < 207 not supported");
177 
178  if(ver.firmware()==2 && ver<MRFVersion(2,7,6))
179  printf("Warning: Recommended minimum firmware 2 version is 207.6, found %s\n", ver.str().c_str());
180 
181  if(ver.firmware()!=0 && ver.firmware()!=2)
182  printf("Warning: Unknown firmware series %u. Your milage may vary\n", ver.firmware());
183 
184  scanIoInit(&IRQmappedEvent);
185  scanIoInit(&IRQheartbeat);
186  scanIoInit(&IRQrxError);
187  scanIoInit(&IRQfifofull);
188  scanIoInit(&timestampValidChange);
189 
190  CBINIT(&data_rx_cb , priorityHigh, &mrmBufRx::drainbuf, &this->bufrx);
191  CBINIT(&poll_link_cb , priorityMedium, &EVRMRM::poll_link , this);
192 
193  if(ver>=MRFVersion(0, 5)) {
194  sfp.reset(new SFP(SB() << n << ":SFP", base + U32_SFPEEPROM_base));
195  }
196 
197  if(ver>=MRFVersion(2,7)) {
198  printf("Sequencer capability detected\n");
199  seq.reset(new EvrSeqManager(this));
200  }
201 
202  /*
203  * Create subunit instances
204  */
205 
206  formFactor form = getFormFactor();
207 
208  printf("%s: ", formFactorStr().c_str());
209 
210  std::cout << " Model " << conf->model
211  << " Pul " << conf->nPul
212  << " PS " << conf->nPS
213  << " OFP " << conf->nOFP
214  << " OFPUNIV " << conf->nOFPUV
215  << " ORB " << conf->nORB
216  << " OBack " << conf->nOBack
217  << " OFPDly " << conf->nOFPDly
218  << " CML " << conf->nCML
219  << " Kind " << static_cast<int>(conf->kind)
220  << " IFP " << conf->nIFP
221  << std::endl;
222 
223  inputs.resize(conf->nIFP);
224  for(size_t i=0; i<conf->nIFP; i++){
225  inputs[i] = new MRMInput(SB() << n << ":FPIn" << i, base, i);
226  }
227 
228  // Special output for mapping bus interrupt
229  outputs[std::make_pair(OutputInt,0)]=new MRMOutput(n+":Int", this, OutputInt, 0);
230 
231  for(unsigned int i=0; i<conf->nOFP; i++){
232  outputs[std::make_pair(OutputFP, i)] = new MRMOutput(SB() << n << ":FrontOut" << i, this, OutputFP, i);
233  }
234 
235  for(unsigned int i=0; i<conf->nOFPUV; i++){
236  outputs[std::make_pair(OutputFPUniv, i)] = new MRMOutput(SB() << n << ":FrontUnivOut" << i, this, OutputFPUniv, i);
237  }
238 
239  delays.resize(conf->nOFPDly);
240  for(unsigned int i=0; i<conf->nOFPDly; i++){
241  delays[i] = new DelayModule(SB() << n << ":UnivDlyModule" << i, this, i);
242  }
243 
244  for(unsigned int i=0; i<conf->nORB; i++){
245  outputs[std::make_pair(OutputRB, i)] = new MRMOutput(SB() << n << ":RearUniv" << i, this, OutputRB, i);
246  }
247 
248  for(unsigned int i=0; i<conf->nOBack; i++){
249  outputs[std::make_pair(OutputRB, i)] = new MRMOutput(SB() << n << ":Backplane" << i, this, OutputBackplane, i);
250  }
251 
252  prescalers.resize(conf->nPS);
253  for(size_t i=0; i<conf->nPS; i++){
254  prescalers[i] = new MRMPreScaler(SB() << n << ":PS" << i, *this, base + U32_Scaler(i));
255  }
256 
257  pulsers.resize(32);
258  for(epicsUInt32 i=0; i<conf->nPul; i++){
259  pulsers[i] = new MRMPulser(SB() << n << ":Pul" << i, i, *this);
260  }
261  if(ver>=MRFVersion(2,0)) {
262  // masking pulsers
263  for(epicsUInt32 i=28; i<=31; i++){
264  pulsers[i] = new MRMPulser(SB() << n << ":Pul" << i, i, *this);
265  }
266 
267  }
268 
269  if(formfactor==formFactor_CPCIFULL) {
270  for(unsigned int i=4; i<8; i++) {
271  outputs[std::make_pair(OutputFP, i)] = new MRMOutput(SB() << n << ":FrontOut" << i, this, OutputFP, i);
272  }
273  shortcmls.resize(8, 0);
274  shortcmls[4]=new MRMCML(n+":CML4", 4,*this,MRMCML::typeCML,form);
275  shortcmls[5]=new MRMCML(n+":CML5", 5,*this,MRMCML::typeCML,form);
276  shortcmls[6]=new MRMCML(n+":CML6", 6,*this,MRMCML::typeTG300,form);
277  shortcmls[7]=new MRMCML(n+":CML7", 7,*this,MRMCML::typeTG300,form);
278 
279  } else if(formfactor==formFactor_mTCA) {
280  int u_idx;
281  if (conf->nCML > 0)
282  shortcmls.resize(conf->nCML);
283  for (size_t i = 0; i < conf->nCML; i++)
284  {
285  u_idx = GTX_FPUV_OFFSET + i;
286  // map GTX outputs (e.g. TCLKA/B) starting from GTX_FPUV_OFFSET (as in the documentation)
287  outputs[std::make_pair(OutputFPUniv, u_idx)]
288  = new MRMOutput(SB() << n << ":FrontUnivOut" << u_idx, this, OutputFPUniv, u_idx);
289  // create CMLs
290  if(model().compare("mTCA-EVR-300RF") == 0 && u_idx == GTX_SFP_OFFSET)
291  shortcmls[i] = new MRMCML(SB() << n << ":CML" << i, i, *this, MRMCML::typeTG300, form);
292  else
293  shortcmls[i] = new MRMCML(SB() << n << ":CML" << i, i, *this, conf->kind, form);
294  }
295  } else if(conf->nCML && ver>=MRFVersion(0,4)){
296  shortcmls.resize(conf->nCML);
297  for(size_t i=0; i<conf->nCML; i++){
298  shortcmls[i] = new MRMCML(SB() << n << ":CML" << i, (unsigned char)i, *this, conf->kind, form);
299  }
300 
301  }else if(conf->nCML){
302  printf("CML outputs not supported with this firmware\n");
303  }
304 
305  for(epicsUInt32 i=0; i<NELEMENTS(this->events); i++) {
306  events[i].code=i;
307  events[i].owner=this;
308  CBINIT(&events[i].done_cb, priorityLow, &EVRMRM::sentinel_done , &events[i]);
309  }
310 
311  SCOPED_LOCK(evrLock);
312 
313  memset(_mapped, 0, sizeof(_mapped));
314  // restore mapping ram to a clean state
315  // needed when the IOC is started w/o a device reset (ie Linux)
316  //TODO: find a way to do this that doesn't require clearing
317  // mapping which will shortly be set again...
318  for(size_t i=0; i<255; i++) {
319  WRITE32(base, MappingRam(0, i, Internal), 0);
320  WRITE32(base, MappingRam(0, i, Trigger), 0);
321  WRITE32(base, MappingRam(0, i, Set), 0);
322  WRITE32(base, MappingRam(0, i, Reset), 0);
323  }
324 
325  // restore default special mappings
326  // These may be replaced later
332 
333  // Except for Prescaler reset, which is set with a record
335 
336  eventClock=FracSynthAnalyze(READ32(base, FracDiv),
337  fracref,0)*1e6;
338 
339  shadowCounterPS=READ32(base, CounterPS);
340 
341  if(tsDiv()!=0) {
342  shadowSourceTS=TSSourceInternal;
343  } else {
344  bool usedbus4=(READ32(base, Control) & Control_tsdbus) != 0;
345 
346  if(usedbus4)
347  shadowSourceTS=TSSourceDBus4;
348  else
349  shadowSourceTS=TSSourceEvent;
350  }
351 
352  eventNotifyAdd(MRF_EVENT_TS_COUNTER_RST, &seconds_tick, (void*)this);
353 
354  drain_fifo_task.start();
355 
356  if(busConfig.busType==busType_pci)
357  mrf::SPIDevice::registerDev(n+":FLASH", mrf::SPIDevice(this, 1));
358 
359  #ifndef DBR_UTAG
360  std::cout << "WARNING EVRMRM::EVRMRM epicsUTag not supported." << std::endl;
361  #endif
362 
363 } catch (std::exception& e) {
364  printf("Aborting EVR initializtion: %s\n", e.what());
365  cleanup();
366  throw;
367 }
368 }
static void drainbuf(CALLBACK *)
Definition: drvemRxBuf.cpp:74
enum busType busType
#define FWVersion_type_mask
Definition: evrRegMap.h:142
size_t nPS
Definition: drvem.h:109
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
size_t nCML
Definition: drvem.h:114
static void registerDev(const std::string &name, const SPIDevice &)
Definition: spi.cpp:86
#define Control_tsdbus
Definition: evrRegMap.h:78
volatile unsigned char *const base
Definition: drvem.h:237
TimeStampSource(double period)
Definition: mrmtimesrc.cpp:143
MRMSPI(volatile unsigned char *base)
Definition: mrmspi.cpp:36
mrmDataBufTx buftx
Definition: drvem.h:239
formFactor getFormFactor()
Definition: drvem.cpp:421
size_t nOFPDly
Definition: drvem.h:112
#define MRF_EVENT_HEARTBEAT
Definition: mrfCommon.h:116
Internal.
Definition: output.h:19
#define FWVersion_form_shift
Definition: evrRegMap.h:145
const char * model
Definition: drvem.h:107
#define MRF_EVENT_RST_PRESCALERS
Definition: mrfCommon.h:118
size_t nIFP
Definition: drvem.h:117
formFactor
#define U32_DataTxCtrl
Definition: evrRegMap.h:133
size_t nORB
Definition: drvem.h:111
virtual void specialSetMap(epicsUInt32 code, epicsUInt32 func, bool) OVERRIDE FINAL
Definition: drvem.cpp:524
virtual epicsUInt32 tsDiv() const OVERRIDE FINAL
When using internal TS source gives the divider from event clock period to TS period.
Definition: drvem.h:170
EVRMRM * owner
Definition: drvem.h:53
Rear Breakout.
Definition: output.h:22
#define FWVersion_form_mask
Definition: evrRegMap.h:144
#define CBINIT(ptr, prio, fn, valptr)
Definition: drvem.cpp:76
#define U32_SFPEEPROM_base
Definition: evrRegMap.h:384
size_t nOFP
Definition: drvem.h:111
#define MRF_EVENT_TS_SHIFT_0
Definition: mrfCommon.h:113
size_t nOFPUV
Definition: drvem.h:111
size_t nOBack
Definition: drvem.h:111
Front Panel.
Definition: output.h:20
MRMCML::outkind kind
Definition: drvem.h:115
#define MRF_EVENT_TS_SHIFT_1
Definition: mrfCommon.h:114
#define FWVersion_type_shift
Definition: evrRegMap.h:143
virtual std::string model() const OVERRIDE FINAL
Hardware model.
Definition: drvem.cpp:405
mrmBufRx bufrx
Definition: drvem.h:240
#define U32_DataTx_base
Definition: evrRegMap.h:344
size_t nPul
Definition: drvem.h:108
FP Universal.
Definition: output.h:21
std::string formFactorStr()
Definition: drvem.cpp:430
#define MRF_EVENT_TS_COUNTER_RST
Definition: mrfCommon.h:124
Backplane lines.
Definition: output.h:23
Definition: sfp.h:16
#define MRF_EVENT_TS_COUNTER_INC
Definition: mrfCommon.h:120
virtual void eventNotifyAdd(epicsUInt32, eventCallback, void *) OVERRIDE FINAL
Definition: drvem.cpp:931
epicsShareExtern epicsFloat64 FracSynthAnalyze(epicsUInt32 ControlWord, epicsFloat64 ReferenceFreq, epicsInt32 PrintFlag)
Definition: mrfFracSynth.c:844
const Config *const conf
Definition: drvem.h:236
epicsUInt8 code
Definition: drvem.h:52
epicsUInt32 fpgaFirmware()
Definition: drvem.cpp:411
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119
#define U32_SPIDData
Definition: mrmspi.cpp:23
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104
#define GTX_SFP_OFFSET
Definition: drvem.cpp:120
mrf::auto_ptr< SFP > sfp
Definition: drvem.h:241
epicsUInt32 baselen
Definition: drvem.h:238
#define U32_Scaler(N)
Definition: evrRegMap.h:197
#define GTX_FPUV_OFFSET
Definition: drvem.cpp:118

◆ ~EVRMRM()

EVRMRM::~EVRMRM ( )
virtual

Definition at line 370 of file drvem.cpp.

371 {
374  cleanup();
375 }
static void unregisterDev(const std::string &name)
Definition: spi.cpp:93
const std::string & name() const
Definition: object.h:393
bus_configuration * getBusConfiguration()
Definition: evr.cpp:58

Member Function Documentation

◆ clock()

virtual double EVRMRM::clock ( ) const
inlinevirtual

Find current LO settings

Returns
Clock rate in Hz

Implements EVR.

Definition at line 149 of file drvem.h.

150  {SCOPED_LOCK(evrLock);return eventClock;}
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ clockMode()

epicsUInt16 EVRMRM::clockMode ( ) const

Definition at line 611 of file drvem.cpp.

612 {
614 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define ClkCtrl_clkmd_SHIFT
Definition: evrRegMap.h:156
#define ClkCtrl_clkmd_MASK
Definition: evrRegMap.h:155

◆ clockModeSet()

void EVRMRM::clockModeSet ( epicsUInt16  mode)

Definition at line 617 of file drvem.cpp.

618 {
619  epicsUInt32 cur = READ32(base, ClkCtrl);
620  cur &= ~ClkCtrl_clkmd_MASK;
621  cur |= (epicsUInt32(mode)<<ClkCtrl_clkmd_SHIFT)&ClkCtrl_clkmd_MASK;
622  WRITE32(base, ClkCtrl, cur);
623 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define ClkCtrl_clkmd_SHIFT
Definition: evrRegMap.h:156
#define ClkCtrl_clkmd_MASK
Definition: evrRegMap.h:155
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119

◆ clockSet()

void EVRMRM::clockSet ( double  clk)
virtual

Set LO frequency

Parameters
clkClock rate in Hz

Implements EVR.

Definition at line 570 of file drvem.cpp.

571 {
572  double err;
573  // Set both the fractional synthesiser and microsecond
574  // divider.
575  printf("Set EVR clock %f\n",freq);
576 
577  freq/=1e6;
578 
579  epicsUInt32 newfrac=FracSynthControlWord(
580  freq, fracref, 0, &err);
581 
582  if(newfrac==0)
583  throw std::out_of_range("New frequency can't be used");
584 
585  SCOPED_LOCK(evrLock);
586 
587  epicsUInt32 oldfrac=READ32(base, FracDiv);
588 
589  if(newfrac!=oldfrac){
590  // Changing the control word disturbes the phase
591  // of the synthesiser which will cause a glitch.
592  // Don't change the control word unless needed.
593 
594  WRITE32(base, FracDiv, newfrac);
595 
596  eventClock=FracSynthAnalyze(READ32(base, FracDiv),
597  fracref,0)*1e6;
598  }
599 
600  // USecDiv is accessed as a 32 bit register, but
601  // only 16 are used.
602  epicsUInt16 oldudiv=READ32(base, USecDiv);
603  epicsUInt16 newudiv=(epicsUInt16)freq;
604 
605  if(newudiv!=oldudiv){
606  WRITE32(base, USecDiv, newudiv);
607  }
608 }
epicsShareExtern epicsUInt32 FracSynthControlWord(epicsFloat64 DesiredFreq, epicsFloat64 ReferenceFreq, epicsInt32 debugFlag, epicsFloat64 *Error)
Definition: mrfFracSynth.c:552
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
epicsShareExtern epicsFloat64 FracSynthAnalyze(epicsUInt32 ControlWord, epicsFloat64 ReferenceFreq, epicsInt32 PrintFlag)
Definition: mrfFracSynth.c:844
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ clockTS()

double EVRMRM::clockTS ( ) const
virtual

Find current TS settings

Returns
Clock rate in Hz

Implements EVR.

Definition at line 704 of file drvem.cpp.

705 {
706  //Note: acquires evrLock 3 times.
707 
708  TSSource src=SourceTS();
709  double eclk=clock();
710 
711  if( (src!=TSSourceInternal) ||
712  ((src==TSSourceInternal) && (stampClock>eclk)))
713  return stampClock;
714 
715  epicsUInt16 div=tsDiv();
716 
717  return eclk/div;
718 }
virtual double clock() const OVERRIDE FINAL
Definition: drvem.h:149
TSSource
Definition: evr.h:31
virtual TSSource SourceTS() const OVERRIDE FINAL
Definition: drvem.h:174
virtual epicsUInt32 tsDiv() const OVERRIDE FINAL
When using internal TS source gives the divider from event clock period to TS period.
Definition: drvem.h:170

◆ clockTSSet()

void EVRMRM::clockTSSet ( double  )
virtual

Set TS frequency

Parameters
clkClock rate in Hz

Implements EVR.

Definition at line 721 of file drvem.cpp.

722 {
723  if(clk<0.0 || !isfinite(clk))
724  throw std::out_of_range("TS Clock rate invalid");
725 
726  TSSource src=SourceTS();
727  double eclk=clock();
728 
729  /* There is an issue with this and the embedded EVRs of the mTCA EVM vers
730  * 280b0207. The register holding the fractional synthesizer configuration
731  * word is empty, so eclk always resolves to 0, and so does clk. This messes
732  * up with the delay generators width/delay settings. By removing this check
733  * clockTS() can be used for the calculation of the width/delay.
734  * if(clk>eclk*1.01 || clk==0.0)
735  */
736  if(clk==0.0)
737  clk=eclk;
738 
739  SCOPED_LOCK(evrLock);
740 
741  if(src==TSSourceInternal){
742  epicsUInt16 div=roundToUInt(eclk/clk, 0xffff);
743  WRITE32(base, CounterPS, div);
744 
745  shadowCounterPS=div;
746  }
747 
748  stampClock=clk;
749 }
virtual double clock() const OVERRIDE FINAL
Definition: drvem.h:149
volatile unsigned char *const base
Definition: drvem.h:237
TSSource
Definition: evr.h:31
#define isfinite
Definition: mrfCommon.h:326
virtual TSSource SourceTS() const OVERRIDE FINAL
Definition: drvem.h:174
epicsUInt32 roundToUInt(double val, epicsUInt32 max)
Definition: mrfCommon.cpp:42
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ convertTS()

bool EVRMRM::convertTS ( epicsTimeStamp *  ts)

In place conversion between raw posix sec+ticks to EPICS sec+nsec.

Returns
false if conversion failed

Definition at line 844 of file drvem.cpp.

845 {
846  // First validate the input
847 
848  //Has it been initialized?
849  if(ts->secPastEpoch==0 || ts->nsec==0){
850  return false;
851  }
852 
853  // recurrence of an invalid time
854  if(ts->secPastEpoch==lastInvalidTimestamp) {
855  timestampValid=0;
856  scanIoRequest(timestampValidChange);
857  if(evrMrmTimeDebug>0)
858  errlogPrintf("TS convert repeats known bad value new %08x bad %08x\n",
859  (unsigned)ts->secPastEpoch, (unsigned)lastInvalidTimestamp);
860  return false;
861  }
862 
863  /* Reported seconds timestamp should be no more
864  * then 1sec in the future.
865  * reporting values in the past should be caught by
866  * generalTime
867  */
868  if(ts->secPastEpoch > lastValidTimestamp+1)
869  {
870  errlogPrintf("EVR ignoring invalid TS %08x %08x (expect %08x)\n",
871  ts->secPastEpoch, ts->nsec, lastValidTimestamp);
872  timestampValid=0;
873  scanIoRequest(timestampValidChange);
874  return false;
875  }
876 
877  // Convert ticks to nanoseconds
878  double period=1e9/clockTS(); // in nanoseconds
879 
880  if(period<=0 || !isfinite(period))
881  return false;
882 
883  ts->nsec=(epicsUInt32)(ts->nsec*period);
884 
885  // 1 sec. reset is late
886  if(ts->nsec>=1000000000u) {
887  if(evrMrmTimeDebug>0)
888  errlogPrintf("TS convert NS overflow %08x %08x oflow=%u\n",
889  (unsigned)ts->secPastEpoch, (unsigned)ts->nsec,
890  unsigned(ts->nsec-1000000000u));
891 
892  // out of bounds
893  if(int(ts->nsec-1000000000u)>=evrMrmTimeNSOverflowThreshold) {
894  errlogPrintf("TS out of bounds %08x %08x oflow %d evrMrmTimeNSOverflowThreshold %u diff %d\n",
895  (unsigned)ts->secPastEpoch, (unsigned)ts->nsec,
896  int(ts->nsec-1000000000u), evrMrmTimeNSOverflowThreshold,
897  int(ts->nsec-1000000000u)-evrMrmTimeNSOverflowThreshold);
898  timestampValid=0;
899  lastInvalidTimestamp=ts->secPastEpoch;
900  scanIoRequest(timestampValidChange);
901 
902  return false;
903  }
904  // otherwise, truncate
905  ts->nsec = 999999999u;
906  }
907 
908  //Link seconds counter is POSIX time
909  ts->secPastEpoch-=POSIX_TIME_AT_EPICS_EPOCH;
910 
911  return true;
912 }
#define isfinite
Definition: mrfCommon.h:326
int evrMrmTimeDebug
Definition: drvem.cpp:62
virtual double clockTS() const OVERRIDE FINAL
Definition: drvem.cpp:704
int evrMrmTimeNSOverflowThreshold
Definition: drvem.cpp:67

◆ dbus()

epicsUInt16 EVRMRM::dbus ( ) const
virtual

Implements EVR.

Definition at line 957 of file drvem.cpp.

958 {
959  return (READ32(base, Status) & Status_dbus_mask) >> Status_dbus_shift;
960 }
#define Status_dbus_mask
Definition: evrRegMap.h:48
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define Status_dbus_shift
Definition: evrRegMap.h:49

◆ dcEnable()

void EVRMRM::dcEnable ( bool  v)

Definition at line 969 of file drvem.cpp.

970 {
971  if(v)
972  BITSET32(base, Control, Control_DCEna);
973  else
974  BITCLR32(base, Control, Control_DCEna);
975 }
#define BITSET32(base, offset, mask)
Definition: mrfCommonIO.h:124
volatile unsigned char *const base
Definition: drvem.h:237
#define BITCLR32(base, offset, mask)
Definition: mrfCommonIO.h:129
#define Control_DCEna
Definition: evrRegMap.h:73

◆ dcEnabled()

bool EVRMRM::dcEnabled ( ) const

Definition at line 963 of file drvem.cpp.

964 {
965  return READ32(base, Control) & Control_DCEna;
966 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define Control_DCEna
Definition: evrRegMap.h:73

◆ dcInternal()

double EVRMRM::dcInternal ( ) const

Delay compensation applied.

Definition at line 1002 of file drvem.cpp.

1003 {
1004  double period=1e9/clock(); // in nanoseconds
1005  return double(READ32(base, DCIntVal))/65536.0*period;
1006 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
virtual double clock() const OVERRIDE FINAL
Definition: drvem.h:149
volatile unsigned char *const base
Definition: drvem.h:237

◆ dcRx()

double EVRMRM::dcRx ( ) const

Measured delay.

Definition at line 995 of file drvem.cpp.

996 {
997  double period=1e9/clock(); // in nanoseconds
998  return double(READ32(base, DCRxVal))/65536.0*period;
999 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
virtual double clock() const OVERRIDE FINAL
Definition: drvem.h:149
volatile unsigned char *const base
Definition: drvem.h:237

◆ dcStatusRaw()

epicsUInt32 EVRMRM::dcStatusRaw ( ) const

Definition at line 1009 of file drvem.cpp.

1010 {
1011  return READ32(base, DCStatus);
1012 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237

◆ dcTarget()

double EVRMRM::dcTarget ( ) const

Definition at line 978 of file drvem.cpp.

979 {
980  double period=1e9/clock(); // in nanoseconds
981  return double(READ32(base, DCTarget))/65536.0*period;
982 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
virtual double clock() const OVERRIDE FINAL
Definition: drvem.h:149
volatile unsigned char *const base
Definition: drvem.h:237

◆ dcTargetSet()

void EVRMRM::dcTargetSet ( double  val)

Definition at line 985 of file drvem.cpp.

986 {
987  double period=1e9/clock(); // in nanoseconds
988 
989  val /= period;
990  val *= 65536.0;
991  WRITE32(base, DCTarget, val);
992 }
virtual double clock() const OVERRIDE FINAL
Definition: drvem.h:149
volatile unsigned char *const base
Definition: drvem.h:237
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119

◆ dummy()

epicsUInt32 EVRMRM::dummy ( ) const
inline

Definition at line 222 of file drvem.h.

222 { return 0; }

◆ enable()

void EVRMRM::enable ( bool  v)
virtual

Implements EVR.

Definition at line 483 of file drvem.cpp.

484 {
485  SCOPED_LOCK(evrLock);
486  if(v)
488  else
490 }
#define BITCLR(ord, len, base, offset, mask)
Definition: mrfBitOps.h:26
volatile unsigned char *const base
Definition: drvem.h:237
#define Control_outena
Definition: evrRegMap.h:65
#define Control_mapena
Definition: evrRegMap.h:82
#define Control_enable
Definition: evrRegMap.h:56
#define Control_evtfwd
Definition: evrRegMap.h:58
#define BITSET(ord, len, base, offset, mask)
Definition: mrfBitOps.h:21
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ enabled()

bool EVRMRM::enabled ( ) const
virtual

Implements EVR.

Definition at line 476 of file drvem.cpp.

477 {
478  epicsUInt32 v = READ32(base, Control);
479  return (v&Control_enable) != 0;
480 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define Control_enable
Definition: evrRegMap.h:56

◆ enableIRQ()

void EVRMRM::enableIRQ ( void  )

Definition at line 1116 of file drvem.cpp.

1117 {
1118  interruptLock I;
1119 
1120  shadowIRQEna = IRQ_Enable
1122  |IRQ_Heartbeat
1124  |IRQ_SoS |IRQ_EoS;
1125 
1126  // IRQ PCIe enable flag should not be changed. Possible RACER here
1127  shadowIRQEna |= (IRQ_PCIee & (READ32(base, IRQEnable)));
1128 
1129  WRITE32(base, IRQEnable, shadowIRQEna);
1130 }
#define IRQ_SoS
Definition: evrRegMap.h:94
#define IRQ_Heartbeat
Definition: mrf.h:111
#define IRQ_FIFOFull
Definition: mrf.h:112
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define IRQ_PCIee
Definition: mrf.h:119
#define IRQEnable
Definition: mrf.h:115
#define IRQ_RXErr
Definition: mrf.h:113
#define IRQ_Event
Definition: mrf.h:110
#define IRQ_Enable
Definition: mrf.h:117
#define IRQ_EoS
Definition: evrRegMap.h:93
#define IRQ_BufFull
Definition: mrf.h:108
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119

◆ eventNotifyAdd()

void EVRMRM::eventNotifyAdd ( epicsUInt32  event,
eventCallback  cb,
void *  arg 
)
virtual

Implements EVR.

Definition at line 931 of file drvem.cpp.

932 {
933  if (event==0 || event>255)
934  throw std::out_of_range("Invalid event number");
935 
936  SCOPED_LOCK2(evrLock, guard);
937 
938  events[event].notifiees.push_back( std::make_pair(cb,arg));
939 
940  interestedInEvent(event, true);
941 }
virtual bool interestedInEvent(epicsUInt32 event, bool set) OVERRIDE FINAL
Definition: drvem.cpp:752
notifiees_t notifiees
Definition: drvem.h:69
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ eventNotifyDel()

void EVRMRM::eventNotifyDel ( epicsUInt32  event,
eventCallback  cb,
void *  arg 
)
virtual

Implements EVR.

Definition at line 944 of file drvem.cpp.

945 {
946  if (event==0 || event>255)
947  throw std::out_of_range("Invalid event number");
948 
949  SCOPED_LOCK2(evrLock, guard);
950 
951  events[event].notifiees.remove(std::make_pair(cb,arg));
952 
953  interestedInEvent(event, false);
954 }
virtual bool interestedInEvent(epicsUInt32 event, bool set) OVERRIDE FINAL
Definition: drvem.cpp:752
notifiees_t notifiees
Definition: drvem.h:69
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ eventOccurred()

IOSCANPVT EVRMRM::eventOccurred ( epicsUInt32  event) const
virtual

Implements EVR.

Definition at line 922 of file drvem.cpp.

923 {
924  if (event>0 && event<=255)
925  return events[event].occured;
926  else
927  return NULL;
928 }
IOSCANPVT occured
Definition: drvem.h:66

◆ extInhib()

bool EVRMRM::extInhib ( ) const
virtual

Using external hardware input for inhibit?

Implements EVR.

Definition at line 632 of file drvem.cpp.

633 {
634  epicsUInt32 v = READ32(base, Control);
635  return (v&Control_GTXio) != 0;
636 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define Control_GTXio
Definition: evrRegMap.h:71

◆ FIFOEvtCount()

virtual epicsUInt32 EVRMRM::FIFOEvtCount ( ) const
inlinevirtual

Implements EVR.

Definition at line 200 of file drvem.h.

200 {return count_fifo_events;}

◆ FIFOFullCount()

virtual epicsUInt32 EVRMRM::FIFOFullCount ( ) const
inlinevirtual

Implements EVR.

Definition at line 196 of file drvem.h.

197  {SCOPED_LOCK(evrLock);return count_FIFO_overflow;}
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ FIFOLoopCount()

virtual epicsUInt32 EVRMRM::FIFOLoopCount ( ) const
inlinevirtual

Implements EVR.

Definition at line 201 of file drvem.h.

201 {return count_fifo_loops;}

◆ FIFOOverRate()

virtual epicsUInt32 EVRMRM::FIFOOverRate ( ) const
inlinevirtual

Implements EVR.

Definition at line 198 of file drvem.h.

199  {SCOPED_LOCK(evrLock);return count_FIFO_sw_overrate;}
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ formFactorStr()

std::string EVRMRM::formFactorStr ( )

Definition at line 430 of file drvem.cpp.

430  {
431  std::string text;
432  formFactor form;
433 
434  form = getFormFactor();
435  switch(form){
436  case formFactor_CPCI:
437  text = "CompactPCI 3U";
438  break;
439 
440  case formFactor_CPCIFULL:
441  text = "CompactPCI 6U";
442  break;
443 
444  case formFactor_CRIO:
445  text = "CompactRIO";
446  break;
447 
448  case formFactor_PCIe:
449  text = "PCIe";
450  break;
451 
452  case formFactor_mTCA:
453  text = "mTCA";
454  break;
455 
456  case formFactor_PXIe:
457  text = "PXIe";
458  break;
459 
460  case formFactor_PMC:
461  text = "PMC";
462  break;
463 
464  case formFactor_VME64:
465  text = "VME 64";
466  break;
467 
468  default:
469  text = "Unknown form factor";
470  }
471 
472  return text;
473 }
formFactor getFormFactor()
Definition: drvem.cpp:421
formFactor

◆ fpgaFirmware()

epicsUInt32 EVRMRM::fpgaFirmware ( )

Definition at line 411 of file drvem.cpp.

411  {
412  return READ32(base, FWVersion);
413 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237

◆ getFormFactor()

formFactor EVRMRM::getFormFactor ( )

Definition at line 421 of file drvem.cpp.

421  {
422  epicsUInt32 v = READ32(base, FWVersion);
423  epicsUInt32 form = (v&FWVersion_form_mask)>>FWVersion_form_shift;
424 
425  if(form <= formFactor_mTCA) return (formFactor)form;
426  else return formFactor_unknown;
427 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define FWVersion_form_shift
Definition: evrRegMap.h:145
formFactor
#define FWVersion_form_mask
Definition: evrRegMap.h:144

◆ getTicks()

bool EVRMRM::getTicks ( epicsUInt32 *  tks)
virtual

Returns the current value of the Timestamp Event Counter

Parameters
tksPointer to be filled with the counter value
Returns
false if the counter value is not valid

Implements EVR.

Definition at line 915 of file drvem.cpp.

916 {
917  *tks=READ32(base, TSEvt);
918  return true;
919 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237

◆ getTimeStamp()

bool EVRMRM::getTimeStamp ( epicsTimeStamp *  ts,
epicsUInt32  event 
)
virtual

Gives the current time stamp as sec+nsec

Parameters
tsThis pointer will be filled in with the current time
eventN<=0 Return the current wall clock time
eventN>0 Return the time the most recent event # N was received.
Returns
true When ts was updated
false When ts could not be updated

Implements EVR.

Definition at line 782 of file drvem.cpp.

783 {
784  if(!ret) throw std::runtime_error("Invalid argument");
785  epicsTimeStamp ts;
786 
787  SCOPED_LOCK(evrLock);
788  if(timestampValid<TSValidThreshold) return false;
789 
790  if(event>0 && event<=255) {
791  // Get time of last event code #
792 
793  eventCode *entry=&events[event];
794 
795  // Fail if event is not mapped
796  if (!entry->interested ||
797  ( entry->last_sec==0 &&
798  entry->last_evt==0) )
799  {
800  return false;
801  }
802 
803  ts.secPastEpoch=entry->last_sec;
804  ts.nsec=entry->last_evt;
805 
806 
807  } else {
808  // Get current absolute time
809 
810  epicsUInt32 ctrl=READ32(base, Control);
811 
812  // Latch timestamp
813  WRITE32(base, Control, ctrl|Control_tsltch);
814 
815  ts.secPastEpoch=READ32(base, TSSecLatch);
816  ts.nsec=READ32(base, TSEvtLatch);
817 
818  /* BUG: There was a firmware bug which occasionally
819  * causes the previous write to fail with a VME bus
820  * error, and 0 the Control register.
821  *
822  * This issues has been fixed in VME firmwares EVRv 5
823  * pre2 and EVG v3 pre2. Feb 2011
824  */
825  epicsUInt32 ctrl2=READ32(base, Control);
826  if (ctrl2!=ctrl) { // tsltch bit is write-only
827  printf("Get timestamp: control register write fault. Written: %08x, readback: %08x\n",ctrl,ctrl2);
828  WRITE32(base, Control, ctrl);
829  }
830 
831  }
832 
833  if(!convertTS(&ts))
834  return false;
835 
836  *ret = ts;
837  return true;
838 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
size_t interested
Definition: drvem.h:58
volatile unsigned char *const base
Definition: drvem.h:237
bool convertTS(epicsTimeStamp *ts)
In place conversion between raw posix sec+ticks to EPICS sec+nsec.
Definition: drvem.cpp:844
epicsUInt32 last_evt
Definition: drvem.h:61
#define Control_tsltch
Definition: evrRegMap.h:80
epicsUInt32 last_sec
Definition: drvem.h:60
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104
#define TSValidThreshold
Definition: drvem.cpp:115

◆ gpio()

MRMGpio * EVRMRM::gpio ( )

Definition at line 500 of file drvem.cpp.

500  {
501  return &gpio_;
502 }

◆ heartbeatTIMOCount()

virtual epicsUInt32 EVRMRM::heartbeatTIMOCount ( ) const
inlinevirtual

Implements EVR.

Definition at line 193 of file drvem.h.

193 {return count_heartbeat;}

◆ heartbeatTIMOOccured()

virtual IOSCANPVT EVRMRM::heartbeatTIMOOccured ( ) const
inlinevirtual

Implements EVR.

Definition at line 194 of file drvem.h.

194 {return IRQheartbeat;}

◆ interestedInEvent()

bool EVRMRM::interestedInEvent ( epicsUInt32  event,
bool  set 
)
virtual

Indicate (lack of) interest in a particular event code. This allows an EVR to ignore event codes which are not needed.

Implements EVR.

Definition at line 752 of file drvem.cpp.

753 {
754  if (!event || event>255) return false;
755 
756  eventCode *entry=&events[event];
757 
758  SCOPED_LOCK(evrLock);
759 
760  if ( (set && entry->interested==0) // first interested
761  || (!set && entry->interested==1) // or last un-interested
762  ) {
763  specialSetMap(event, ActionFIFOSave, set);
764  }
765 
766  if (set)
767  entry->interested++;
768  else
769  entry->interested--;
770 
771  return true;
772 }
size_t interested
Definition: drvem.h:58
virtual void specialSetMap(epicsUInt32 code, epicsUInt32 func, bool) OVERRIDE FINAL
Definition: drvem.cpp:524
#define ActionFIFOSave
Definition: evrRegMap.h:371
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ irqCount()

virtual epicsUInt32 EVRMRM::irqCount ( ) const
inlinevirtual

Implements EVR.

Definition at line 158 of file drvem.h.

158 {return count_hardware_irq;}

◆ isr()

void EVRMRM::isr ( EVRMRM evr,
bool  pci 
)
static

Definition at line 1168 of file drvem.cpp.

1169 {
1170 
1171  epicsUInt32 flags=READ32(evr->base, IRQFlag);
1172 
1173  epicsUInt32 active=flags&evr->shadowIRQEna;
1174 
1175 #if defined(vxWorks) || defined(__rtems__)
1176  if(!active) {
1177 # ifdef __rtems__
1178  if(!pci)
1179  printk("EVRMRM::isr with no active VME IRQ 0x%08x 0x%08x\n", flags, evr->shadowIRQEna);
1180 #else
1181  (void)pci;
1182 # endif
1183  // this is a shared interrupt
1184  return;
1185  }
1186  // Note that VME devices do not normally shared interrupts
1187 #else
1188  // for Linux, shared interrupts are detected by the kernel module
1189  // so any notifications to userspace are real interrupts by this device
1190  (void)pci;
1191 #endif
1192 
1193  if(active&IRQ_RXErr){
1194  evr->count_recv_error++;
1195  scanIoRequest(evr->IRQrxError);
1196 
1197  evr->shadowIRQEna &= ~IRQ_RXErr;
1198  callbackRequest(&evr->poll_link_cb);
1199  }
1200  if(active&IRQ_BufFull){
1201  // Silence interrupt
1202  BITSET(NAT,32,evr->base, DataBufCtrl, DataBufCtrl_stop);
1203 
1204  callbackRequest(&evr->data_rx_cb);
1205  }
1206  if(active&IRQ_HWMapped){
1207  evr->shadowIRQEna &= ~IRQ_HWMapped;
1208  //TODO: think of a way to use this feature...
1209  }
1210  if(active&IRQ_Event){
1211  //FIFO not-empty
1212  evr->shadowIRQEna &= ~IRQ_Event;
1213  int wakeup=0;
1214  evr->drain_fifo_wakeup.trySend(&wakeup, sizeof(wakeup));
1215  }
1216  if(active&IRQ_Heartbeat){
1217  evr->count_heartbeat++;
1218  scanIoRequest(evr->IRQheartbeat);
1219  }
1220  if(active&IRQ_FIFOFull){
1221  evr->shadowIRQEna &= ~IRQ_FIFOFull;
1222  int wakeup=0;
1223  evr->drain_fifo_wakeup.trySend(&wakeup, sizeof(wakeup));
1224 
1225  scanIoRequest(evr->IRQfifofull);
1226  }
1227  if(active&IRQ_SoS && evr->seq.get()){
1228  evr->seq->doStartOfSequence(0);
1229  }
1230  if(active&IRQ_EoS && evr->seq.get()){
1231  evr->seq->doEndOfSequence(0);
1232  }
1233  evr->count_hardware_irq++;
1234 
1235  // IRQ PCIe enable flag should not be changed. Possible RACER here
1236  evr->shadowIRQEna |= (IRQ_PCIee & (READ32(evr->base, IRQEnable)));
1237 
1238  WRITE32(evr->base, IRQFlag, flags);
1239  WRITE32(evr->base, IRQEnable, evr->shadowIRQEna);
1240  // Ensure IRQFlags is written before returning.
1242 }
#define IRQ_SoS
Definition: evrRegMap.h:94
#define IRQ_Heartbeat
Definition: mrf.h:111
#define IRQ_FIFOFull
Definition: mrf.h:112
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define IRQ_PCIee
Definition: mrf.h:119
#define IRQEnable
Definition: mrf.h:115
#define IRQ_RXErr
Definition: mrf.h:113
volatile epicsUInt32 evrMrmIsrFlagsTrashCan
Definition: drvem.cpp:1165
#define IRQ_Event
Definition: mrf.h:110
#define DataBufCtrl_stop
Definition: evrRegMap.h:128
#define IRQFlag
Definition: mrf.h:106
#define IRQ_EoS
Definition: evrRegMap.h:93
#define IRQ_BufFull
Definition: mrf.h:108
#define IRQ_HWMapped
Definition: mrf.h:109
#define BITSET(ord, len, base, offset, mask)
Definition: mrfBitOps.h:21
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119

◆ isr_pci()

void EVRMRM::isr_pci ( void *  arg)
static

Definition at line 1133 of file drvem.cpp.

1133  {
1134  EVRMRM *evr=static_cast<EVRMRM*>(arg);
1135 
1136  // Calling the default platform-independent interrupt routine
1137  evr->isr(evr, true);
1138 
1139 #if defined(__linux__) || defined(_WIN32)
1140  if(devPCIEnableInterrupt((const epicsPCIDevice*)evr->isrLinuxPvt)) {
1141  printf("Failed to re-enable interrupt. Stuck...\n");
1142  }
1143 #endif
1144 }
Modular Register Map Event Receivers.
Definition: drvem.h:94
static void isr(EVRMRM *evr, bool pci)
Definition: drvem.cpp:1168

◆ isr_poll()

void EVRMRM::isr_poll ( void *  arg)
static

Definition at line 1155 of file drvem.cpp.

1155  {
1156  EVRMRM *evr=static_cast<EVRMRM*>(arg);
1157 
1158  // Calling the default platform-independent interrupt routine
1159  evr->isr(evr, true);
1160 }
Modular Register Map Event Receivers.
Definition: drvem.h:94
static void isr(EVRMRM *evr, bool pci)
Definition: drvem.cpp:1168

◆ isr_vme()

void EVRMRM::isr_vme ( void *  arg)
static

Definition at line 1147 of file drvem.cpp.

1147  {
1148  EVRMRM *evr=static_cast<EVRMRM*>(arg);
1149 
1150  // Calling the default platform-independent interrupt routine
1151  evr->isr(evr, false);
1152 }
Modular Register Map Event Receivers.
Definition: drvem.h:94
static void isr(EVRMRM *evr, bool pci)
Definition: drvem.cpp:1168

◆ linkChanged()

virtual IOSCANPVT EVRMRM::linkChanged ( ) const
inlinevirtual

Implements EVR.

Definition at line 161 of file drvem.h.

161 {return IRQrxError;}

◆ linkStatus()

bool EVRMRM::linkStatus ( ) const
virtual

Implements EVR.

Definition at line 659 of file drvem.cpp.

660 {
661  return !(READ32(base, Status) & Status_legvio);
662 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define Status_legvio
Definition: evrRegMap.h:50

◆ lock()

virtual void EVRMRM::lock ( ) const
inlinevirtual

Implements mrf::Object.

Definition at line 129 of file drvem.h.

129 {evrLock.lock();}
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ mappedOutputState()

bool EVRMRM::mappedOutputState ( ) const
virtual

Implements EVR.

Definition at line 493 of file drvem.cpp.

494 {
496  return NAT_READ32(base, IRQFlag) & IRQ_HWMapped;
497 }
volatile unsigned char *const base
Definition: drvem.h:237
#define NAT_READ32(base, offset)
Definition: mrfCommonIO.h:145
#define IRQFlag
Definition: mrf.h:106
#define NAT_WRITE32(base, offset, value)
Definition: mrfCommonIO.h:148
#define IRQ_HWMapped
Definition: mrf.h:109

◆ model()

string EVRMRM::model ( ) const
virtual

Hardware model.

Implements EVR.

Definition at line 405 of file drvem.cpp.

406 {
407  return conf->model;
408 }
const char * model
Definition: drvem.h:107
const Config *const conf
Definition: drvem.h:236

◆ pllLocked()

bool EVRMRM::pllLocked ( ) const
virtual

Internal PLL Status.

Implements EVR.

Definition at line 649 of file drvem.cpp.

650 {
651  epicsUInt32 cur = READ32(base, ClkCtrl);
652  epicsUInt32 mask = ClkCtrl_cglock;
653  if(version()>=MRFVersion(2, 7, 0))
654  mask |= ClkCtrl_plllock;
655  return (cur&mask)==mask;
656 }
#define ClkCtrl_cglock
Definition: evrRegMap.h:157
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define ClkCtrl_plllock
Definition: evrRegMap.h:154
virtual MRFVersion version() const OVERRIDE FINAL
Firmware Version.
Definition: drvem.cpp:415

◆ psPolarity()

bool EVRMRM::psPolarity ( ) const

Definition at line 1015 of file drvem.cpp.

1015  {
1016  return READ32(base, Control) & Control_pspol;
1017 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define Control_pspol
Definition: evrRegMap.h:75

◆ psPolaritySet()

void EVRMRM::psPolaritySet ( bool  v)

Definition at line 1020 of file drvem.cpp.

1021 {
1022  if(v)
1023  BITSET32(base, Control, Control_pspol);
1024  else
1025  BITCLR32(base, Control, Control_pspol);
1026 }
#define BITSET32(base, offset, mask)
Definition: mrfCommonIO.h:124
volatile unsigned char *const base
Definition: drvem.h:237
#define Control_pspol
Definition: evrRegMap.h:75
#define BITCLR32(base, offset, mask)
Definition: mrfCommonIO.h:129

◆ recvErrorCount()

virtual epicsUInt32 EVRMRM::recvErrorCount ( ) const
inlinevirtual

Implements EVR.

Definition at line 162 of file drvem.h.

162 {return count_recv_error;}

◆ setEvtCode()

void EVRMRM::setEvtCode ( epicsUInt32  code)
virtual

Implements TimeStampSource.

Definition at line 1035 of file drvem.cpp.

1036 {
1037  if(code==0) return;
1038  else if(code>255) throw std::runtime_error("Event code out of range");
1039  SCOPED_LOCK(evrLock);
1040 
1041  unsigned i;
1042 
1043  // spin fast
1044  for(i=0; i<100 && READ32(base, SwEvent) & SwEvent_Pend; i++) {}
1045 
1046  if(i==100) {
1047  // spin slow for <= 50ms
1048  for(i=0; i<5 && READ32(base, SwEvent) & SwEvent_Pend; i++)
1049  epicsThreadSleep(0.01);
1050 
1051  if(i==5)
1052  throw std::runtime_error("SwEvent timeout");
1053  }
1054 
1056 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
#define SwEvent_Code_SHIFT
Definition: evgRegMap.h:91
#define SwEvent_Ena
Definition: evgRegMap.h:88
#define SwEvent_Pend
Definition: evgRegMap.h:89
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ setExtInhib()

void EVRMRM::setExtInhib ( bool  v)
virtual

Implements EVR.

Definition at line 639 of file drvem.cpp.

640 {
641  SCOPED_LOCK(evrLock);
642  if(v)
643  BITSET(NAT,32,base, Control, Control_GTXio);
644  else
645  BITCLR(NAT,32,base, Control, Control_GTXio);
646 }
#define BITCLR(ord, len, base, offset, mask)
Definition: mrfBitOps.h:26
volatile unsigned char *const base
Definition: drvem.h:237
#define Control_GTXio
Definition: evrRegMap.h:71
#define BITSET(ord, len, base, offset, mask)
Definition: mrfBitOps.h:21
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ setSourceTS()

void EVRMRM::setSourceTS ( TSSource  )
virtual

Select source which increments TS counter.

Implements EVR.

Definition at line 665 of file drvem.cpp.

666 {
667  double clk=clockTS(), eclk=clock();
668  epicsUInt16 div=0;
669 
670  if(clk<=0 || !isfinite(clk))
671  throw std::out_of_range("TS Clock rate invalid");
672 
673  switch(src){
674  case TSSourceInternal:
675  case TSSourceEvent:
676  case TSSourceDBus4:
677  break;
678  default:
679  throw std::out_of_range("TS source invalid");
680  }
681 
682  SCOPED_LOCK(evrLock);
683 
684  switch(src){
685  case TSSourceInternal:
686  // div!=0 selects src internal
687  div=roundToUInt(eclk/clk, 0xffff);
688  break;
689  case TSSourceEvent:
690  BITCLR(NAT,32, base, Control, Control_tsdbus);
691  // div=0
692  break;
693  case TSSourceDBus4:
694  BITSET(NAT,32, base, Control, Control_tsdbus);
695  // div=0
696  break;
697  }
698  WRITE32(base, CounterPS, div);
699  shadowCounterPS=div;
700  shadowSourceTS=src;
701 }
#define BITCLR(ord, len, base, offset, mask)
Definition: mrfBitOps.h:26
virtual double clock() const OVERRIDE FINAL
Definition: drvem.h:149
#define Control_tsdbus
Definition: evrRegMap.h:78
volatile unsigned char *const base
Definition: drvem.h:237
#define isfinite
Definition: mrfCommon.h:326
virtual double clockTS() const OVERRIDE FINAL
Definition: drvem.cpp:704
epicsUInt32 roundToUInt(double val, epicsUInt32 max)
Definition: mrfCommon.cpp:42
#define BITSET(ord, len, base, offset, mask)
Definition: mrfBitOps.h:21
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ setTimeSrc()

void EVRMRM::setTimeSrc ( epicsUInt32  mode)

Definition at line 1064 of file drvem.cpp.

1065 {
1066  switch((timeSrcMode_t)raw) {
1067  case Disable:
1068  case External:
1069  case SysClk:
1070  break;
1071  default:
1072  throw std::runtime_error("Unsupported time source mode");
1073  }
1074  timeSrcMode_t mode((timeSrcMode_t)raw);
1075 
1076  bool changed;
1077  {
1078  SCOPED_LOCK(evrLock);
1079 
1080  changed = timeSrcMode!=mode;
1081 
1082  timeSrcMode = mode;
1083  }
1084 
1085  if(changed)
1086  softSecondsSrc(mode==SysClk);
1087 }
void softSecondsSrc(bool enable)
enable sending of event 125 by software timer. Simulation of external HW clock
Definition: mrmtimesrc.cpp:231
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ SourceTS()

virtual TSSource EVRMRM::SourceTS ( ) const
inlinevirtual

Implements EVR.

Definition at line 174 of file drvem.h.

175  {SCOPED_LOCK(evrLock);return shadowSourceTS;}
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ specialMapped()

bool EVRMRM::specialMapped ( epicsUInt32  code,
epicsUInt32  func 
) const
virtual

Hook to handle general event mapping table manipulation. Allows 'special' events only (ie heartbeat, log, led, etc) Normal mappings (pulsers, outputs) must be made through the appropriate class (Pulser, Output).

Note: this is one place where Device Support will have some depth.

Implements EVR.

Definition at line 505 of file drvem.cpp.

506 {
507  if(code>255)
508  throw std::out_of_range("Event code is out of range (0-255)");
509  if(func>127 || func<96 ||
510  (func<=121 && func>=102) )
511  {
512  throw std::out_of_range("Special function code is out of range. Valid ranges: 96-101 and 122-127");
513  }
514 
515  if(code==0)
516  return false;
517 
518  SCOPED_LOCK(evrLock);
519 
520  return _ismap(code,func-96);
521 }
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ specialSetMap()

void EVRMRM::specialSetMap ( epicsUInt32  code,
epicsUInt32  func,
bool  v 
)
virtual

Implements EVR.

Definition at line 524 of file drvem.cpp.

525 {
526  if(code>255)
527  throw std::out_of_range("Event code is out of range");
528  /* The special function codes are the range 96 to 127, excluding 102 to 121
529  */
530  if(func>127 || func<96 ||
531  (func<=121 && func>=102) )
532  {
533  errlogPrintf("EVR %s code %02x func %3d out of range. Code range is 0-255, where function rangs are 96-101 and 122-127\n",
534  name().c_str(), code, func);
535  throw std::out_of_range("Special function code is out of range. Valid ranges: 96-101 and 122-127");
536  }
537 
538  if(code==0)
539  return;
540 
541  /* The way the latch timestamp is implimented in hardware (no status bit)
542  * makes it impossible to use the latch mapping and the latch control register
543  * bits at the same time. We use the control register bits.
544  * However, there is not much loss of functionality since all events
545  * can be timestamped in the FIFO.
546  */
547  if(func==126)
548  throw std::out_of_range("Use of latch timestamp special function code is not allowed");
549 
550  epicsUInt32 bit =func%32;
551  epicsUInt32 mask=1<<bit;
552 
553  SCOPED_LOCK(evrLock);
554 
555  epicsUInt32 val=READ32(base, MappingRam(0, code, Internal));
556 
557  if (v == _ismap(code,func-96)) {
558  // mapping already set defined
559 
560  } else if(v) {
561  _map(code,func-96);
562  WRITE32(base, MappingRam(0, code, Internal), val|mask);
563  } else {
564  _unmap(code,func-96);
565  WRITE32(base, MappingRam(0, code, Internal), val&~mask);
566  }
567 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237
const std::string & name() const
Definition: object.h:393
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ timeSrc()

epicsUInt32 EVRMRM::timeSrc ( ) const

Definition at line 1058 of file drvem.cpp.

1059 {
1060  SCOPED_LOCK(evrLock);
1061  return timeSrcMode;
1062 }
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ TimeStampValid()

bool EVRMRM::TimeStampValid ( ) const
virtual

Implements EVR.

Definition at line 775 of file drvem.cpp.

776 {
777  SCOPED_LOCK(evrLock);
778  return timestampValid>=TSValidThreshold;
779 }
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104
#define TSValidThreshold
Definition: drvem.cpp:115

◆ TimeStampValidEvent()

virtual IOSCANPVT EVRMRM::TimeStampValidEvent ( ) const
inlinevirtual

Implements EVR.

Definition at line 181 of file drvem.h.

181 {return timestampValidChange;}

◆ topId()

epicsUInt32 EVRMRM::topId ( ) const

Definition at line 1029 of file drvem.cpp.

1030 {
1031  return READ32(base, TOPID);
1032 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237

◆ tsDiv()

virtual epicsUInt32 EVRMRM::tsDiv ( ) const
inlinevirtual

When using internal TS source gives the divider from event clock period to TS period.

Implements EVR.

Definition at line 170 of file drvem.h.

171  {SCOPED_LOCK(evrLock);return shadowCounterPS;}
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ unlock()

virtual void EVRMRM::unlock ( ) const
inlinevirtual

Implements mrf::Object.

Definition at line 130 of file drvem.h.

130 {evrLock.unlock();};
epicsMutex evrLock
Guards access to instance All callers must take this lock before any operations on this object...
Definition: drvem.h:104

◆ uSecDiv()

epicsUInt32 EVRMRM::uSecDiv ( ) const
virtual

Approximate divider from event clock period to 1us.

Implements EVR.

Definition at line 626 of file drvem.cpp.

627 {
628  return READ32(base, USecDiv);
629 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237

◆ version()

MRFVersion EVRMRM::version ( ) const
virtual

Firmware Version.

Implements EVR.

Definition at line 415 of file drvem.cpp.

416 {
417  return MRFVersion(READ32(base, FWVersion));
418 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
volatile unsigned char *const base
Definition: drvem.h:237

Friends And Related Function Documentation

◆ EVRMRMTSBuffer

friend struct EVRMRMTSBuffer
friend

Definition at line 336 of file drvem.h.

Member Data Documentation

◆ base

volatile unsigned char* const EVRMRM::base

Definition at line 237 of file drvem.h.

◆ baselen

epicsUInt32 EVRMRM::baselen

Definition at line 238 of file drvem.h.

◆ bufrx

mrmBufRx EVRMRM::bufrx

Definition at line 240 of file drvem.h.

◆ buftx

mrmDataBufTx EVRMRM::buftx

Definition at line 239 of file drvem.h.

◆ conf

const Config* const EVRMRM::conf

Definition at line 236 of file drvem.h.

◆ evrLock

epicsMutex EVRMRM::evrLock
mutable

Guards access to instance All callers must take this lock before any operations on this object.

Definition at line 104 of file drvem.h.

◆ sfp

mrf::auto_ptr<SFP> EVRMRM::sfp

Definition at line 241 of file drvem.h.


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