TSPD-ADQ EPICS device support  1.2.0
ADQInfo.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2018 Cosylab d.d.
3 // This software is distributed under the terms found
4 // in file LICENSE.txt that is included with this distribution.
5 //
6 
7 #ifndef ADQINFO_H
8 #define ADQINFO_H
9 
10 #include <mutex>
11 #include <nds3/nds.h>
12 
20 class ADQInfo
21 {
22 public:
30  ADQInfo(const std::string& name, nds::Node& parentNode, ADQInterface*& adqInterface, void* adqCtrlUnit);
31  virtual ~ADQInfo();
32 
36  nds::Port m_node;
37 
41  void getProductName(timespec* pTimestamp, std::string* pValue);
42 
46  void getSerialNumber(timespec* pTimestamp, std::string* pValue);
47 
51  void getProductID(timespec* pTimestamp, int32_t* pValue);
52 
56  void getADQType(timespec* pTimestamp, int32_t* pValue);
57 
61  void getCardOption(timespec* pTimestamp, std::string* pValue);
62 
66  void getTempLocal(timespec* pTimestamp, int32_t* pValue);
67 
71  void getTempADCone(timespec* pTimestamp, int32_t* pValue);
72 
76  void getTempADCtwo(timespec* pTimestamp, int32_t* pValue);
77 
81  void getTempFPGA(timespec* pTimestamp, int32_t* pValue);
82 
86  void getTempDd(timespec* pTimestamp, int32_t* pValue);
87 
91  void getSampRate(timespec* pTimestamp, double* pValue);
92 
96  void getSampRateDec(timespec* pTimestamp, double* pValue);
97 
101  void getBytesPerSample(timespec* pTimestamp, int32_t* pValue);
102 
106  void getBusAddr(timespec* pTimestamp, int32_t* pValue);
107 
111  void getBusType(timespec* pTimestamp, int32_t* pValue);
112 
116  void getPCIeLinkRate(timespec* pTimestamp, int32_t* pValue);
117 
121  void getPCIeLinkWid(timespec* pTimestamp, int32_t* pValue);
122 
123 private:
124  ADQInterface* m_adqInterface;
125 
126  void* m_adqCtrlUnit;
127 
128  std::string m_productName;
129  nds::PVDelegateIn<std::string> m_productNamePV;
130  nds::PVDelegateIn<std::string> m_serialNumberPV;
131  nds::PVDelegateIn<int32_t> m_productIDPV;
132  nds::PVDelegateIn<int32_t> m_adqTypePV;
133  nds::PVDelegateIn<std::string> m_cardOptionPV;
134  nds::PVDelegateIn<int32_t> m_tempLocalPV;
135  nds::PVDelegateIn<int32_t> m_tempAdcOnePV;
136  nds::PVDelegateIn<int32_t> m_tempAdcTwoPV;
137  nds::PVDelegateIn<int32_t> m_tempFpgaPV;
138  nds::PVDelegateIn<int32_t> m_tempDiodPV;
139  nds::PVDelegateIn<double> m_sampRatePV;
140  nds::PVDelegateIn<int32_t> m_bytesPerSampPV;
141  nds::PVDelegateIn<int32_t> m_busTypePV;
142  nds::PVDelegateIn<int32_t> m_busAddrPV;
143  nds::PVDelegateIn<int32_t> m_pcieLinkRatePV;
144  nds::PVDelegateIn<int32_t> m_pcieLinkWidPV;
145 
146 protected:
153  std::mutex m_adqDevMutex;
154 
160  nds::PVDelegateIn<double> m_sampRateDecPV;
161 };
162 
163 #endif /* ADQINFO_H */
ADQInfo
This class monitors informative parameters of the connected digitizer.
Definition: ADQInfo.h:20
ADQInfo::getProductName
void getProductName(timespec *pTimestamp, std::string *pValue)
Gets the digitizer's product name.
Definition: ADQInfo.cpp:141
ADQInfo::m_sampRateDecPV
nds::PVDelegateIn< double > m_sampRateDecPV
PV fpr sample rate with decimation.
Definition: ADQInfo.h:160
ADQInfo::getPCIeLinkRate
void getPCIeLinkRate(timespec *pTimestamp, int32_t *pValue)
Gets the PCIe/PXIe generation if the digitizer is connected over this interface.
Definition: ADQInfo.cpp:279
ADQInfo::ADQInfo
ADQInfo(const std::string &name, nds::Node &parentNode, ADQInterface *&adqInterface, void *adqCtrlUnit)
ADQInfo class constructor.
Definition: ADQInfo.cpp:23
ADQInfo::getBusAddr
void getBusAddr(timespec *pTimestamp, int32_t *pValue)
Gets the digitizer's bus address.
Definition: ADQInfo.cpp:237
ADQInfo::getTempADCtwo
void getTempADCtwo(timespec *pTimestamp, int32_t *pValue)
Gets the digitizer's ADC2 temperature.
Definition: ADQInfo.cpp:190
ADQInfo::getBytesPerSample
void getBytesPerSample(timespec *pTimestamp, int32_t *pValue)
Gets the number of bytes needed to store each sample.
Definition: ADQInfo.cpp:228
ADQInfo::getADQType
void getADQType(timespec *pTimestamp, int32_t *pValue)
Gets the digitizer's type.
Definition: ADQInfo.cpp:162
ADQInfo::getProductID
void getProductID(timespec *pTimestamp, int32_t *pValue)
Gets the digitizer's product ID.
Definition: ADQInfo.cpp:155
ADQInfo::getSampRateDec
void getSampRateDec(timespec *pTimestamp, double *pValue)
Gets the digitizer's decimated sample rate.
Definition: ADQInfo.cpp:220
ADQInfo::getPCIeLinkWid
void getPCIeLinkWid(timespec *pTimestamp, int32_t *pValue)
Gets the PCIe/PXIe width if the digitizer is connected over this interface.
Definition: ADQInfo.cpp:290
ADQInfo::getSerialNumber
void getSerialNumber(timespec *pTimestamp, std::string *pValue)
Gets the digitizer's serial number.
Definition: ADQInfo.cpp:148
ADQInfo::getBusType
void getBusType(timespec *pTimestamp, int32_t *pValue)
Gets the digitizer's type of connection.
Definition: ADQInfo.cpp:253
ADQInfo::getTempFPGA
void getTempFPGA(timespec *pTimestamp, int32_t *pValue)
Gets the digitizer's FPGA temperature.
Definition: ADQInfo.cpp:197
ADQInfo::getTempDd
void getTempDd(timespec *pTimestamp, int32_t *pValue)
Gets the digitizer's DCDC2A temperature.
Definition: ADQInfo.cpp:204
ADQInfo::getTempLocal
void getTempLocal(timespec *pTimestamp, int32_t *pValue)
Gets the digitizer's PCB temperature.
Definition: ADQInfo.cpp:176
ADQInfo::getTempADCone
void getTempADCone(timespec *pTimestamp, int32_t *pValue)
Gets the digitizer's ADC1 temperature.
Definition: ADQInfo.cpp:183
ADQInfo::getSampRate
void getSampRate(timespec *pTimestamp, double *pValue)
Gets the digitizer's base sample rate.
Definition: ADQInfo.cpp:211
ADQInfo::m_node
nds::Port m_node
ADQInfo class node that connects to the device.
Definition: ADQInfo.h:36
ADQInfo::getCardOption
void getCardOption(timespec *pTimestamp, std::string *pValue)
Gets the digitizer's card option.
Definition: ADQInfo.cpp:169
ADQInfo::m_adqDevMutex
std::mutex m_adqDevMutex
Lock guard.
Definition: ADQInfo.h:153