10 #include <leddevice/LedDevice.h> 36 bool init(
const QJsonObject &deviceConfig);
84 virtual int write(
const std::vector<ColorRgb>& ledValues);
91 int testAndOpen(libusb_device * device,
const QString & requestedSerialNumber);
94 int writeBytes(uint8_t *data,
int size);
97 int disableSmoothing();
105 static libusb_device_handle * openDevice(libusb_device * device);
106 static QString getString(libusb_device * device,
int stringDescriptorIndex);
109 libusb_context * _libusbContext;
112 libusb_device_handle * _deviceHandle;
121 QString _serialNumber;
124 Version _firmwareVersion;
LedDeviceLightpack(const QString &serialNumber="")
Constructs the LedDeviceLightpack.
Definition: LedDeviceLightpack.cpp:35
virtual ~LedDeviceLightpack()
Destructor of the LedDevice; closes the output device if it is open.
Definition: LedDeviceLightpack.cpp:54
LedDevice implementation for a lightpack device (http://code.google.com/p/light-pack/) ...
Definition: LedDeviceLightpack.h:15
Interface (pure virtual base class) for LedDevices.
Definition: LedDevice.h:32
bool init(const QJsonObject &deviceConfig)
Sets configuration.
Definition: LedDeviceLightpack.cpp:72
int write(const ColorRgb *ledValues, int size)
Writes the RGB-Color values to the leds.
Definition: LedDeviceLightpack.cpp:253
const QString & getSerialNumber() const
Get the serial of the Lightpack.
Definition: LedDeviceLightpack.cpp:282
static LedDevice * construct(const QJsonObject &deviceConfig)
constructs leddevice
Definition: LedDeviceLightpack.cpp:80
virtual int switchOff()
Switch the leds off.
Definition: LedDeviceLightpack.cpp:276
int open()
Opens and configures the output device.
Definition: LedDeviceLightpack.cpp:85
int getLedCount() const
Get the number of leds.
Definition: LedDeviceLightpack.cpp:287
Plain-Old-Data structure containing the red-green-blue color specification.
Definition: ColorRgb.h:13