subscriber.h
Go to the documentation of this file.
1 
23 #ifndef SUBSCRIBER_H_
24 #define SUBSCRIBER_H_
25 
26 #include <iostream>
27 #include <string.h>
28 #include <boost/function.hpp>
29 #include <boost/bind.hpp>
30 #include "ccpp_dds_dcps.h"
31 #include "check_status.h"
32 #include "ccpp_GSDFPacket.h"
33 #include "example_main.h"
34 #include "GSDFPacket_listener.h"
35 
36 using namespace DDS;
37 
38 namespace opensplice_dds_comm{
39  class Subscriber
40  {
41  public:
42  Subscriber(const std::string& topic_name);
43  void subscribe(void (*callBack)(const GSDFPacket& packet));
44  void subscribe(boost::function<void(const GSDFPacket&)> callBack);
45  ~Subscriber();
46  private:
47  DomainId_t domain;
48  ReturnCode_t status;
49  const char *topic_name_;
51 
52  //Generic DDS entities
53  DomainParticipantFactory_var dpf;
54  DomainParticipant_var participant;
55  Topic_var GSDFPacketTopic;
56  Subscriber_var subscriber_;
57  DataReader_ptr parentReader;
58 
61 
62  //QosPolicy holders
63  TopicQos topic_qos;
64  SubscriberQos sub_qos;
65  DataReaderQos dr_qos;
66  };
67 };
68 
69 #endif
70 
DDS_DCPSInterface_var< GSDFPacketDataReader > GSDFPacketDataReader_var
void callBack(const opensplice_dds_comm::MSFPPacket &packet)
Definition: sub.cpp:29
DomainParticipant_var participant
Definition: subscriber.h:54
DomainParticipantFactory_var dpf
Definition: subscriber.h:53
GSDFPacketDataReader_var GSDFPacketDR
Definition: subscriber.h:60
GSDFPacketTypeSupport_var GSDFPacketTS
Definition: subscriber.h:59
GSDFPacketTypeSupportInterface_var GSDFPacketTypeSupport_var


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