iSpike
2.1
Spike conversion library for robotics
|
00001 #ifndef YARPVISUALREADER_HPP_ 00002 #define YARPVISUALREADER_HPP_ 00003 00004 //iSpike includes 00005 #include <iSpike/Bitmap.hpp> 00006 #include <iSpike/Reader/VisualReader.hpp> 00007 #include <iSpike/YarpConnection.hpp> 00008 #include <iSpike/YarpPortDetails.hpp> 00009 00010 //Other includes 00011 #include <map> 00012 00013 namespace ispike{ 00014 00016 class YarpVisualReader : public VisualReader { 00017 public: 00018 YarpVisualReader(string nameserverIP, unsigned nameserverPort); 00019 virtual ~YarpVisualReader(); 00020 Bitmap& getBitmap(); 00021 void initialize(map<string, Property>& properties); 00022 void setProperties(map<string, Property>& properties); 00023 void start(); 00024 00025 private: 00026 //============================= VARIABLES ========================= 00028 Bitmap* bitmap1; 00029 00031 Bitmap* bitmap2; 00032 00034 bool returnBitmap1; 00035 00037 YarpConnection* yarpConnection; 00038 00040 string portName; 00041 00043 int sleepDuration_ms; 00044 00045 00046 //============================= METHODS ============================ 00047 void swapBitmap(); 00048 void updateProperties(map<string, Property>& properties); 00049 void workerFunction(); 00050 00051 }; 00052 00053 } 00054 00055 #endif /* YARPVISUALREADER_HPP_ */