nidas  v1.2-1520
DSC_A2DSensor.h
Go to the documentation of this file.
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 4; -*-
2 // vim: set shiftwidth=4 softtabstop=4 expandtab:
3 /*
4  ********************************************************************
5  ** NIDAS: NCAR In-situ Data Acquistion Software
6  **
7  ** 2006, Copyright University Corporation for Atmospheric Research
8  **
9  ** This program is free software; you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation; either version 2 of the License, or
12  ** (at your option) any later version.
13  **
14  ** This program is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** The LICENSE.txt file accompanying this software contains
20  ** a copy of the GNU General Public License. If it is not found,
21  ** write to the Free Software Foundation, Inc.,
22  ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  **
24  ********************************************************************
25 */
26 #ifndef NIDAS_DYNLD_DSC_A2DSENSOR_H
27 #define NIDAS_DYNLD_DSC_A2DSENSOR_H
28 
29 #include "A2DSensor.h"
30 
32 
33 #include <vector>
34 #include <map>
35 #include <set>
36 
37 namespace nidas { namespace dynld {
38 
39 using namespace nidas::core;
40 
44 class DSC_A2DSensor : public A2DSensor {
45 
46 public:
47 
48  DSC_A2DSensor();
49  ~DSC_A2DSensor();
50 
51  IODevice* buildIODevice() throw(nidas::util::IOException);
52 
53  SampleScanner* buildSampleScanner()
55 
56  void validate() throw(nidas::util::InvalidParameterException);
57 
61  void open(int flags) throw(nidas::util::IOException,
63 
64  /*
65  * Close the device connected to the sensor.
66  */
67  void close() throw(nidas::util::IOException);
68 
69  void printStatus(std::ostream& ostr) throw();
70 
71  int getMaxNumChannels() const { return MAX_DMMAT_A2D_CHANNELS; }
72 
73  void setA2DParameters(int ichan,int gain,int bipolar)
75 
76  void getBasicConversion(int ichan,float& intercept, float& slope) const;
77 
78 private:
79 
83  int _gain;
84 
88  bool _bipolar;
89 
90 };
91 
92 }} // namespace nidas namespace dynld
93 
94 #endif
int _gain
Each card can only support one gain value.
Definition: DSC_A2DSensor.h:83
bool _bipolar
Each card can only support one polarity.
Definition: DSC_A2DSensor.h:88
One or more sensors connected to a Diamond Systems Corp A2D.
Definition: DSC_A2DSensor.h:44
An interface to an IO device.
Definition: IODevice.h:41
Definition: IOException.h:37
A scanner of sample data.
Definition: SampleScanner.h:73
One or more sensors connected to an A2D.
Definition: A2DSensor.h:45
#define MAX_DMMAT_A2D_CHANNELS
Definition: dmd_mmat.h:54
Definition: InvalidParameterException.h:35
int getMaxNumChannels() const
Return the maximum possible number of A2D channels on this device.
Definition: DSC_A2DSensor.h:71