00001 /* 00002 * $RCSfile: AI16_DataPoint.hpp,v $ 00003 * $Revision: 1.3 $ 00004 * $Date: 2009/12/20 23:38:48 $ 00005 * jEdit:tabSize=4:indentSize=4:collapseFolds=1: 00006 * 00007 * class AI16_DataPoint, AI16_DataPointArray declarations 00008 */ 00009 00010 #if ! defined( AI16_DataPoint_hpp ) 00011 #define AI16_DataPoint_hpp 00012 00013 // {{{ includes 00014 #include <string> 00015 #include <vector> 00016 // }}} 00017 00018 namespace AIOUSB { 00019 00027 class AI16_DataPoint { 00028 friend class AI16_DataPointArray; 00029 friend class AI16_DataSet; 00030 friend class AnalogInputSubsystem; 00031 friend class std::vector<AI16_DataPoint>; 00032 00033 protected: 00034 int counts; // A/D count data 00035 int channel; // channel associated with count data 00036 int range; // range associated with count data 00037 bool differentialMode; // differential mode associated with count data 00038 00039 AI16_DataPoint(); 00040 00041 public: 00042 00048 int getChannel() const { 00049 return channel; 00050 } // getChannel() 00051 00058 int getRange() const { 00059 return range; 00060 } // getRange() 00061 00062 std::string getRangeText() const; 00063 00070 bool isDifferentialMode() const { 00071 return differentialMode; 00072 } // isDifferentialMode() 00073 00079 int getCounts() const { 00080 return counts; 00081 } // getCounts() 00082 00083 double getVolts() const; 00084 std::string toString() const; 00085 }; // class AI16_DataPoint 00086 00087 // {{{ class AI16_DataPointArray declarations 00088 00089 class AI16_DataPointArray : public std::vector<AI16_DataPoint> { 00090 public: 00091 AI16_DataPointArray( int size = 0 ) : std::vector<AI16_DataPoint>( size ) {} 00092 }; // class AI16_DataPointArray 00093 00094 // }}} 00095 00096 } // namespace AIOUSB 00097 00098 #endif 00099 00100 /* end of file */