00001 /* 00002 * ROSOptionContainer.hpp 00003 * 00004 * Created on: Nov 18, 2011 00005 * Author: mriedel 00006 */ 00007 00008 #ifndef ROSOPTIONCONTAINER_HPP_ 00009 #define ROSOPTIONCONTAINER_HPP_ 00010 00011 #include <telekyb_defines/telekyb_defines.hpp> 00012 00013 #include <ros/ros.h> 00014 00015 #include <telekyb_srvs/StringInput.h> 00016 #include <telekyb_srvs/StringOutput.h> 00017 00018 namespace TELEKYB_NAMESPACE 00019 { 00020 00021 class OptionContainer; 00022 00023 class ROSOptionContainer { 00024 protected: 00025 OptionContainer* optionContainer; 00026 00027 // Service Offered to change Options in Container 00028 ros::ServiceServer getService; 00029 ros::ServiceServer setService; 00030 00031 // Callbacks 00032 bool getServiceCallBack( 00033 telekyb_srvs::StringOutput::Request& request, 00034 telekyb_srvs::StringOutput::Response& response); 00035 00036 bool setServiceCallBack( 00037 telekyb_srvs::StringInput::Request& request, 00038 telekyb_srvs::StringInput::Response& response); 00039 00040 // Creates the ROS Service to Get the Parameter with YAML Syntax. 00041 void createGetService(); 00042 00043 // Creates the ROS Service to Set the Parameter with YAML Syntax. 00044 void createSetService(); 00045 00046 // Shutdown Services 00047 void shutdownGetService(); 00048 void shutdownSetService(); 00049 00050 // Controller is friend 00051 friend class ROSOptionController; 00052 00053 public: 00054 ROSOptionContainer(OptionContainer* optionContainer_); 00055 virtual ~ROSOptionContainer(); 00056 }; 00057 00058 } /* namespace telekyb */ 00059 #endif /* ROSOPTIONCONTAINER_HPP_ */