Main Page
Namespaces
Classes
Files
File List
File Members
src
sub.cpp
Go to the documentation of this file.
1
23
#include <iostream>
24
#include "
opensplice_dds_comm/check_status.h
"
25
#include "
opensplice_dds_comm/subscriber.h
"
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
}
callBack
void callBack(const opensplice_dds_comm::MSFPPacket &packet)
Definition:
sub.cpp:29
subscriber.h
check_status.h
main
int main()
Definition:
sub.cpp:34
DDS
opensplice_dds_comm::Subscriber::subscribe
void subscribe(void(*callBack)(const GSDFPacket &packet))
Definition:
subscriber.cpp:115
opensplice_dds_comm::Subscriber
Definition:
subscriber.h:39
opensplice_dds_comm
Author(s):
autogenerated on Thu Jun 1 2017 02:43:49