thamwaydso.h
1 /***************************************************************************
2  Copyright (C) 2002-2015 Kentaro Kitagawa
3  kitagawa@phys.s.u-tokyo.ac.jp
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  You should have received a copy of the GNU Library General
11  Public License and a list of authors along with this program;
12  see the files COPYING and AUTHORS.
13 ***************************************************************************/
14 #include "chardevicedriver.h"
15 #include <vector>
16 
17 #include "dso.h"
18 
19 #include "ezusbthamway.h"
20 
21 #define ADDR_OFFSET_DV 0x20
22 
24 public:
25  XThamwayDVCUSBInterface(const char *name, bool runtime, const shared_ptr<XDriver> &driver)
26  : XWinCUSBInterface(name, runtime, driver, ADDR_OFFSET_DV, "DV14") {}
27  virtual ~XThamwayDVCUSBInterface() {}
28 };
29 
30 //! Thamway DV14U25 A/D conversion board
31 class XThamwayDVUSBDSO : public XCharDeviceDriver<XDSO, XThamwayDVCUSBInterface> {
32 public:
33  XThamwayDVUSBDSO(const char *name, bool runtime,
34  Transaction &tr_meas, const shared_ptr<XMeasure> &meas);
35  virtual ~XThamwayDVUSBDSO();
36  //! Converts raw to record
37  virtual void convertRaw(RawDataReader &reader, Transaction &tr) throw (XRecordError&);
38 protected:
39  //! Be called just after opening interface. Call start() inside this routine appropriately.
40  virtual void open() throw (XKameError &);
41  //! Be called during stopping driver. Call interface()->stop() inside this routine.
42  virtual void close() throw (XKameError &);
43 
44  virtual void onTrace1Changed(const Snapshot &shot, XValueNodeBase *);
45  virtual void onTrace2Changed(const Snapshot &shot, XValueNodeBase *);
46  virtual void onTrace3Changed(const Snapshot &shot, XValueNodeBase *);
47  virtual void onTrace4Changed(const Snapshot &shot, XValueNodeBase *);
48  virtual void onAverageChanged(const Snapshot &shot, XValueNodeBase *);
49  virtual void onSingleChanged(const Snapshot &shot, XValueNodeBase *);
50  virtual void onTrigSourceChanged(const Snapshot &shot, XValueNodeBase *);
51  virtual void onTrigPosChanged(const Snapshot &shot, XValueNodeBase *);
52  virtual void onTrigLevelChanged(const Snapshot &shot, XValueNodeBase *);
53  virtual void onTrigFallingChanged(const Snapshot &shot, XValueNodeBase *);
54  virtual void onTimeWidthChanged(const Snapshot &shot, XValueNodeBase *);
55  virtual void onVFullScale1Changed(const Snapshot &shot, XValueNodeBase *);
56  virtual void onVFullScale2Changed(const Snapshot &shot, XValueNodeBase *);
57  virtual void onVFullScale3Changed(const Snapshot &shot, XValueNodeBase *);
58  virtual void onVFullScale4Changed(const Snapshot &shot, XValueNodeBase *);
59  virtual void onVOffset1Changed(const Snapshot &shot, XValueNodeBase *);
60  virtual void onVOffset2Changed(const Snapshot &shot, XValueNodeBase *);
61  virtual void onVOffset3Changed(const Snapshot &shot, XValueNodeBase *);
62  virtual void onVOffset4Changed(const Snapshot &shot, XValueNodeBase *);
63  virtual void onRecordLengthChanged(const Snapshot &shot, XValueNodeBase *);
64  virtual void onForceTriggerTouched(const Snapshot &shot, XTouchableNode *);
65 
66  virtual double getTimeInterval();
67  //! Clears count or start sequence measurement
68  virtual void startSequence();
69  virtual int acqCount(bool *seq_busy);
70 
71  //! Loads waveform and settings from instrument
72  virtual void getWave(shared_ptr<RawData> &writer, std::deque<XString> &channels);
73 
74  virtual bool isDRFCoherentSGSupported() const {return false;}
75 private:
76  void acquire(const atomic<bool> &terminated);
77  bool m_pending;
78 };

Generated for KAME4 by  doxygen 1.8.3