00001 // Copyright CERN 2012 - Developed in collaboration with GSI 00002 00003 #ifndef PROXY_REPLY_HANDLER_SOURCE_H 00004 #define PROXY_REPLY_HANDLER_SOURCE_H 00005 00006 #include <fesa-core/Utilities/Mutex.h> 00007 #include <fesa-core/Utilities/ConditionalVariable.h> 00008 00009 #include <cmw-rda/ReplyHandler.h> 00010 #include <cmw-rda/Data.h> 00011 00012 #include <string> 00013 00014 namespace fesa 00015 { 00016 00022 class ProxyReplyHandler : public rdaReplyHandler 00023 { 00024 public: 00028 ProxyReplyHandler(); 00029 virtual ~ProxyReplyHandler(); 00037 void handleReply(const rdaRequest& request, const rdaData& value); 00038 00046 void waitReply(std::string& deviceName, std::string& propertyName, std::string& cycleSelectorName, 00047 rdaData& data); 00048 00055 void handleError(const rdaRequest&, const rdaException& ex); 00056 00063 void disconnected(const rdaRequest&); 00064 00070 void reconnected(const rdaRequest&); 00071 00077 void cancelled(const rdaRequest&); 00078 00079 private: 00080 rdaData value_; 00081 std::string deviceName_; 00082 std::string propertyName_; 00083 std::string cycleSelectorName_; 00084 00085 Mutex mtx_; 00086 ConditionalVariable cv_; 00087 }; 00088 00089 } // fesa 00090 00091 #endif // PROXY_REPLY_HANDLER_SOURCE_H