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

#include <fct.h>

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

Public Member Functions

 FCT (evgMrm *evg, const std::string &id, volatile epicsUInt8 *const base)
 
virtual ~FCT ()
 
virtual void lock () const OVERRIDE FINAL
 
virtual void unlock () const OVERRIDE FINAL
 
epicsUInt16 statusRaw () const
 
double dcUpstream () const
 
double dcFIFO () const
 
double dcInternal () const
 
epicsUInt32 topoId () const
 
double dcPortN (unsigned port) const
 
template<int port>
double dcPort () const
 
- Public Member Functions inherited from mrf::ObjectInst< FCT >
virtual propertyBasegetPropertyBase (const char *pname, const std::type_info &ptype)
 
virtual void visitProperties (bool(*cb)(propertyBase *, void *), void *arg)
 
- 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< FCT >
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< FCT >
 ObjectInst (const std::string &n)
 
 ObjectInst (const std::string &n, A &a)
 
virtual ~ObjectInst ()
 
- Protected Member Functions inherited from mrf::Object
 Object (const std::string &n, const Object *par=0)
 
virtual ~Object ()=0
 

Detailed Description

Definition at line 19 of file fct.h.

Constructor & Destructor Documentation

◆ FCT()

FCT::FCT ( evgMrm evg,
const std::string &  id,
volatile epicsUInt8 *const  base 
)

Definition at line 21 of file fct.cpp.

23  ,evg(evg)
24  ,base(base)
25  ,sfp(8)
26 {
27  for(size_t i=0; i<sfp.size(); i++) {
28  std::ostringstream name;
29  name<<id<<":SFP"<<(i+1); // manual numbers SFP from 1
30  sfp[i] = new SFP(name.str(), base + 0x1000 + 0x200*i);
31  }
32 }
const std::string & name() const
Definition: object.h:393
Definition: sfp.h:16

◆ ~FCT()

FCT::~FCT ( )
virtual

Definition at line 34 of file fct.cpp.

34 {}

Member Function Documentation

◆ dcFIFO()

double FCT::dcFIFO ( ) const

Definition at line 50 of file fct.cpp.

51 {
52  double period=1e3/evg->getFrequency(); // in nanoseconds
53  return double(READ32(base, FIFODCValue))/65536.0*period;
54 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
epicsFloat64 getFrequency() const
Definition: evgEvtClk.cpp:15

◆ dcInternal()

double FCT::dcInternal ( ) const

Definition at line 56 of file fct.cpp.

57 {
58  double period=1e3/evg->getFrequency(); // in nanoseconds
59  return double(READ32(base, IntDCValue))/65536.0*period;
60 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
epicsFloat64 getFrequency() const
Definition: evgEvtClk.cpp:15

◆ dcPort()

template<int port>
double FCT::dcPort ( ) const
inline

Definition at line 41 of file fct.h.

41  {
42  return dcPortN(port);
43  }
double dcPortN(unsigned port) const
Definition: fct.cpp:67

◆ dcPortN()

double FCT::dcPortN ( unsigned  port) const

Definition at line 67 of file fct.cpp.

68 {
69  double period=1e3/evg->getFrequency(); // in nanoseconds
70  return READ32(base, PortNDCValue(port))/65536.0*period;
71 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
epicsFloat64 getFrequency() const
Definition: evgEvtClk.cpp:15

◆ dcUpstream()

double FCT::dcUpstream ( ) const

Definition at line 44 of file fct.cpp.

45 {
46  double period=1e3/evg->getFrequency(); // in nanoseconds
47  return double(READ32(base, UpDCValue))/65536.0*period;
48 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
epicsFloat64 getFrequency() const
Definition: evgEvtClk.cpp:15

◆ lock()

virtual void FCT::lock ( ) const
inlinevirtual

Implements mrf::Object.

Definition at line 28 of file fct.h.

28 {}

◆ statusRaw()

epicsUInt16 FCT::statusRaw ( ) const

Definition at line 36 of file fct.cpp.

37 {
38  epicsUInt32 cur = READ32(base, Status);
39  cur &= 0xff;
40  WRITE32(base, Control, cur); // clear VIO latches
41  return ~cur; // invert to get 1==Ok
42 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114
#define WRITE32(base, offset, value)
Definition: mrfCommonIO.h:119

◆ topoId()

epicsUInt32 FCT::topoId ( ) const

Definition at line 62 of file fct.cpp.

63 {
64  return READ32(base, TOPID);
65 }
#define READ32(base, offset)
Definition: mrfCommonIO.h:114

◆ unlock()

virtual void FCT::unlock ( ) const
inlinevirtual

Implements mrf::Object.

Definition at line 29 of file fct.h.

29 {}

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