dpyMwPublisher.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 /********************************************************************************
9  ********************************* INCLUDES *************************************
10  ********************************************************************************/
11 
12 #include <azmq/socket.hpp>
13 #include <azmq/message.hpp>
14 #include <azmq/util/scope_guard.hpp>
15 
16 #include <boost/shared_ptr.hpp>
17 #include <boost/asio.hpp>
18 #include <boost/bind.hpp>
19 #include <boost/function.hpp>
20 #include <boost/enable_shared_from_this.hpp>
21 
27 class DpyMwPublisher: public boost::enable_shared_from_this<DpyMwPublisher>
28 {
29 
30  /********************************************************************************
31  ***************************** PUBLIC FUNCTIONS *********************************
32  ********************************************************************************/
33 public:
34  DpyMwPublisher(boost::asio::io_service& io, std::string pubUrl);
35  ~DpyMwPublisher();
36  void start();
37  void stop();
38  void sendData(std::string msg);
39 
40  /********************************************************************************
41  **************************** PRIVATE VARIABLES *********************************
42  ********************************************************************************/
43 private:
44  boost::asio::io_service& mIo;
45  azmq::pub_socket m_publisherSocket;
46  std::string m_pubUrl;
47  bool m_working;
49 };
Publisher class.
Definition: dpyMwPublisher.h:27