testnc.cpp
Go to the documentation of this file.
1 
23 #include "testnc/testnc.h"
24 
25 // Register the application
27 
28 namespace testnc{
29 
30  TestNC::TestNC() {}
31 
32  TestNC::~TestNC() {}
33 
34  void TestNC::init() {}
35 
36  void TestNC::stop() {}
37 
38  void TestNC::callback(const std_msgs::Float32& value)
39  {
40  //ROS_INFO("I received the value: %f.", value);
41  }
42 
43  void TestNC::start()
44  {
45  std::cout<<"TestNC step into start..."<<std::endl;
47  boost::function<void(const std_msgs::Float32&)> cb=boost::bind(&TestNC::callback, this, _1);
49  //ls.ignore();
50 
51  for(int i = 0; i < 10; i++) {
52  std_msgs::Float32 val;
53  val.data = 3.141;
54  bc.broadcast(val);
55  ros::Duration(1).sleep();
56  }
57  }
58 };
59 
bool sleep() const
Definition: testnc.h:33
void broadcast(const Type &value)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)


testnc
Author(s):
autogenerated on Mon Jun 10 2019 14:02:33