Main Page | Modules | Class Hierarchy | Class List | File List | Class Members

dsdk.h

00001 /***************************************************************************
00002                           dsdk.h  -  Abstract base class for all devices.
00003                              -------------------
00004     begin                : Wed Jun 9 2004
00005     author               : Ioan S. Popescu
00006 
00007 Copyright (C) 2004 DATAQ Instruments, Inc. <develop@dataq.com>
00008 
00009 This program is free software; you can redistribute it and/or 
00010 modify it under the terms of the GNU General Public License 
00011 as published by the Free Software Foundation; either 
00012 version 2 of the License, or (at your option) any later 
00013 version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00023  ***************************************************************************/
00024 
00025 #ifndef DSDK_H
00026 #define DSDK_H
00027 
00029 
00034 class dsdk
00035 {
00036   public:
00037     dsdk();  
00038     virtual ~dsdk(); 
00039 
00043 
00044     virtual const int ADChannelCount();
00045     virtual const long int ADCounter();
00047     virtual const long int AvailableData();
00048     virtual const long int BurstCounter();
00050     virtual const char *const DeviceFile();
00052     virtual const long int EventPoint();
00054     virtual const int InfoBoardID();
00056     virtual const bool InfoPGL();
00058     virtual const int InfoRev();
00060     virtual const char *const InfoSerial();
00062     virtual const double MaxBurstRate();
00064     virtual const double SampleRate();
00065     // predefined levels of limits around the TrigLevel to be passed
00066     // before the trigger goes off
00067     virtual const int TrigHysteresisIdx();
00068     // the trigger point (in counts) at which the trigger will go off
00069     virtual const int TrigLevel();
00070     virtual const int TrigMode();
00071     // trigger channel (zero-based)
00072     virtual const int TrigScnChnIdx();
00073     // 0 = trigger on the rising slope (negative)
00074     // 1 = trigger on the falling slope (positive)
00075     virtual const int TrigSlope();
00076     // number of scans to acquire after trigger occurs, and stop
00077     virtual const int TrigPostLength();
00078     // number of scans to acquire before trigger occurs, and stop
00079     virtual const int TrigPreLength();
00085 
00086     virtual void ADChannelCount(const int ChannelCount);
00087     virtual void ADCounter(const long int Counter);
00088     virtual void BurstCounter(const long int BurstCounter);
00090     virtual void DeviceFile(const char *const DeviceFile);
00092     virtual void EventPoint(const long int EventPnt);
00094     virtual void MaxBurstRate(const double MaxBurstRt);
00096     virtual void SampleRate(const double SampleRt);
00097     // predefined levels of limits around the TrigLevel to be passed
00098     // before the trigger goes off
00099     virtual void TrigHysteresisIdx(const int Hidx);
00100     // the trigger point (in counts) at which the trigger will go off
00101     virtual void TrigLevel(const int Level);
00102     virtual void TrigMode(const int Mode);
00103     // trigger channel (zero-based)
00104     virtual void TrigScnChnIdx(const int SCidx);
00105     // 0 = trigger on the rising slope (negative)
00106     // 1 = trigger on the falling slope (positive)
00107     virtual void TrigSlope(const int Slope);
00108     // number of scans to acquire after trigger occurs, and stop
00109     virtual void TrigPostLength(const int PostLength);
00110     // number of scans to acquire before trigger occurs, and stop
00111     virtual void TrigPreLength(const int PreLength);
00117 
00118     virtual void ADChannelList(const int *const ChannelList);
00119     // array index corresponds to physical channel
00120     // (both are zero-based)
00121     virtual void ADDiffList(const int *const DiffList);
00122     // assigns the gain index to supporting devices
00123     // array index corresponds to physical channel
00124     // (both are zero-based)
00125     virtual void ADGainList(const int *const GainList);
00127     virtual void ADMethodList(const int *const MethodList);
00128     // sends 'value' to a DAC 'port'
00129     virtual void DAOutput(const int value, const int port);
00130     virtual const long int DigitalInput();
00131     // sends 'value' to all digital ports
00132     // which port depends on the bit position in value
00133     // what value (0, 1) depends on the corresponding bit in 'value'
00134     virtual void DigitalOutput(const int value);
00135     virtual void GetData();
00137     virtual void GetDataEx(short int *iArray, const int Count);
00138     virtual void GetDataFrame();
00139     virtual void GetDataFrameEx(short int *iArray, const int Count);
00141     virtual void Start();
00143     virtual void Stop();
00151 
00152     virtual const bool ControlError(long int &Code);
00154     virtual const bool NewData(long int &Count);
00156     virtual const bool OverRun();
00159   protected:
00161     virtual void DeviceConnect();
00163     virtual void DeviceDisconnect();
00164 
00165     int m_ADChannelCount;
00166     long int m_ADCounter;
00167     long int m_BurstCounter;
00168     long int m_EventPoint;
00169     double m_MaxBurstRate;
00170     double m_SampleRate;
00171     int m_TrigHysteresisIdx;
00172     int m_TrigLevel;
00173     int m_TrigMode;
00174     int m_TrigScnChnIdx;
00175     int m_TrigSlope;
00176     int m_TrigPostLength;
00177     int m_TrigPreLength;
00178 
00179     int *m_ADChannelList;
00180     int *m_ADDiffList;
00181     int *m_ADGainList;
00182     int *m_ADMethodList;
00183 
00184     char *m_device_file;  
00185     bool m_acquiring_data;  
00186     long int m_last_error; 
00187 
00188   private:
00190     dsdk(const dsdk &copy){};
00191 };
00192 
00193 #endif
00194 

Generated on Mon Aug 2 09:44:50 2004 for DataqSDK by doxygen 1.3.6