BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
HciConnection.h
1 #pragma once
2 
3 #include <vector>
4 
5 #include <Poco/SharedPtr.h>
6 #include <Poco/Timespan.h>
7 #include <Poco/UUID.h>
8 
9 #include "net/MACAddress.h"
10 
11 namespace BeeeOn {
12 
17 public:
18  typedef Poco::SharedPtr<HciConnection> Ptr;
19 
20  virtual ~HciConnection();
21 
29  virtual std::vector<unsigned char> read(const Poco::UUID& uuid) = 0;
30 
38  virtual void write(
39  const Poco::UUID& uuid,
40  const std::vector<unsigned char>& value) = 0;
41 
51  virtual std::vector<unsigned char> notifiedWrite(
52  const Poco::UUID& notifyUuid,
53  const Poco::UUID& writeUuid,
54  const std::vector<unsigned char>& value,
55  const Poco::Timespan& notifyTimeout) = 0;
56 };
57 
58 }
virtual std::vector< unsigned char > notifiedWrite(const Poco::UUID &notifyUuid, const Poco::UUID &writeUuid, const std::vector< unsigned char > &value, const Poco::Timespan &notifyTimeout)=0
The method returns data from the given notifying characteristic to which the device sends data based ...
The interface class represents connection with BLE device.
Definition: HciConnection.h:16
virtual void write(const Poco::UUID &uuid, const std::vector< unsigned char > &value)=0
Sends write request to device defined by MAC address. The modified characteristic is defined by UUID ...
virtual std::vector< unsigned char > read(const Poco::UUID &uuid)=0
Sends read request to device defined by MAC address. The read characteristic is defined by UUID of ch...