include dir was exported
This commit is contained in:
51
include/noolite.h
Normal file
51
include/noolite.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef NOOLITE_H
|
||||
#define NOOLITE_H
|
||||
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
|
||||
#include "iusbdevice.h"
|
||||
|
||||
namespace noolitelib
|
||||
{
|
||||
|
||||
enum Command
|
||||
{
|
||||
Off = 0,
|
||||
DecraseBrightnes,
|
||||
On,
|
||||
IncreaseBrightnes,
|
||||
Switch,
|
||||
InvertBrightnes,
|
||||
Set,
|
||||
CallScenario,
|
||||
SaveScenario,
|
||||
Unbind,
|
||||
StopColorSelection,
|
||||
Bind = 15,
|
||||
// Commands for SD111-180 only
|
||||
ColorSelection,
|
||||
ColorSwitch,
|
||||
ModeSwitch,
|
||||
EffectSpeed
|
||||
};
|
||||
|
||||
using Params = std::vector<int>;
|
||||
|
||||
class Noolite
|
||||
{
|
||||
public:
|
||||
Noolite(IUsbDevice *device = nullptr);
|
||||
~Noolite();
|
||||
|
||||
bool sendCommand(unsigned char channel, Command command, const Params ¶ms = Params());
|
||||
|
||||
private:
|
||||
IUsbDevice *m_device;
|
||||
|
||||
std::optional<Data> composeCommand(unsigned char channel, Command command, const Params ¶ms) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // NOOLITE_H
|
||||
Reference in New Issue
Block a user