Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MQTTConnection.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MQTTConnection.h
1
#ifndef __MQTTCONNECTION_H__
2
#define __MQTTCONNECTION_H__
3
4
#include <string>
5
#include <mosquitto.h>
6
7
8
class
MQTTConnection
{
9
10
public
:
11
12
MQTTConnection
(
const
std::string
hostname,
const
std::string
topic,
const
int
port=1883);
13
virtual
~MQTTConnection
();
14
15
virtual
int
Status
()
const
{
return
_status
;};
16
virtual
std::string
GetHostName
()
const
{
return
_hostname
;};
17
virtual
int
GetPort
()
const
{
return
_port
;};
18
19
virtual
int
send
(
const
std::string
message
);
20
21
protected
:
22
23
int
OpenConnection
();
24
int
CloseConnection
();
25
26
std::string
_hostname
;
27
std::string
_topic
;
28
int
_status
;
29
int
_port
;
30
31
struct
mosquitto *
mosq
;
32
33
};
34
35
#endif
rcdaq
blob
master
MQTTConnection.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:48
using
1.8.2 with
sPHENIX GitHub integration