Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
XDSO Class Referenceabstract

Base class for digital storage oscilloscope. More...

#include <dso.h>

Inheritance diagram for XDSO:
Inheritance graph
[legend]

Classes

struct  Payload
 

Public Types

enum  DRFMODE { DRFMODE_OFF = 0, DRFMODE_GIVEN_FREQ = 1, DRFMODE_FREQ_BY_SG = 2, DRFMODE_COHERENT_SG = 3 }
 

Public Member Functions

 XDSO (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas)
 
virtual ~XDSO ()
 usually nothing to do.
 
virtual void showForms ()
 Shows all forms belonging to driver.
 
const shared_ptr< XUIntNode > & average () const
 driver specific part below
 
const shared_ptr< XBoolNode > & singleSequence () const
 If true, an acquisition will be paused with a averaging count.
 
const shared_ptr< XComboNode > & trigSource () const
 
const shared_ptr< XDoubleNode > & trigPos () const
 
const shared_ptr< XDoubleNode > & trigLevel () const
 
const shared_ptr< XBoolNode > & trigFalling () const
 
const shared_ptr< XDoubleNode > & timeWidth () const
 
const shared_ptr< XComboNode > & vFullScale1 () const
 
const shared_ptr< XComboNode > & vFullScale2 () const
 
const shared_ptr< XComboNode > & vFullScale3 () const
 
const shared_ptr< XComboNode > & vFullScale4 () const
 
const shared_ptr< XDoubleNode > & vOffset1 () const
 
const shared_ptr< XDoubleNode > & vOffset2 () const
 
const shared_ptr< XDoubleNode > & vOffset3 () const
 
const shared_ptr< XDoubleNode > & vOffset4 () const
 
const shared_ptr< XUIntNode > & recordLength () const
 
const shared_ptr
< XTouchableNode > & 
forceTrigger () const
 
const shared_ptr
< XTouchableNode > & 
restart () const
 
const shared_ptr< XComboNode > & trace1 () const
 
const shared_ptr< XComboNode > & trace2 () const
 
const shared_ptr< XComboNode > & trace3 () const
 
const shared_ptr< XComboNode > & trace4 () const
 
const shared_ptr< XComboNode > & fetchMode () const
 
const shared_ptr< XBoolNode > & firEnabled () const
 
const shared_ptr< XDoubleNode > & firBandWidth () const
 [kHz]
 
const shared_ptr< XDoubleNode > & firCenterFreq () const
 [kHz]
 
const shared_ptr< XDoubleNode > & firSharpness () const
 
const shared_ptr< XComboNode > & dRFMode () const
 
const shared_ptr< XItemNode
< XDriverList, XSG > > & 
dRFSG () const
 
const shared_ptr< XDoubleNode > & dRFFreq () const
 
- Public Member Functions inherited from XPrimaryDriverWithThread
 XPrimaryDriverWithThread (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas)
 
virtual void stop ()
 
- Public Member Functions inherited from XPrimaryDriver
 XPrimaryDriver (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas)
 
- Public Member Functions inherited from XDriver
 XDriver (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas)
 
- Public Member Functions inherited from XNode
 XNode (const char *name, bool runtime=false)
 
template<class T >
shared_ptr< T > create (const char *name)
 
template<class T , typename... Args>
shared_ptr< T > create (const char *name, bool runtime, Args &&...args)
 
template<class T >
shared_ptr< T > create (Transaction &tr, const char *name)
 
template<class T , typename... Args>
shared_ptr< T > create (Transaction &tr, const char *name, bool runtime, Args &&...args)
 
XString getName () const
 
virtual XString getLabel () const
 
XString getTypename () const
 
shared_ptr< XNodegetChild (const XString &var) const
 
shared_ptr< XNodegetParent () const
 
void setUIEnabled (bool v)
 Enables/disables controls over scripting/GUI.
 
void disable ()
 Disables all scripting/GUI operations on this node hereafter.
 
- Public Member Functions inherited from Transactional::Node< XNode >
bool insert (Transaction< XNode > &tr, const shared_ptr< XNode > &var, bool online_after_insertion=false)
 
void insert (const shared_ptr< XNode > &var)
 
bool release (Transaction< XNode > &tr, const shared_ptr< XNode > &var)
 
void release (const shared_ptr< XNode > &var)
 
void releaseAll ()
 
bool swap (Transaction< XNode > &tr, const shared_ptr< XNode > &x, const shared_ptr< XNode > &y)
 
void swap (const shared_ptr< XNode > &x, const shared_ptr< XNode > &y)
 
XNodeupperNode (Snapshot< XNode > &shot)
 Finds the parent node in shot.
 
Snapshot< XNodeiterate_commit (Closure)
 
Snapshot< XNodeiterate_commit_if (Closure)
 
