3 #include <Poco/SharedPtr.h>
5 #include "bluetooth/HciConnection.h"
6 #include "bluetooth/RevogiDevice.h"
21 typedef Poco::SharedPtr<RevogiRGBLight> Ptr;
25 const Poco::Timespan& timeout,
26 const std::string& productName,
27 const std::list<ModuleType>& moduleTypes,
29 const HciInterface::Ptr hci);
33 void modifyStatus(
const double value,
const HciConnection::Ptr conn);
34 void modifyBrightness(
37 const HciConnection::Ptr conn);
38 void modifyColor(
const double value,
const HciConnection::Ptr conn);
40 unsigned char brightnessFromPercents(
const double percents)
const;
41 unsigned int brightnessToPercents(
const double value)
const;
47 uint32_t
retrieveRGB(
const std::vector<unsigned char>& values)
const;
49 uint32_t colorChecksum(
52 const uint8_t blue)
const;
54 void prependHeader(std::vector<unsigned char>& payload)
const override;
56 std::vector<unsigned char>& payload,
57 const unsigned char checksum)
const override;
RefreshTime represents time of refreshing values from sensors. E.g. sensors are polled periodically o...
Definition: RefreshTime.h:24
The class represents generic Revogi RGB light. It allows to control the on/off, brightness and color ...
Definition: RevogiRGBLight.h:19
Definition: MACAddress.h:8
RefreshTime refresh() const override
Regular period telling how often to call the method PollableDevice::poll(). The refresh must contain ...
Definition: BLESmartDevice.cpp:31
uint32_t retrieveRGB(const std::vector< unsigned char > &values) const
Returns RGB contained in uint32_t. The components of RGB are retrieved from recived message contained...
Definition: RevogiRGBLight.cpp:96
Abstract class for Revogi devices.
Definition: RevogiDevice.h:29