My Project  v0.0.16
TTCNode.hpp
Go to the documentation of this file.
1 #ifndef _mp7_TTCNode_hpp_
2 #define _mp7_TTCNode_hpp_
3 
4 // C++ Headers
5 #include <map>
6 
7 // MP7 Headers
8 #include "uhal/DerivedNode.hpp"
9 
10 namespace mp7 {
36  class TTCNode : public uhal::Node {
38 
39  const static uint32_t mBTestCode;
40  public:
41  TTCNode( const uhal::Node& aNode );
42  virtual ~TTCNode( );
43 
45  Clock40=0x0,
46  RefClock=0x1,
47  TxClock=0x2,
48  RxClock=0x3
49  };
50 
52  void enable( bool aEnable=true ) const;
53 
55  void generateInternalBC0( bool aEnable=true ) const;
56 
58  void clear( ) const;
59 
61  void sendBGo( uint32_t aCode ) const;
62 
64  void sendBTest() const;
65 
67  void captureData( double wait=1. /* seconds */ ) const;
68 
70  std::vector<uint64_t> captureBGOs( bool aMaskBC0=false, double aWaitSec=1 /* seconds */ ) const;
71 
73  std::vector<uint64_t> captureBGOs_old( bool aMaskBC0=false, double aWaitSec=1.1 /* seconds */ ) const;
74 
76  void waitBC0Lock( ) const;
77 
79  double measureClockFreq( FreqClockChannel aFreqChan, double aWait=1.1 /* seconds */ ) const;
80 
82  double freqClk40( double aWait=1.1 ) const;
83 
85  void resetClk40( bool aReset ) const;
86 
87  boost::unordered_map<std::string, std::string> report() const;
88 
89 
90  };
91 }
92 #endif /* _mp7_TTCNode_hpp_ */
93 
94 
double measureClockFreq( FreqClockChannel aFreqChan, double aWait=1.1 ) const
measurement of clock frequencies
Definition: TTCNode.cpp:213
void generateInternalBC0( bool aEnable=true ) const
Enable internal BC0s.
Definition: TTCNode.cpp:36
-test-ipbusaccess
Definition: AlignmentNode.hpp:15
UHAL_DERIVEDNODE( TTCNode ) const static uint32_t mBTestCode
Definition: TTCNode.hpp:48
TTCNode( const uhal::Node& aNode )
Definition: TTCNode.cpp:22
void waitBC0Lock( ) const
wait for BC0Lock
Definition: TTCNode.cpp:184
boost::unordered_map<std::string, std::string> report() const
Definition: TTCNode.cpp:249
void captureData( double wait=1. ) const
run buffers
Definition: TTCNode.cpp:62
void sendBGo( uint32_t aCode ) const
Send BGo.
Definition: TTCNode.cpp:51
std::vector<uint64_t> captureBGOs_old( bool aMaskBC0=false, double aWaitSec=1.1 ) const
capture the incoming BGOs
Definition: TTCNode.cpp:118
void clear( ) const
Clears the counters.
Definition: TTCNode.cpp:42
Definition: TTCNode.hpp:47
double freqClk40( double aWait=1.1 ) const
freq 40 reading
Definition: TTCNode.cpp:230
virtual ~TTCNode( )
Definition: TTCNode.cpp:26
std::vector<uint64_t> captureBGOs( bool aMaskBC0=false, double aWaitSec=1 ) const
capture the incoming BGOs
Definition: TTCNode.cpp:74
Definition: TTCNode.hpp:45
void resetClk40( bool aReset ) const
reset clock40
void sendBTest() const
Send test Bgo (Btest)
Definition: TTCNode.cpp:57
FreqClockChannel
Definition: TTCNode.hpp:44
void enable( bool aEnable=true ) const
Enable the TTC block.
Definition: TTCNode.cpp:30
Definition: TTCNode.hpp:46