TSPD-ADQ EPICS device support  1.2.0
ADQAIChannelGroup Class Reference

This class handles majority of parameters for correct setup of each data acquisition mode. Data acquisition is handled in this class. The state machine of the device is defined here. Each digitizer's channel gets a representation by calling ADQCHannel constructor for N amount of physical channels. More...

#include <ADQAIChannelGroup.h>

Inheritance diagram for ADQAIChannelGroup:
ADQInfo

Public Member Functions

 ADQAIChannelGroup (const std::string &name, nds::Node &parentNode, ADQInterface *&adqInterface, void *adqCtrlUnit)
 ADQAIChannelGroup class constructor. More...
 
template<typename T >
void createPv (const std::string &name, nds::PVDelegateIn< T > &pvRb, std::function< void(ADQAIChannelGroup *, const timespec &, const T &)> setter, std::function< void(ADQAIChannelGroup *, timespec *, T *)> getter)
 This function creates the most common type of PV and sets it readback PV to interrupt mode.
 
template<typename T >
void createPvEnum (const std::string &name, nds::PVDelegateIn< T > &pvRb, nds::enumerationStrings_t enumList, std::function< void(ADQAIChannelGroup *, const timespec &, const T &)> setter, std::function< void(ADQAIChannelGroup *, timespec *, T *)> getter)
 This function creates the Enumeration type of PV and sets it readback PV to interrupt mode.
 
template<typename T >
nds::PVDelegateIn< T > createPvRb (const std::string &name, std::function< void(ADQAIChannelGroup *, timespec *, T *)> getter)
 This function creates and returns the readback PV.
 
void setDaqMode (const timespec &pTimestamp, const int32_t &pValue)
 Sets the data acquisition mode.
 
void getDaqMode (timespec *pTimestamp, int32_t *pValue)
 Gets the data acquisition mode.
 
void setTrigMode (const timespec &pTimestamp, const int32_t &pValue)
 Sets the trigger mode.
 
void getTrigMode (timespec *pTimestamp, int32_t *pValue)
 Gets the trigger mode.
 
void setDbsBypass (const timespec &pTimestamp, const int32_t &pValue)
 Sets if the DBS settings is bypassed (1) or not (0).
 
void getDbsBypass (timespec *pTimestamp, int32_t *pValue)
 Gets if the DBS settings is bypassed (1) or not (0).
 
void setDbsDc (const timespec &pTimestamp, const int32_t &pValue)
 Sets the DC target for the DBS.
 
void getDbsDc (timespec *pTimestamp, int32_t *pValue)
 Gets the DC target for the DBS.
 
void setDbsLowSat (const timespec &pTimestamp, const int32_t &pValue)
 Sets the lower saturation level for the DBS.
 
void getDbsLowSat (timespec *pTimestamp, int32_t *pValue)
 Gets the lower saturation level for the DBS.
 
void setDbsUpSat (const timespec &pTimestamp, const int32_t &pValue)
 Sets the upper saturation level for the DBS.
 
void getDbsUpSat (timespec *pTimestamp, int32_t *pValue)
 Gets the upper saturation level for the DBS.
 
void setPatternMode (const timespec &pTimestamp, const int32_t &pValue)
 Sets the pattern mode.
 
void getPatternMode (timespec *pTimestamp, int32_t *pValue)
 Gets the pattern mode.
 
void setChanActive (const timespec &pTimestamp, const int32_t &pValue)
 Sets which channels should be active for data acquisition.
 
void getChanActive (timespec *pTimestamp, int32_t *pValue)
 Gets which channels should be active for data acquisition.
 
void getChanMask (timespec *pTimestamp, int32_t *pValue)
 Gets the channel mask accordingly to chosen active channels.
 
void setRecordCnt (const timespec &pTimestamp, const int32_t &pValue)
 Sets the number of records to acquire.
 
void getRecordCnt (timespec *pTimestamp, int32_t *pValue)
 Gets the number of records to acquire.
 
void setRecordCntCollect (const timespec &pTimestamp, const int32_t &pValue)
 Sets the number of records to pass to the device (Multi-Record mode).
 
void getRecordCntCollect (timespec *pTimestamp, int32_t *pValue)
 Gets the number of records to pass to the device (Multi-Record mode).
 
void setSampleCnt (const timespec &pTimestamp, const int32_t &pValue)
 Sets the number of samples per record.
 
void getSampleCnt (timespec *pTimestamp, int32_t *pValue)
 Gets the number of samples per record.
 
void getSampleCntMax (timespec *pTimestamp, int32_t *pValue)
 Gets the maximum number of samples per record accordingly to the number of records (Multi-Record mode).
 
void getSamplesTotal (timespec *pTimestamp, int32_t *pValue)
 Gets a total number of samples to acquire (Number of records * Number of samples).
 
void setSampleSkip (const timespec &pTimestamp, const int32_t &pValue)
 Sets the sample skip.
 
