Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef MEASUREMENT_HPP
00015 #define MEASUREMENT_HPP
00016
00017 #include <string>
00018 #include <vector>
00019 #include "../BasicDatatypes.hpp"
00020
00021
00022
00023
00024 enum MeasurementType
00025 {
00026 Meastype_Unknown = 0x0000,
00027
00028 Meastype_Voltage_Supply_Panel = 0x0001,
00029 Meastype_Temperature_Panel = 0x0002,
00030 Meastype_Brightness = 0x0003,
00031 Meastype_Voltage_Supply_Video = 0x0004,
00032 Meastype_Sniffpad_Panel = 0x0005,
00033
00034 Meastype_DeviceName = 0x0006,
00035 Meastype_DeviceVersion = 0x0007,
00036 Meastype_ScanFreq = 0x0008,
00037 Meastype_ScanStartAngle = 0x0009,
00038 Meastype_ScanStopAngle = 0x000A,
00039 Meastype_ScanResolution = 0x000B
00040 };
00041
00042 namespace datatypes
00043 {
00044
00045 class Measurement
00046 {
00047 public:
00048 Measurement() {m_measType = Meastype_Unknown;};
00049 virtual ~Measurement() {};
00050
00051
00052 inline virtual const UINT32 getUsedMemory() const {return ((sizeof(*this)) + m_textValue.length());};
00053
00054 std::string getName() const;
00055 std::string valueToString() const;
00056
00057 MeasurementType m_measType;
00058
00059
00060
00061 double m_doubleValue;
00062 INT32 m_intValue;
00063 std::string m_textValue;
00064 };
00065
00066
00067
00068
00069
00070 class MeasurementList : public BasicData
00071 {
00072 public:
00073
00074 MeasurementList() {m_datatype = Datatype_MeasurementList;};
00075 virtual ~MeasurementList() {};
00076
00077
00078 inline virtual const UINT32 getUsedMemory() const
00079 {
00080 UINT32 sum = sizeof(*this);
00081 std::vector<Measurement>::const_iterator iter;
00082 for (iter = m_list.begin(); iter != m_list.end(); iter++)
00083 {
00084 sum += iter->getUsedMemory();
00085 }
00086 return sum;
00087 }
00088
00089 std::vector<Measurement> m_list;
00090 };
00091
00092 }
00093
00094 #endif // MEASUREMENT_HPP