forked from windelbouwman/lognplot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.h
More file actions
39 lines (29 loc) · 913 Bytes
/
Copy pathclient.h
File metadata and controls
39 lines (29 loc) · 913 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 LOGNPLOT_CPP_CLIENT
#define LOGNPLOT_CPP_CLIENT
extern "C" {
#include "lognplot.h"
}
#include <exception>
namespace lognplot {
class TcpClient {
public:
TcpClient();
void Connect(const char* address);
void Disconnect();
void SendSample(const char* name, const double timestamp, const double value);
void SendSamples(const char* name, const size_t count, double* timestamps, double* values);
void SendSampled(const char* name, const double timestamp, const double dt, const size_t count, double* values);
void SendText(const char* name, const double timestamp, const char* text);
private:
lognplot_client_t* handle;
};
class ClientException : public std::exception
{
public:
ClientException(const char*);
virtual const char * what () const throw ();
private:
const char* msg;
};
}
#endif