void getSampleSkip (timespec *pTimestamp, int32_t *pValue)
 Gets the sample skip.
 
void setSampleDec (const timespec &pTimestamp, const int32_t &pValue)
 Gets the data acquisition mode..
 
void getSampleDec (timespec *pTimestamp, int32_t *pValue)
 Sets the sample decimation (-FWSDR digitizers only).
 
void setPreTrigSamp (const timespec &pTimestamp, const int32_t &pValue)
 Sets the number of pre-trigger samples (Multi-Record and Triggered streaming mode).
 
void getPreTrigSamp (timespec *pTimestamp, int32_t *pValue)
 Gets the number of pre-trigger samples (Multi-Record and Triggered streaming mode).
 
void setTrigHoldOffSamp (const timespec &pTimestamp, const int32_t &pValue)
 Sets the number of hold-off samples (Multi-Record and Triggered streaming mode).
 
void getTrigHoldOffSamp (timespec *pTimestamp, int32_t *pValue)
 Gets the number of hold-off samples (Multi-Record and Triggered streaming mode).
 
void setClockSrc (const timespec &pTimestamp, const int32_t &pValue)
 Sets the clock source.
 
void getClockSrc (timespec *pTimestamp, int32_t *pValue)
 Gets the clock source.
 
void setClockRefOut (const timespec &pTimestamp, const int32_t &pValue)
 Enables (1) or disables (0) clock reference output.
 
void getClockRefOut (timespec *pTimestamp, int32_t *pValue)
 Gets the clock reference output.
 
void setTimeout (const timespec &pTimestamp, const int32_t &pValue)
 Sets the flush timeout (Triggered streaming mode).
 
void getTimeout (timespec *pTimestamp, int32_t *pValue)
 Gets the flush timeout (Triggered streaming mode).
 
void setStreamTime (const timespec &pTimestamp, const double &pValue)
 Sets the streaming time (Continuous streaming mode).
 
void getStreamTime (timespec *pTimestamp, double *pValue)
 Gets the streaming time (Continuous streaming mode).
 
void setSWTrigEdge (const timespec &pTimestamp, const int32_t &pValue)
 Sets the SW trigger edge.
 
void getSWTrigEdge (timespec *pTimestamp, int32_t *pValue)
 Gets the SW trigger edge.
 
void setLevelTrigLvl (const timespec &pTimestamp, const int32_t &pValue)
 Sets the trigger level of Level trigger.
 
void getLevelTrigLvl (timespec *pTimestamp, int32_t *pValue)
 Gets the trigger level of Level trigger.
 
void setLevelTrigEdge (const timespec &pTimestamp, const int32_t &pValue)
 Sets the Level trigger edge.
 
void getLevelTrigEdge (timespec *pTimestamp, int32_t *pValue)
 Gets the Level trigger edge.
 
void setLevelTrigChan (const timespec &pTimestamp, const int32_t &pValue)
 Sets the Level trigger channel.
 
void getLevelTrigChan (timespec *pTimestamp, int32_t *pValue)
 Gets the Level trigger channel.
 
void getLevelTrigChanMask (timespec *pTimestamp, int32_t *pValue)
 Gets the Level trigger channel mask.
 
void setExternTrigDelay (const timespec &pTimestamp, const int32_t &pValue)
 Sets the External trigger delay.
 
void getExternTrigDelay (timespec *pTimestamp, int32_t *pValue)
 Gets the External trigger delay.
 
void setExternTrigThreshold (const timespec &pTimestamp, const double &pValue)
 Sets the External trigger treshold.
 
void getExternTrigThreshold (timespec *pTimestamp, double *pValue)
 Gets the External trigger treshold.
 
void setExternTrigEdge (const timespec &pTimestamp, const int32_t &pValue)
 Sets the External trigger edge.
 
void getExternTrigEdge (timespec *pTimestamp, int32_t *pValue)
 Gets the External trigger edge.
 
void setInternTrigHighSamp (const timespec &pTimestamp, const int32_t &pValue)
 Sets the Internal trigger high sample length.
 
void getInternTrigHighSamp (timespec *pTimestamp, int32_t *pValue)
 Gets the Internal trigger high sample length.
 
void setInternTrigLowSamp (const timespec &pTimestamp, const int32_t &pValue)
 Sets the Internal trigger low sample length.
 
void getInternTrigLowSamp (timespec *pTimestamp, int32_t *pValue)
 Gets the Internal trigger low sample length.
 
void setInternTrigFreq (const timespec &pTimestamp, const int32_t &pValue)
 Sets the Internal trigger frequency.
 
void getInternTrigFreq (timespec *pTimestamp, int32_t *pValue)
 Gets the Internal trigger frequency.
 
void setInternTrigEdge (const timespec &pTimestamp, const int32_t &pValue)
 Sets the Internal trigger edge.
 
