Implement dj::Receiver class

Again, many things were done here.
This commit is contained in:
pixl
2020-06-19 03:58:00 -04:00
parent 47db60fad8
commit b41649b0de
18 changed files with 819 additions and 26 deletions
+6 -2
View File
@@ -37,9 +37,11 @@ namespace hidpp
};
Device(const std::string& path, DeviceIndex index);
Device(std::shared_ptr<raw::RawDevice> raw_device, DeviceIndex index);
~Device();
std::string devicePath() const { return path; }
DeviceIndex deviceIndex() const { return index; }
DeviceIndex deviceIndex() const { return _index; }
std::tuple<uint8_t, uint8_t> version() const { return _version; }
void listen(); // Runs asynchronously
@@ -52,9 +54,11 @@ namespace hidpp
void handleEvent(Report& report);
private:
void _init();
std::shared_ptr<raw::RawDevice> raw_device;
std::string path;
DeviceIndex index;
DeviceIndex _index;
uint8_t supported_reports;
std::tuple<uint8_t, uint8_t> _version;