|
uniset-algorithms 0.2
|
00001 // ------------------------------------------------------------------------------------------ 00002 #ifndef ASensor_H_ 00003 #define ASensor_H_ 00004 // ------------------------------------------------------------------------------------------ 00005 #include <UniSetTypes.h> 00006 #include <MessageType.h> 00007 // ------------------------------------------------------------------------------------------ 00008 class ASensor 00009 { 00010 public: 00011 00012 ASensor( UniSetTypes::ObjectId id, const std::string sname="" ); 00013 ~ASensor(); 00014 00015 inline std::string getName(){ return myname; } 00016 inline UniSetTypes::ObjectId getSensorID(){ return id; } 00017 inline long getValue(){ return value; } 00018 00019 bool sensorInfo( UniSetTypes::SensorMessage *sm ); 00020 00021 friend std::ostream& operator<<(std::ostream& os, ASensor& g ); 00022 friend std::ostream& operator<<(std::ostream& os, ASensor* g ); 00023 00024 protected: 00025 ASensor(); 00026 00027 UniSetTypes::ObjectId id; 00028 long value; 00029 std::string myname; 00030 00031 private: 00032 }; 00033 // ------------------------------------------------------------------------------------------ 00034 #endif // ASensor_H_ 00035 // ------------------------------------------------------------------------------------------
1.7.4