void iterate_commit_while (Closure)
 
void print_ () const
 
 Node (const Node &)=delete
 
Nodeoperator= (const Node &)=delete
 

Protected Member Functions

virtual void analyzeRaw (RawDataReader &reader, Transaction &tr) throw (XRecordError&)
 
virtual void visualize (const Snapshot &shot)
 
virtual void onTrace1Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onTrace2Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onTrace3Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onTrace4Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onAverageChanged (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onSingleChanged (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onTrigSourceChanged (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onTrigPosChanged (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onTrigLevelChanged (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onTrigFallingChanged (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onTimeWidthChanged (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onVFullScale1Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onVFullScale2Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onVFullScale3Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onVFullScale4Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onVOffset1Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onVOffset2Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onVOffset3Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onVOffset4Changed (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onRecordLengthChanged (const Snapshot &shot, XValueNodeBase *)=0
 
virtual void onForceTriggerTouched (const Snapshot &shot, XTouchableNode *)=0
 
virtual void onRestartTouched (const Snapshot &shot, XTouchableNode *)
 
virtual double getTimeInterval ()=0
 
virtual void startSequence ()=0
 Clears the count or starts a sequence measurement.
 
virtual int acqCount (bool *seq_busy)=0
 
virtual void getWave (shared_ptr< RawData > &writer, std::deque< XString > &channels)=0
 Loads waveforms and settings from the instrument.
 
virtual void convertRaw (RawDataReader &reader, Transaction &tr)=0 throw (XRecordError&)
 
virtual bool isDRFCoherentSGSupported () const
 
double phaseOfRF (const Snapshot &shot_of_this, uint64_t count, double interval)
 Calculates RF phase for coherent detection, at given count.
 
const shared_ptr
< XStatusPrinter > & 
statusPrinter () const
 
- Protected Member Functions inherited from XPrimaryDriverWithThread
virtual void start ()
 
virtual void closeInterface ()=0
 This function should not cause an exception.
 
- Protected Member Functions inherited from XPrimaryDriver
void finishWritingRaw (const shared_ptr< const RawData > &rawdata, const XTime &time_awared, const XTime &time_recorded)
 
- Protected Member Functions inherited from XDriver
void record (Transaction &tr, const XTime &time_awared, const XTime &time_recorded)
 

Protected Attributes

shared_ptr< XListenerm_lsnOnTrigSourceChanged
 

Private Types

enum  { FETCHMODE_NEVER = 0, FETCHMODE_AVG = 1, FETCHMODE_SEQ = 2 }
 

Private Member Functions

const shared_ptr< XWaveNGraph > & waveForm () const
 
void convertRawToDisp (RawDataReader &reader, Transaction &tr) throw (XRecordError&)
 Converts the raw to a display-able style and performs extra digital processing.
 
void demodulateDisp (Transaction &tr) throw (XRecordError&)
 Digital direct conversion.
 
void onCondChanged (const Snapshot &shot, XValueNodeBase *)
 
void onDRFCondChanged (const Snapshot &shot, XValueNodeBase *)
 
void * execute (const atomic< bool > &)
 

Private Attributes

const shared_ptr< XUIntNodem_average
 
const shared_ptr< XBoolNodem_singleSequence
 If true, pause acquision after averaging count.
 
const shared_ptr< XComboNodem_trigSource
 
const shared_ptr< XBoolNodem_trigFalling
 
const shared_ptr< XDoubleNodem_trigPos
 
const shared_ptr< XDoubleNodem_trigLevel
 
const shared_ptr< XDoubleNodem_timeWidth
 
const shared_ptr< XComboNodem_vFullScale1
 
const shared_ptr< XComboNodem_vFullScale2
 
const shared_ptr< XComboNodem_vFullScale3
 
const shared_ptr< XComboNodem_vFullScale4
 
const shared_ptr< XDoubleNodem_vOffset1
 
const shared_ptr< XDoubleNodem_vOffset2
 
const shared_ptr< XDoubleNodem_vOffset3
 
const shared_ptr< XDoubleNodem_vOffset4
 
const shared_ptr< XUIntNodem_recordLength
 
const shared_ptr< XTouchableNodem_forceTrigger
 
const shared_ptr< XTouchableNodem_restart
 
const shared_ptr< XComboNodem_trace1
 
const shared_ptr< XComboNodem_trace2
 
const shared_ptr< XComboNodem_trace3
 
const shared_ptr< XComboNodem_trace4
 
const shared_ptr< XComboNodem_fetchMode
 
const shared_ptr< XBoolNodem_firEnabled
 
const shared_ptr< XDoubleNodem_firBandWidth
 [kHz]
 
const shared_ptr< XDoubleNodem_firCenterFreq
 [kHz]
 
const shared_ptr< XDoubleNodem_firSharpness
 
const shared_ptr< XComboNodem_dRFMode
 
const shared_ptr< XItemNode
< XDriverList, XSG > > 
m_dRFSG
 
const shared_ptr< XDoubleNodem_dRFFreq
 
const qshared_ptr< FrmDSOm_form
 
const shared_ptr< XWaveNGraphm_waveForm
 
shared_ptr< XListenerm_lsnOnSingleChanged
 
shared_ptr< XListenerm_lsnOnAverageChanged
 
shared_ptr< XListenerm_lsnOnTrigPosChanged
 
shared_ptr< XListenerm_lsnOnTrigLevelChanged
 
shared_ptr< XListenerm_lsnOnTrigFallingChanged
 
shared_ptr< XListenerm_lsnOnTimeWidthChanged
 
shared_ptr< XListenerm_lsnOnTrace1Changed
 
shared_ptr< XListenerm_lsnOnTrace2Changed
 
shared_ptr< XListenerm_lsnOnTrace3Changed
 
shared_ptr< XListenerm_lsnOnTrace4Changed
 
shared_ptr< XListenerm_lsnOnVFullScale1Changed
 
shared_ptr< XListenerm_lsnOnVFullScale2Changed
 
shared_ptr< XListenerm_lsnOnVFullScale3Changed
 
shared_ptr< XListenerm_lsnOnVFullScale4Changed
 
shared_ptr< XListenerm_lsnOnVOffset1Changed
 
shared_ptr< XListenerm_lsnOnVOffset2Changed
 
shared_ptr< XListenerm_lsnOnVOffset3Changed
 
shared_ptr< XListenerm_lsnOnVOffset4Changed
 
shared_ptr< XListenerm_lsnOnRecordLengthChanged
 
shared_ptr< XListenerm_lsnOnForceTriggerTouched
 
shared_ptr< XListenerm_lsnOnRestartTouched
 
shared_ptr< XListenerm_lsnOnCondChanged
 
shared_ptr< XListenerm_lsnOnDRFCondChanged
 
std::deque< xqcon_ptrm_conUIs
 
const shared_ptr< XStatusPrinterm_statusPrinter
 
atomic< XTimem_timeSequenceStarted
 

Static Private Attributes

static const char * s_trace_names []
 
static const unsigned int s_trace_colors []
 

Additional Inherited Members

- Static Public Member Functions inherited from XNode
template<class T__ >
static shared_ptr< T__ > createOrphan (const char *name)
 
template<class T__ , typename... Args_>
static shared_ptr< T__ > createOrphan (const char *name, bool runtime, Args_ &&...args)
 

Detailed Description

Base class for digital storage oscilloscope.

Definition at line 33 of file dso.h.

Member Function Documentation

virtual int XDSO::acqCount ( bool *  seq_busy)
protectedpure virtual
Parameters
seq_busytrue if the sequence is not finished.

Implemented in XThamwayDVUSBDSO, XNIDAQmxDSO, XLecroyDSO, and XTDS.

void XDSO::analyzeRaw ( RawDataReader reader,
Transaction tr 
) throw (XRecordError&)
protectedvirtual

This function will be called when raw data are written. Implement this function to convert the raw data to the record (Payload).

See Also
analyze()

Implements XPrimaryDriver.

Definition at line 547 of file dso.cpp.

References convertRawToDisp().

virtual void XDSO::convertRaw ( RawDataReader reader,
Transaction tr 
) throw (XRecordError&)
protectedpure virtual

Converts the raw to a display-able style. In the coherent SG mode, real and imaginary parts should be stored in Payload::waveDisp().

Implemented in XThamwayDVUSBDSO, XLecroyDSO, XTDS, and XNIDAQmxDSO.

Referenced by convertRawToDisp().

void XDSO::showForms ( )
virtual

Shows all forms belonging to driver.

impliment form->show() here

Implements XPrimaryDriver.

Definition at line 158 of file dso.cpp.

void XDSO::visualize ( const Snapshot shot)
protectedvirtual

This function is called after committing XPrimaryDriver::analyzeRaw() or XSecondaryDriver::analyze(). This might be called even if the record is invalid (time() == false).

Implements XDriver.

Definition at line 185 of file dso.cpp.

References Transactional::Node< XNode >::iterate_commit().

Member Data Documentation

const unsigned int XDSO::s_trace_colors
staticprivate
Initial value:
= {
clRed, clGreen, clLime, clAqua
}

Definition at line 248 of file dso.h.

const char * XDSO::s_trace_names
staticprivate
Initial value:
= {
"Time [sec]", "Trace1 [V]", "Trace2 [V]", "Trace3 [V]", "Trace4 [V]"
}

Definition at line 247 of file dso.h.


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

Generated for KAME4 by  doxygen 1.8.3