~vbursian/research-assistant/intervers

« back to all changes in this revision

Viewing changes to RAPlugins/Hamamatsu/HamamatsuScan.h

  • Committer: Viktor Bursian at blin-ubuntu
  • Date: 2017-04-07 20:48:57 UTC
  • mfrom: (8.6.2 DN)
  • mto: (8.9.1 DIST)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: vbursian@gmail.com-20170407204857-787xdycffm8enff0
CCD devices is rewritten + some other changes in DN devices

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
////////////////////////////////////////////////////////////////////////////////
2
 
/*! @file HamamatsuScan.h  Консоль спектрометра Hamamatsu.
3
 
- Part of Hamamatsu - a Research Assistant Plugin package.
4
 
- Uses  RAGUI - the Research Assistant Graphical User Interface.
5
 
- Uses  QtGui v.5.0  -  http://qt.nokia.com/
6
 
- Uses  RANet - Research Assistant Net Library (based on ANSI C++).
7
 
- Copyright(C) 2014-2017, Dmitry K. Nelson, St.Petersburg, Russia.
8
 
                          D.Nelson@mail.ioffe.ru
9
 
*///////////////////////////////////////////////////////////////////////////////
10
 
#ifndef HamamatsuScan_H
11
 
#define HamamatsuScan_H
12
 
#include "Hamamatsu.h"
13
 
#include "Scanner.h"
14
 
#include "DataTableFolder.h"
15
 
#include "DataTableRecord.h"
16
 
#include "specu1a.h"
17
 
#include <QComboBox>
18
 
#include <QCheckBox>
19
 
#include <QSpinBox>
20
 
#include <QTimer>
21
 
namespace RA {
22
 
//------------------------------------------------------------------------------
23
 
 
24
 
ANNOUNCE_CLASS(sHamamatsuScan)
25
 
 
26
 
//----------------------------------------------------------- sHamamatsuScan ---
27
 
/*! Консоль спектрометра Hamamatsu.
28
 
*/
29
 
#define PRODUCT_ID 0x2909 // for C10082CA, C10083CA, C10082CAH, C10083CAH
30
 
#define PIXELSNUM 2048 // for C10083CA, C10083CAH
31
 
 
32
 
 
33
 
class Hamamatsu_EXPORT  sHamamatsuScan : public sScanner
34
 
{
35
 
  Q_OBJECT
36
 
  CONSOLE(sHamamatsuScan)
37
 
  public:
38
 
    virtual                  ~sHamamatsuScan ();
39
 
    virtual void             RestoreState ();
40
 
    virtual void             StoreState ();
41
 
 
42
 
  protected: //evolution of the inherited state machine
43
 
    psState                   State_W_USBDevice;
44
 
 
45
 
  signals: //for internal needs
46
 
    void                      HamamatsuWarmed ();
47
 
    void                      HamamatsuError(QString = QString());
48
 
 
49
 
  protected: //reimplementing inherited
50
 
    virtual void              AppearanceMakeUp ();
51
 
    virtual void              Retranslate ()
52
 
                                {
53
 
                                  sScanner::Retranslate();
54
 
                                  Translate();
55
 
                                }
56
 
    virtual void              UpdateHistory ();
57
 
 
58
 
  protected slots: //reimplementing inherited
59
 
    virtual void              InitializeScanning ();
60
 
    virtual void              EarlySetAttributes ();
61
 
    virtual void              LateSetAttributes ();
62
 
 
63
 
  protected slots: //implementing pure virtual
64
 
    virtual void              CreateNewDependence ();
65
 
    virtual void              StartScanning ();
66
 
    virtual void              StopScanning ();
67
 
 
68
 
  protected: // types
69
 
    enum                      eScanMode
70
 
                                {cMonitoring  = 0
71
 
                                ,cAcquisition = 1
72
 
                                ,cEvolution   = 2
73
 
                                };
74
 
 
75
 
  protected slots:
76
 
    void                      InitializeUSBDevice ();
77
 
    virtual void              AddNewData ();
78
 
    virtual void              ReportDeviceError (QString);
79
 
 
80
 
  protected: //fields
81
 
    QLabel *                  LblModeTitle;
82
 
    QComboBox *               FldMode;
83
 
    sPhysValueField *         FldIntegrationTime;
84
 
    QLabel *                  LblTriggerEdgeTitle;
85
 
    QComboBox *               FldTriggerEdge;
86
 
    QLabel *                  LblTriggerModeTitle;
87
 
    QComboBox *               FldTriggerMode;
88
 
    QLabel *                  LblNumOfSamplesTitle;
89
 
    QSpinBox *                FldNumOfSamples;
90
 
    QLabel *                  LblNumOfAcquisitionsTitle;
91
 
    QSpinBox *                FldNumOfAcquisitions;
92
 
    QCheckBox *               ChkBackground;
93
 
    psDropNodeWidget          FldBackground;
94
 
    QCheckBox *               ChkCorrection;
95
 
    psDropNodeWidget          FldCorrection;
96
 
    QTimer *                  AcquisitionTimer;
97
 
    sPtr<sDataTableRecord>    SpectrumDependence;
98
 
    sPtr<sDataTableRecord>    BackgroundDependence;
99
 
    sPtr<sDataTableRecord>    CorrectionDependence;
100
 
    sPtr<sDataTableFolder>    SubSpectrum;
101
 
    sNodePtr                  PreviousSubSpectrum;
102
 
    HANDLE                    DeviceHandle;     /* device handle */
103
 
    HANDLE                    PipeHandle;       /* pipe handle */
104
 
    UNIT_PARAMETER            Parameters;
105
 
    double                    Calibration[6];
106
 
    ushort                    Buffer[PIXELSNUM];
107
 
    ulong                     Data[PIXELSNUM];
108
 
    real                      Wavelengths[PIXELSNUM];
109
 
    eScanMode                 ScanMode;
110
 
    bool                      Subtracting;
111
 
    bool                      Correcting;
112
 
    int                       NumOfSamples;
113
 
    int                       CurrentSamplingNo;
114
 
    int                       NumOfAcquis;
115
 
    int                       CurrentAcquisNo;
116
 
 
117
 
  private:
118
 
    void                      Translate ();
119
 
    sTime                     StartTime;
120
 
};
121
 
 
122
 
//------------------------------------------------------------------------------
123
 
} //namespace RA
124
 
#endif //HamamatsuScan_H