-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjura_protocol.h
More file actions
46 lines (36 loc) · 1010 Bytes
/
jura_protocol.h
File metadata and controls
46 lines (36 loc) · 1010 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
40
41
42
43
44
45
46
#ifndef JURA_PROTOCOL_H
#define JURA_PROTOCOL_H
#include <string>
#include <vector>
#include <cstdint>
#include <memory>
/**
* Jura protocol interface wrapper
* This provides an abstraction layer for the Jura Bluetooth protocol
* using the protocol-bt-cpp library
*/
class JuraProtocol {
public:
JuraProtocol();
~JuraProtocol();
// Connection management
bool connectDevice(const std::string& device_address);
bool disconnectDevice();
bool isConnected() const;
// Device discovery
std::vector<std::string> listDevices();
// Protocol commands
std::string sendCommand(const std::string& command);
std::string getDeviceInfo();
std::string getStatistics();
// Coffee brewing commands
bool brewProduct(const std::string& product_code);
// Status queries
std::string queryStatus();
private:
class Impl;
std::unique_ptr<Impl> pImpl;
bool connected_;
std::string device_address_;
};
#endif // JURA_PROTOCOL_H