-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdds.hpp
More file actions
40 lines (32 loc) · 1013 Bytes
/
dds.hpp
File metadata and controls
40 lines (32 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef DDS_HPP_PSIGPUTG
#define DDS_HPP_PSIGPUTG
#include <iostream>
#include <cstring>
#include <string>
#include <chrono>
#include <vector>
#include <thread>
#include "DDSSubscriber.hpp"
#include "DDSPublisher.hpp"
#include "JSONMessagePubSubTypes.h"
#include "EncodedITSMessagePubSubTypes.h"
#include "EncodedITSMessagePubSubTypes.h"
using namespace std;
class Application;
class Dds {
private:
string client_name;
int domain;
void from_dds_thread();
std::function<void(std::string, std::string)> on_message_function;
string message_type = "mqtt";
public:
Dds(string client_name, int domain, function<void(std::string, std::string)> func);
Dds(std::string client_name, int domain, function<void(std::string, std::string)> func, std::string msg_type);
~Dds();
void publish(string topic, string message);
void provision_publisher(string topic);
void subscribe(string topic);
void on_message(string topic, string message);
};
#endif /* DDS_HPP_PSIGPUTG */