mrfioc2  2.3.0
Public Member Functions | List of all members
MRMOutput Class Reference

#include <drvemOutput.h>

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

Public Member Functions

 MRMOutput (const std::string &n, EVRMRM *owner, OutputType t, unsigned int idx)
 
virtual ~MRMOutput ()
 
virtual void lock () const OVERRIDE FINAL
 
virtual void unlock () const OVERRIDE FINAL
 
virtual epicsUInt32 source () const OVERRIDE FINAL
 
virtual void setSource (epicsUInt32) OVERRIDE FINAL
 
epicsUInt32 source2 () const
 
void setSource2 (epicsUInt32)
 
virtual bool enabled () const OVERRIDE FINAL
 
virtual void enable (bool) OVERRIDE FINAL
 
- Public Member Functions inherited from mrf::ObjectInst< MRMOutput, Output >
virtual propertyBasegetPropertyBase (const char *pname, const std::type_info &ptype)
 
virtual void visitProperties (bool(*cb)(propertyBase *, void *), void *arg)
 
- Public Member Functions inherited from Output
 Output (const std::string &n)
 
virtual ~Output ()=0
 
- 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)
 

Additional Inherited Members

- 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)
 
- Static Public Member Functions inherited from mrf::ObjectInst< MRMOutput, Output >
static int initObject ()
 
- Static Public Member Functions inherited from mrf::ObjectInst< Output >
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 *)
 
- Protected Member Functions inherited from mrf::ObjectInst< MRMOutput, Output >
 ObjectInst (const std::string &n)
 
 ObjectInst (const std::string &n, A &a)
 
virtual ~ObjectInst ()
 
- Protected Member Functions inherited from mrf::ObjectInst< Output >
 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
 

Detailed Description

Controls only the single output mapping register shared by all (except CML) outputs on MRM EVRs.

This class is reused by other subunits which have identical mapping registers.

Definition at line 26 of file drvemOutput.h.

Constructor & Destructor Documentation

◆ MRMOutput()

MRMOutput::MRMOutput ( const std::string &  n,
EVRMRM owner,
OutputType  t,
unsigned int  idx 
)

Definition at line 22 of file drvemOutput.cpp.

23  :base_t(n)
24  ,owner(o)
25  ,type(t)
26  ,N(idx)
27  ,isEnabled(true)
28 {
29  shadowSource = sourceInternal();
30 }

◆ ~MRMOutput()

MRMOutput::~MRMOutput ( )
virtual

Definition at line 32 of file drvemOutput.cpp.

32 {}

Member Function Documentation

◆ enable()

void MRMOutput::enable ( bool  e)
virtual

Implements Output.

Definition at line 90 of file drvemOutput.cpp.

91 {
92  if(e==isEnabled)
93  return;
94 
95  isEnabled = e;
96 
97  setSourceInternal();
98 }

◆ enabled()

bool MRMOutput::enabled ( ) const
virtual

Implements Output.

Definition at line 84 of file drvemOutput.cpp.

85 {
86  return isEnabled;
87 }

◆ lock()

void MRMOutput::lock ( ) const
virtual

Implements mrf::Object.

Definition at line 34 of file drvemOutput.cpp.

34 {owner->lock();}
virtual void lock() const OVERRIDE FINAL
Definition: drvem.h:121

◆ setSource()

void MRMOutput::setSource ( epicsUInt32  v)
virtual

Implements Output.

Definition at line 50 of file drvemOutput.cpp.

51 {
52  if( ! ( (v<=63 && v>=61) ||
53  (v<=55 && v>=48) ||
54  (v<=42 && v>=32) ||
55  (v<=15) )
56  )
57  throw std::out_of_range("Mapping code is out of range");
58 
59  shadowSource &= 0xff00;
60  shadowSource |= v;
61 
62  if(isEnabled)
63  setSourceInternal();
64 }

◆ setSource2()

void MRMOutput::setSource2 ( epicsUInt32  v)

Definition at line 67 of file drvemOutput.cpp.

68 {
69  if( ! ( (v<=63 && v>=61) ||
70  (v<=55 && v>=48) ||
71  (v<=42 && v>=32) ||
72  (v<=15) )
73  )
74  throw std::out_of_range("Mapping code is out of range");
75 
76  shadowSource &= 0x00ff;
77  shadowSource |= v<<8;
78 
79  if(isEnabled)
80  setSourceInternal();
81 }

◆ source()

epicsUInt32 MRMOutput::source ( ) const
virtual

Implements Output.

Definition at line 38 of file drvemOutput.cpp.

39 {
40  return shadowSource&0xff;
41 }

◆ source2()

epicsUInt32 MRMOutput::source2 ( ) const

Definition at line 44 of file drvemOutput.cpp.

45 {
46  return (shadowSource>>8)&0xff;
47 }

◆ unlock()

void MRMOutput::unlock ( ) const
virtual

Implements mrf::Object.

Definition at line 35 of file drvemOutput.cpp.

35 {owner->unlock();}
virtual void unlock() const OVERRIDE FINAL
Definition: drvem.h:122

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