void getInternTrigEdge (timespec *pTimestamp, int32_t *pValue)
 Gets the Internal trigger edge.
 
void getLogMsg (timespec *pTimestamp, std::string *pValue)
 Gets the log messages.
 
void onSwitchOn ()
 Sets the state machine to state ON.
 
void onSwitchOff ()
 Sets the state machine to state OFF.
 
void onStart ()
 Sets the state machine to state RUNNING and starts data acquisition.
 
void onStop ()
 Stops the data acquisition and sets the state machine to state ON.
 
void recover ()
 State machine function. Not supported.
 
bool allowChange (const nds::state_t currentLocal, const nds::state_t currentGlobal, const nds::state_t nextLocal)
 Allows the state machine to switch to a new state.
 
void daqTrigStream ()
 This method processes Triggered streaming data acquisition.
 
void daqMultiRecord ()
 This method processes Multi-Record data acquisition.
 
void daqContinStream ()
 This method processes Continuous streaming data acquisition.
 
void daqRawStream ()
 This method processes Raw streaming data acquisition.
 
- Public Member Functions inherited from ADQInfo
 ADQInfo (const std::string &name, nds::Node &parentNode, ADQInterface *&adqInterface, void *adqCtrlUnit)
 ADQInfo class constructor. More...
 
void getProductName (timespec *pTimestamp, std::string *pValue)
 Gets the digitizer's product name.
 
void getSerialNumber (timespec *pTimestamp, std::string *pValue)
 Gets the digitizer's serial number.
 
void getProductID (timespec *pTimestamp, int32_t *pValue)
 Gets the digitizer's product ID.
 
void getADQType (timespec *pTimestamp, int32_t *pValue)
 Gets the digitizer's type.
 
void getCardOption (timespec *pTimestamp, std::string *pValue)
 Gets the digitizer's card option.
 
void getTempLocal (timespec *pTimestamp, int32_t *pValue)
 Gets the digitizer's PCB temperature.
 
void getTempADCone (timespec *pTimestamp, int32_t *pValue)
 Gets the digitizer's ADC1 temperature.
 
void getTempADCtwo (timespec *pTimestamp, int32_t *pValue)
 Gets the digitizer's ADC2 temperature.
 
void getTempFPGA (timespec *pTimestamp, int32_t *pValue)
 Gets the digitizer's FPGA temperature.
 
void getTempDd (timespec *pTimestamp, int32_t *pValue)
 Gets the digitizer's DCDC2A temperature.
 
void getSampRate (timespec *pTimestamp, double *pValue)
 Gets the digitizer's base sample rate.
 
void getSampRateDec (timespec *pTimestamp, double *pValue)
 Gets the digitizer's decimated sample rate.
 
void getBytesPerSample (timespec *pTimestamp, int32_t *pValue)
 Gets the number of bytes needed to store each sample.
 
void getBusAddr (timespec *pTimestamp, int32_t *pValue)
 Gets the digitizer's bus address.
 
void getBusType (timespec *pTimestamp, int32_t *pValue)
 Gets the digitizer's type of connection.
 
void getPCIeLinkRate (timespec *pTimestamp, int32_t *pValue)
 Gets the PCIe/PXIe generation if the digitizer is connected over this interface.
 
void getPCIeLinkWid (timespec *pTimestamp, int32_t *pValue)
 Gets the PCIe/PXIe width if the digitizer is connected over this interface.
 

Public Attributes

nds::Port m_node
 ADQAIChannelGroup class node that connects to the device.
 
nds::StateMachine m_stateMachine
 State machine of this class. Attached to the node.
 
std::vector< std::shared_ptr< ADQAIChannel > > m_AIChannelsPtr
 Vector of pointers to ADQAIChannel class instances.
 
- Public Attributes inherited from ADQInfo
nds::Port m_node
 ADQInfo class node that connects to the device.
 

Additional Inherited Members

- Protected Attributes inherited from ADQInfo
std::mutex m_adqDevMutex
 Lock guard. More...
 
nds::PVDelegateIn< double > m_sampRateDecPV
 PV fpr sample rate with decimation. More...
 

Detailed Description

This class handles majority of parameters for correct setup of each data acquisition mode. Data acquisition is handled in this class. The state machine of the device is defined here. Each digitizer's channel gets a representation by calling ADQCHannel constructor for N amount of physical channels.

Constructor & Destructor Documentation

◆ ADQAIChannelGroup()

ADQAIChannelGroup::ADQAIChannelGroup ( const std::string &  name,
nds::Node &  parentNode,
ADQInterface *&  adqInterface,
void *  adqCtrlUnit 
)

ADQAIChannelGroup class constructor.

Parameters
namea name with which this class will register its child node.
parentNodea name of a parent node to which this class' node is a child.
adqInterfacea pointer to the ADQ API interface created in the ADQDevice class.
adqCtrlUnita pointer to the ADQ control unit that sets up and controls the ADQ devices.

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