#include "ros/ros.h"
#include "myservice/setvalue.h"
#include <cstdlib>

bool process (myservice::setvalue::Request  &req,
              myservice::setvalue::Response &res)
{
    ROS_INFO("setvalue request : %s: %lf", req.axis.c_str(), req.value);
    res.response = "ok.";
    ROS_INFO("setvalue response: %s", res.response.c_str());
    return true;
}

int main(int argc, char **argv)
{
  ros::init(argc, argv, "srv_server");
  ros::NodeHandle n;

  ros::ServiceServer service = n.advertiseService("set", process);
  ROS_INFO("Ready to process.");
  ros::spin();

  return 0;
}     
