sub.cpp
Go to the documentation of this file.
1 
23 #include <iostream>
26 
27 using namespace DDS;
28 
29 void callBack(const opensplice_dds_comm::MSFPPacket& packet)
30 {
31  std::cout<<packet.packet_source<<": "<<packet.packet_version<<", "<<packet.packet_type<<", "<<packet.packet_data<<", "<<packet.package_check_sum<<std::endl;
32 }
33 
34 int main()
35 {
36  opensplice_dds_comm::Subscriber subscriber("micros_swarm_framework_topic");
37  subscriber.subscribe(callBack);
38 
39  while(1)
40  {
41  sleep(1);
42  }
43 
44  return 0;
45 }
void callBack(const opensplice_dds_comm::MSFPPacket &packet)
Definition: sub.cpp:29
int main()
Definition: sub.cpp:34
void subscribe(void(*callBack)(const GSDFPacket &packet))
Definition: subscriber.cpp:115


opensplice_dds_comm
Author(s):
autogenerated on Thu Jun 1 2017 02:43:49