#include <yocto_colorledcluster.h>
Public Member Functions | |
virtual int | _invokeValueCallback (string value) |
int | activeLedCount (void) |
virtual int | addHslMoveToBlinkSeq (int seqIndex, int hslValue, int delay) |
virtual int | addJumpToBlinkSeq (int seqIndex, int linkSeqIndex) |
virtual int | addMirrorToBlinkSeq (int seqIndex) |
virtual int | addRgbMoveToBlinkSeq (int seqIndex, int rgbValue, int delay) |
virtual int | addUnlinkToBlinkSeq (int seqIndex) |
int | blinkSeqMaxCount (void) |
int | blinkSeqMaxSize (void) |
string | command (void) |
int | get_activeLedCount (void) |
int | get_blinkSeqMaxCount (void) |
int | get_blinkSeqMaxSize (void) |
virtual vector< int > | get_blinkSeqSignatures (int seqIndex, int count) |
virtual vector< int > | get_blinkSeqState (int seqIndex, int count) |
virtual vector< int > | get_blinkSeqStateAtPowerOn (int seqIndex, int count) |
virtual vector< int > | get_blinkSeqStateSpeed (int seqIndex, int count) |
string | get_command (void) |
virtual vector< int > | get_linkedSeqArray (int ledIndex, int count) |
int | get_maxLedCount (void) |
virtual vector< int > | get_rgbColorArray (int ledIndex, int count) |
virtual vector< int > | get_rgbColorArrayAtPowerOn (int ledIndex, int count) |
virtual string | get_rgbColorBuffer (int ledIndex, int count) |
virtual int | hsl_move (int ledIndex, int count, int hslValue, int delay) |
virtual int | hslArray_move (vector< int > hslList, int delay) |
virtual int | hslArrayOfs_move (int ledIndex, vector< int > hslList, int delay) |
virtual int | linkLedToBlinkSeq (int ledIndex, int count, int seqIndex, int offset) |
virtual int | linkLedToBlinkSeqAtPowerOn (int ledIndex, int count, int seqIndex, int offset) |
virtual int | linkLedToPeriodicBlinkSeq (int ledIndex, int count, int seqIndex, int periods) |
int | maxLedCount (void) |
YColorLedCluster * | next (void) |
YColorLedCluster * | nextColorLedCluster (void) |
virtual int | registerValueCallback (YColorLedClusterValueCallback callback) |
virtual int | resetBlinkSeq (int seqIndex) |
virtual int | rgb_move (int ledIndex, int count, int rgbValue, int delay) |
virtual int | rgbArray_move (vector< int > rgbList, int delay) |
virtual int | rgbArrayOfs_move (int ledIndex, vector< int > rgbList, int delay) |
virtual int | saveBlinkSeq (int seqIndex) |
virtual int | saveLedsConfigAtPowerOn (void) |
virtual int | saveLedsState (void) |
virtual int | sendCommand (string command) |
int | set_activeLedCount (int newval) |
virtual int | set_blinkSeqSpeed (int seqIndex, int speed) |
virtual int | set_blinkSeqStateAtPowerOn (int seqIndex, int autostart) |
int | set_command (const string &newval) |
virtual int | set_hslColor (int ledIndex, int count, int hslValue) |
virtual int | set_hslColorArray (int ledIndex, vector< int > hslList) |
virtual int | set_hslColorBuffer (int ledIndex, string buff) |
virtual int | set_rgbColor (int ledIndex, int count, int rgbValue) |
virtual int | set_rgbColorArray (int ledIndex, vector< int > rgbList) |
virtual int | set_rgbColorAtPowerOn (int ledIndex, int count, int rgbValue) |
virtual int | set_rgbColorBuffer (int ledIndex, string buff) |
int | setActiveLedCount (int newval) |
int | setCommand (const string &newval) |
virtual int | startBlinkSeq (int seqIndex) |
virtual int | stopBlinkSeq (int seqIndex) |
virtual int | unlinkLedFromBlinkSeq (int ledIndex, int count) |
~YColorLedCluster () | |
Public Member Functions inherited from YFunction | |
void | _clearDataStreamCache () |
string | _decode_json_string (const string &json) |
string | _download (const string &url) |
YDataStream * | _findDataStream (YDataSet &dataset, const string &def) |
string | _get_json_path (const string &json, const string &path) |
vector< string > | _json_get_array (const string &json) |
string | _json_get_key (const string &json, const string &data) |
string | _json_get_string (const string &json) |
int | _parseEx (yJsonStateMachine &j) |
virtual int | _parserHelper (void) |
string | _parseString (yJsonStateMachine &j) |
string | _request (const string &request) |
string | _requestEx (int tcpchan, const string &request, yapiRequestProgressCallback callback, void *context) |
void | _throw (YRETCODE errType, string errMsg) |
YRETCODE | _upload (const string &path, const string &content) |
YRETCODE | _uploadWithProgress (const string &path, const string &content, yapiRequestProgressCallback callback, void *context) |
string | advertisedValue (void) |
void | clearCache () |
string | describe (void) |
string | errMessage (void) |
string | errorMessage (void) |
YRETCODE | errorType (void) |
YRETCODE | errType (void) |
YFUN_DESCR | functionDescriptor (void) |
string | get_advertisedValue (void) |
string | get_errorMessage (void) |
YRETCODE | get_errorType (void) |
virtual string | get_friendlyName (void) |
YFUN_DESCR | get_functionDescriptor (void) |
string | get_functionId (void) |
string | get_hardwareId (void) |
string | get_hubSerial () |
string | get_logicalName (void) |
YModule * | get_module (void) |
void * | get_userData (void) |
bool | isOnline (void) |
YRETCODE | load (int msValidity) |
virtual string | loadAttribute (string attrName) |
string | logicalName (void) |
YModule * | module (void) |
virtual int | muteValueCallbacks (void) |
YFunction * | next (void) |
YFunction * | nextFunction (void) |
virtual int | registerValueCallback (YFunctionValueCallback callback) |
int | set_advertisedValue (const string &newval) |
int | set_logicalName (const string &newval) |
void | set_userData (void *data) |
int | setAdvertisedValue (const string &newval) |
int | setLogicalName (const string &newval) |
void | setUserData (void *data) |
virtual int | unmuteValueCallbacks (void) |
void * | userData (void) |
virtual | ~YFunction () |
Static Public Member Functions | |
static YColorLedCluster * | Find (string func) |
static YColorLedCluster * | FindColorLedCluster (string func) |
static YColorLedCluster * | First (void) |
static YColorLedCluster * | FirstColorLedCluster (void) |
Static Public Member Functions inherited from YFunction | |
static void | _ClearCache (void) |
static YFunction * | Find (string func) |
static YFunction * | FindFunction (string func) |
static YFunction * | First (void) |
static YFunction * | FirstFunction (void) |
Static Public Attributes | |
static const int | ACTIVELEDCOUNT_INVALID = YAPI_INVALID_UINT |
static const int | BLINKSEQMAXCOUNT_INVALID = YAPI_INVALID_UINT |
static const int | BLINKSEQMAXSIZE_INVALID = YAPI_INVALID_UINT |
static const string | COMMAND_INVALID = YAPI_INVALID_STRING |
static const int | MAXLEDCOUNT_INVALID = YAPI_INVALID_UINT |
Static Public Attributes inherited from YFunction | |
static const string | ADVERTISEDVALUE_INVALID = YAPI_INVALID_STRING |
static const string | FRIENDLYNAME_INVALID = YAPI_INVALID_STRING |
static const YFUN_DESCR | FUNCTIONDESCRIPTOR_INVALID = Y_FUNCTIONDESCRIPTOR_INVALID |
static const string | FUNCTIONID_INVALID = YAPI_INVALID_STRING |
static const string | HARDWAREID_INVALID = YAPI_INVALID_STRING |
static const string | LOGICALNAME_INVALID = YAPI_INVALID_STRING |
Protected Member Functions | |
virtual int | _parseAttr (YJSONObject *json_val) |
YColorLedCluster (const string &func) | |
Protected Member Functions inherited from YFunction | |
YRETCODE | _buildSetRequest (const string &changeattr, const string *changeval, string &request, string &errmsg) |
string | _escapeAttr (const string &changeval) |
YRETCODE | _getDescriptor (YFUN_DESCR &fundescr, string &errMsg) |
YRETCODE | _getDevice (YDevice *&dev, string &errMsg) |
YRETCODE | _load_unsafe (int msValidity) |
YRETCODE | _nextFunction (string &hwId) |
int | _parse (YJSONObject *j) |
YRETCODE | _setAttr (string attrname, string newvalue) |
YFunction (const string &func) | |
Protected Attributes | |
int | _activeLedCount |
int | _blinkSeqMaxCount |
int | _blinkSeqMaxSize |
string | _command |
int | _maxLedCount |
YColorLedClusterValueCallback | _valueCallbackColorLedCluster |
Protected Attributes inherited from YFunction | |
string | _advertisedValue |
u64 | _cacheExpiration |
string | _className |
std::map< string, YDataStream * > | _dataStreams |
string | _func |
YFUN_DESCR | _fundescr |
string | _funId |
string | _hwId |
string | _lastErrorMsg |
YRETCODE | _lastErrorType |
string | _logicalName |
string | _serial |
yCRITICAL_SECTION | _this_cs |
void * | _userData |
YFunctionValueCallback | _valueCallbackFunction |
Friends | |
YColorLedCluster * | yFindColorLedCluster (const string &func) |
YColorLedCluster * | yFirstColorLedCluster (void) |
Additional Inherited Members | |
Static Protected Member Functions inherited from YFunction | |
static void | _AddToCache (const string &classname, const string &func, YFunction *obj) |
static YFunction * | _FindFromCache (const string &classname, const string &func) |
static void | _UpdateTimedReportCallbackList (YFunction *func, bool add) |
static void | _UpdateValueCallbackList (YFunction *func, bool add) |
Static Protected Attributes inherited from YFunction | |
static std::map< string, YFunction * > | _cache |
YColorLedCluster Class: ColorLedCluster function interface
The Yoctopuce application programming interface allows you to drive a color LED cluster. Unlike the ColorLed class, the ColorLedCluster allows to handle several LEDs at one. Color changes can be done using RGB coordinates as well as HSL coordinates. The module performs all conversions form RGB to HSL automatically. It is then self-evident to turn on a LED with a given hue and to progressively vary its saturation or lightness. If needed, you can find more information on the difference between RGB and HSL in the section following this one.
Definition at line 75 of file yocto_colorledcluster.h.
|
protected |
Definition at line 51 of file yocto_colorledcluster.cpp.
YColorLedCluster::~YColorLedCluster | ( | ) |
Definition at line 64 of file yocto_colorledcluster.cpp.
|
virtual |
Reimplemented from YFunction.
Definition at line 351 of file yocto_colorledcluster.cpp.
|
protectedvirtual |
Reimplemented from YFunction.
Definition at line 73 of file yocto_colorledcluster.cpp.
|
inline |
Definition at line 119 of file yocto_colorledcluster.h.
|
virtual |
Adds an HSL transition to a sequence. A sequence is a transition list, which can be executed in loop by an group of LEDs. Sequences are persistant and are saved in the device flash memory as soon as the saveBlinkSeq() method is called.
seqIndex | : sequence index. |
hslValue | : target color (0xHHSSLL) |
delay | : transition duration in ms |
On failure, throws an exception or returns a negative error code.
Definition at line 490 of file yocto_colorledcluster.cpp.
|
virtual |
Adds to a sequence a jump to another sequence. When a pixel will reach this jump, it will be automatically relinked to the new sequence, and will run it starting from the beginning.
seqIndex | : sequence index. |
linkSeqIndex | : index of the sequence to chain. |
On failure, throws an exception or returns a negative error code.
Definition at line 525 of file yocto_colorledcluster.cpp.
|
virtual |
Adds a mirror ending to a sequence. When the sequence will reach the end of the last transition, its running speed will automatically be reversed so that the sequence plays in the reverse direction, like in a mirror. After the first transition of the sequence is played at the end of the reverse execution, the sequence starts again in the initial direction.
seqIndex | : sequence index. |
On failure, throws an exception or returns a negative error code.
Definition at line 508 of file yocto_colorledcluster.cpp.
|
virtual |
Adds an RGB transition to a sequence. A sequence is a transition list, which can be executed in loop by a group of LEDs. Sequences are persistent and are saved in the device flash memory as soon as the saveBlinkSeq() method is called.
seqIndex | : sequence index. |
rgbValue | : target color (0xRRGGBB) |
delay | : transition duration in ms |
On failure, throws an exception or returns a negative error code.
Definition at line 472 of file yocto_colorledcluster.cpp.
|
virtual |
Adds a to a sequence a hard stop code. When a pixel will reach this stop code, instead of restarting the sequence in a loop it will automatically be unlinked from the sequence.
seqIndex | : sequence index. |
On failure, throws an exception or returns a negative error code.
Definition at line 541 of file yocto_colorledcluster.cpp.
|
inline |
Definition at line 156 of file yocto_colorledcluster.h.
|
inline |
Definition at line 168 of file yocto_colorledcluster.h.
|
inline |
Definition at line 173 of file yocto_colorledcluster.h.
|
inlinestatic |
Definition at line 752 of file yocto_colorledcluster.h.
|
static |
Retrieves a RGB LED cluster for a given identifier. The identifier can be specified using several formats:
This function does not require that the RGB LED cluster is online at the time it is invoked. The returned object is nevertheless valid. Use the method YColorLedCluster.isOnline() to test if the RGB LED cluster is indeed online at a given time. In case of ambiguity when looking for a RGB LED cluster by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.
If a call to this object's is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.
func | : a string that uniquely characterizes the RGB LED cluster |
Definition at line 300 of file yocto_colorledcluster.cpp.
|
inlinestatic |
Definition at line 776 of file yocto_colorledcluster.h.
|
static |
Starts the enumeration of RGB LED clusters currently accessible. Use the method YColorLedCluster.nextColorLedCluster() to iterate on next RGB LED clusters.
Definition at line 1195 of file yocto_colorledcluster.cpp.
int YColorLedCluster::get_activeLedCount | ( | void | ) |
Returns the number of LEDs currently handled by the device.
On failure, throws an exception or returns Y_ACTIVELEDCOUNT_INVALID.
Definition at line 101 of file yocto_colorledcluster.cpp.
int YColorLedCluster::get_blinkSeqMaxCount | ( | void | ) |
Returns the maximum number of sequences that the device can handle.
On failure, throws an exception or returns Y_BLINKSEQMAXCOUNT_INVALID.
Definition at line 184 of file yocto_colorledcluster.cpp.
int YColorLedCluster::get_blinkSeqMaxSize | ( | void | ) |
Returns the maximum length of sequences.
On failure, throws an exception or returns Y_BLINKSEQMAXSIZE_INVALID.
Definition at line 213 of file yocto_colorledcluster.cpp.
|
virtual |
Returns a list on 32 bit signatures for specified blinking sequences. Since blinking sequences cannot be read from the device, this can be used to detect if a specific blinking sequence is already programmed.
seqIndex | : index of the first blinking sequence which should be returned |
count | : number of blinking sequences which should be returned |
On failure, throws an exception or returns an empty array.
Definition at line 1075 of file yocto_colorledcluster.cpp.
|
virtual |
Returns a list of integers with the started state for specified blinking sequences.
seqIndex | : index of the first blinking sequence which should be returned |
count | : number of blinking sequences which should be returned |
On failure, throws an exception or returns an empty array.
Definition at line 1167 of file yocto_colorledcluster.cpp.
|
virtual |
Returns a list of integers with the "auto-start at power on" flag state for specified blinking sequences.
seqIndex | : index of the first blinking sequence which should be returned |
count | : number of blinking sequences which should be returned |
On failure, throws an exception or returns an empty array.
Definition at line 1139 of file yocto_colorledcluster.cpp.
|
virtual |
Returns a list of integers with the current speed for specified blinking sequences.
seqIndex | : index of the first sequence speed which should be returned |
count | : number of sequence speeds which should be returned |
On failure, throws an exception or returns an empty array.
Definition at line 1109 of file yocto_colorledcluster.cpp.
string YColorLedCluster::get_command | ( | void | ) |
Definition at line 235 of file yocto_colorledcluster.cpp.
|
virtual |
Returns a list on sequence index for each RGB LED. The first number represents the sequence index for the the first LED, the second number represents the sequence index for the second LED, etc.
ledIndex | : index of the first LED which should be returned |
count | : number of LEDs which should be returned |
On failure, throws an exception or returns an empty array.
Definition at line 1045 of file yocto_colorledcluster.cpp.
int YColorLedCluster::get_maxLedCount | ( | void | ) |
Returns the maximum number of LEDs that the device can handle.
On failure, throws an exception or returns Y_MAXLEDCOUNT_INVALID.
Definition at line 155 of file yocto_colorledcluster.cpp.
|
virtual |
Returns a list on 24bit RGB color values with the current colors displayed on the RGB leds. The first number represents the RGB value of the first LED, the second number represents the RGB value of the second LED, etc.
ledIndex | : index of the first LED which should be returned |
count | : number of LEDs which should be returned |
On failure, throws an exception or returns an empty array.
Definition at line 977 of file yocto_colorledcluster.cpp.
|
virtual |
Returns a list on 24bit RGB color values with the RGB LEDs startup colors. The first number represents the startup RGB value of the first LED, the second number represents the RGB value of the second LED, etc.
ledIndex | : index of the first LED which should be returned |
count | : number of LEDs which should be returned |
On failure, throws an exception or returns an empty array.
Definition at line 1011 of file yocto_colorledcluster.cpp.
|
virtual |
Returns a binary buffer with content from the LED RGB buffer, as is. First three bytes are RGB components for the first LED in the interval, the next three bytes for the second LED in the interval, etc.
ledIndex | : index of the first LED which should be returned |
count | : number of LEDs which should be returned |
On failure, throws an exception or returns an empty binary buffer.
Definition at line 960 of file yocto_colorledcluster.cpp.
|
virtual |
Allows you to modify the current color of a group of adjacent LEDs to another color, in a seamless and autonomous manner. The transition is performed in the HSL space. In HSL, hue is a circular value (0..360°). There are always two paths to perform the transition: by increasing or by decreasing the hue. The module selects the shortest transition. If the difference is exactly 180°, the module selects the transition which increases the hue.
ledIndex | : index of the fisrt affected LED. |
count | : affected LED count. |
hslValue | : new color (0xHHSSLL). |
delay | : transition duration in ms |
On failure, throws an exception or returns a negative error code.
Definition at line 454 of file yocto_colorledcluster.cpp.
|
virtual |
Sets up a smooth HSL color transition to the specified pixel-by-pixel list of HSL color codes. The first color code represents the target HSL value of the first LED, the second color code represents the target value of the second LED, etc.
hslList | : a list of target 24bit HSL codes, in the form 0xHHSSLL |
delay | : transition duration in ms |
On failure, throws an exception or returns a negative error code.
Definition at line 905 of file yocto_colorledcluster.cpp.
|
virtual |
Sets up a smooth HSL color transition to the specified pixel-by-pixel list of HSL color codes. The first color code represents the target HSL value of the first LED, the second color code represents the target value of the second LED, etc.
ledIndex | : index of the first LED which should be updated |
hslList | : a list of target 24bit HSL codes, in the form 0xHHSSLL |
delay | : transition duration in ms |
On failure, throws an exception or returns a negative error code.
Definition at line 926 of file yocto_colorledcluster.cpp.
|
virtual |
Links adjacent LEDs to a specific sequence. These LEDs start to execute the sequence as soon as startBlinkSeq is called. It is possible to add an offset in the execution: that way we can have several groups of LED executing the same sequence, with a temporal offset. A LED cannot be linked to more than one sequence.
ledIndex | : index of the first affected LED. |
count | : affected LED count. |
seqIndex | : sequence index. |
offset | : execution offset in ms. |
On failure, throws an exception or returns a negative error code.
Definition at line 561 of file yocto_colorledcluster.cpp.
|
virtual |
Links adjacent LEDs to a specific sequence at device poweron. Don't forget to configure the sequence auto start flag as well and call saveLedsConfigAtPowerOn(). It is possible to add an offset in the execution: that way we can have several groups of LEDs executing the same sequence, with a temporal offset. A LED cannot be linked to more than one sequence.
ledIndex | : index of the first affected LED. |
count | : affected LED count. |
seqIndex | : sequence index. |
offset | : execution offset in ms. |
On failure, throws an exception or returns a negative error code.
Definition at line 581 of file yocto_colorledcluster.cpp.
|
virtual |
Links adjacent LEDs to a specific sequence. These LED start to execute the sequence as soon as startBlinkSeq is called. This function automatically introduces a shift between LEDs so that the specified number of sequence periods appears on the group of LEDs (wave effect).
ledIndex | : index of the first affected LED. |
count | : affected LED count. |
seqIndex | : sequence index. |
periods | : number of periods to show on LEDs. |
On failure, throws an exception or returns a negative error code.
Definition at line 601 of file yocto_colorledcluster.cpp.
|
inline |
Definition at line 144 of file yocto_colorledcluster.h.
|
inline |
Definition at line 763 of file yocto_colorledcluster.h.
YColorLedCluster * YColorLedCluster::nextColorLedCluster | ( | void | ) |
Continues the enumeration of RGB LED clusters started using yFirstColorLedCluster().
Definition at line 1185 of file yocto_colorledcluster.cpp.
|
virtual |
Registers the callback function that is invoked on every change of advertised value. The callback is invoked only during the execution of ySleep or yHandleEvents. This provides control over the time when the callback is triggered. For good responsiveness, remember to call one of these two functions periodically. To unregister a callback, pass a NULL pointer as argument.
callback | : the callback function to call, or a NULL pointer. The callback function should take two arguments: the function object of which the value has changed, and the character string describing the new advertised value. |
Definition at line 332 of file yocto_colorledcluster.cpp.
|
virtual |
Stops a sequence execution and resets its contents. Leds linked to this sequence are not automatically updated anymore.
seqIndex | : index of the sequence to reset |
On failure, throws an exception or returns a negative error code.
Definition at line 661 of file yocto_colorledcluster.cpp.
|
virtual |
Allows you to modify the current color of a group of adjacent LEDs to another color, in a seamless and autonomous manner. The transition is performed in the RGB space.
ledIndex | : index of the first affected LED. |
count | : affected LED count. |
rgbValue | : new color (0xRRGGBB). |
delay | : transition duration in ms |
On failure, throws an exception or returns a negative error code.
Definition at line 432 of file yocto_colorledcluster.cpp.
|
virtual |
Sets up a smooth RGB color transition to the specified pixel-by-pixel list of RGB color codes. The first color code represents the target RGB value of the first LED, the next color code represents the target value of the next LED, etc.
rgbList | : a list of target 24bit RGB codes, in the form 0xRRGGBB |
delay | : transition duration in ms |
On failure, throws an exception or returns a negative error code.
Definition at line 834 of file yocto_colorledcluster.cpp.
|
virtual |
Sets up a smooth RGB color transition to the specified pixel-by-pixel list of RGB color codes. The first color code represents the target RGB value of the first LED, the next color code represents the target value of the next LED, etc.
ledIndex | : index of the first LED which should be updated |
rgbList | : a list of target 24bit RGB codes, in the form 0xRRGGBB |
delay | : transition duration in ms |
On failure, throws an exception or returns a negative error code.
Definition at line 800 of file yocto_colorledcluster.cpp.
|
virtual |
Saves the definition of a sequence. Warning: only sequence steps and flags are saved. to save the LEDs startup bindings, the method saveLedsConfigAtPowerOn() must be called.
seqIndex | : index of the sequence to start. |
On failure, throws an exception or returns a negative error code.
Definition at line 731 of file yocto_colorledcluster.cpp.
|
virtual |
Saves the LEDs power-on configuration. This includes the start-up color or sequence binding for all LEDs. Warning: if some LEDs are linked to a sequence, the method saveBlinkSeq() must also be called to save the sequence definition.
On failure, throws an exception or returns a negative error code.
Definition at line 710 of file yocto_colorledcluster.cpp.
|
virtual |
Definition at line 715 of file yocto_colorledcluster.cpp.
|
virtual |
Definition at line 361 of file yocto_colorledcluster.cpp.
int YColorLedCluster::set_activeLedCount | ( | int | newval | ) |
Changes the number of LEDs currently handled by the device.
newval | : an integer corresponding to the number of LEDs currently handled by the device |
On failure, throws an exception or returns a negative error code.
Definition at line 132 of file yocto_colorledcluster.cpp.
|
virtual |
Changes the execution speed of a sequence. The natural execution speed is 1000 per thousand. If you configure a slower speed, you can play the sequence in slow-motion. If you set a negative speed, you can play the sequence in reverse direction.
seqIndex | : index of the sequence to start. |
speed | : sequence running speed (-1000...1000). |
On failure, throws an exception or returns a negative error code.
Definition at line 696 of file yocto_colorledcluster.cpp.
|
virtual |
Configures a sequence to make it start automatically at device startup. Note that a sequence with a zero duration can't be started. Don't forget to call saveBlinkSeq() to make sure the modification is saved in the device flash memory.
seqIndex | : index of the sequence to reset. |
autostart | : 0 to keep the sequence turned off and 1 to start it automatically. |
On failure, throws an exception or returns a negative error code.
Definition at line 679 of file yocto_colorledcluster.cpp.
int YColorLedCluster::set_command | ( | const string & | newval | ) |
Definition at line 257 of file yocto_colorledcluster.cpp.
|
virtual |
Changes the current color of consecutive LEDs in the cluster, using a HSL color. Encoding is done as follows: 0xHHSSLL.
ledIndex | : index of the first affected LED. |
count | : affected LED count. |
hslValue | : new color. |
On failure, throws an exception or returns a negative error code.
Definition at line 414 of file yocto_colorledcluster.cpp.
|
virtual |
Sends 24bit HSL colors (provided as a list of integers) to the LED HSL buffer, as is. The first number represents the HSL value of the LED specified as parameter, the second number represents the HSL value of the second LED, etc.
ledIndex | : index of the first LED which should be updated |
hslList | : a list of 24bit HSL codes, in the form 0xHHSSLL |
On failure, throws an exception or returns a negative error code.
Definition at line 871 of file yocto_colorledcluster.cpp.
|
virtual |
Sends a binary buffer to the LED HSL buffer, as is. First three bytes are HSL components for the LED specified as parameter, the next three bytes for the second LED, etc.
ledIndex | : index of the first LED which should be updated |
buff | : the binary buffer to send |
On failure, throws an exception or returns a negative error code.
Definition at line 854 of file yocto_colorledcluster.cpp.
|
virtual |
Changes the current color of consecutve LEDs in the cluster, using a RGB color. Encoding is done as follows: 0xRRGGBB.
ledIndex | : index of the first affected LED. |
count | : affected LED count. |
rgbValue | : new color. |
On failure, throws an exception or returns a negative error code.
Definition at line 378 of file yocto_colorledcluster.cpp.
|
virtual |
Sends 24bit RGB colors (provided as a list of integers) to the LED RGB buffer, as is. The first number represents the RGB value of the LED specified as parameter, the second number represents the RGB value of the next LED, etc.
ledIndex | : index of the first LED which should be updated |
rgbList | : a list of 24bit RGB codes, in the form 0xRRGGBB |
On failure, throws an exception or returns a negative error code.
Definition at line 765 of file yocto_colorledcluster.cpp.
|
virtual |
Changes the color at device startup of consecutve LEDs in the cluster, using a RGB color. Encoding is done as follows: 0xRRGGBB. Don't forget to call saveLedsConfigAtPowerOn() to make sure the modification is saved in the device flash memory.
ledIndex | : index of the first affected LED. |
count | : affected LED count. |
rgbValue | : new color. |
On failure, throws an exception or returns a negative error code.
Definition at line 397 of file yocto_colorledcluster.cpp.
|
virtual |
Sends a binary buffer to the LED RGB buffer, as is. First three bytes are RGB components for LED specified as parameter, the next three bytes for the next LED, etc.
ledIndex | : index of the first LED which should be updated |
buff | : the binary buffer to send |
On failure, throws an exception or returns a negative error code.
Definition at line 748 of file yocto_colorledcluster.cpp.
|
inline |
Definition at line 132 of file yocto_colorledcluster.h.
|
inline |
Definition at line 177 of file yocto_colorledcluster.h.
|
virtual |
Starts a sequence execution: every LED linked to that sequence starts to run it in a loop. Note that a sequence with a zero duration can't be started.
seqIndex | : index of the sequence to start. |
On failure, throws an exception or returns a negative error code.
Definition at line 631 of file yocto_colorledcluster.cpp.
|
virtual |
Stops a sequence execution. If started again, the execution restarts from the beginning.
seqIndex | : index of the sequence to stop. |
On failure, throws an exception or returns a negative error code.
Definition at line 646 of file yocto_colorledcluster.cpp.
|
virtual |
Unlinks adjacent LEDs from a sequence.
ledIndex | : index of the first affected LED. |
count | : affected LED count. |
On failure, throws an exception or returns a negative error code.
Definition at line 616 of file yocto_colorledcluster.cpp.
|
friend |
Retrieves a RGB LED cluster for a given identifier. The identifier can be specified using several formats:
This function does not require that the RGB LED cluster is online at the time it is invoked. The returned object is nevertheless valid. Use the method YColorLedCluster.isOnline() to test if the RGB LED cluster is indeed online at a given time. In case of ambiguity when looking for a RGB LED cluster by logical name, no error is notified: the first instance found is returned. The search is performed first by hardware name, then by logical name.
If a call to this object's is_online() method returns FALSE although you are certain that the matching device is plugged, make sure that you did call registerHub() at application initialization time.
func | : a string that uniquely characterizes the RGB LED cluster |
Definition at line 813 of file yocto_colorledcluster.h.
|
friend |
Starts the enumeration of RGB LED clusters currently accessible. Use the method YColorLedCluster.nextColorLedCluster() to iterate on next RGB LED clusters.
Definition at line 824 of file yocto_colorledcluster.h.
|
protected |
Definition at line 83 of file yocto_colorledcluster.h.
|
protected |
Definition at line 85 of file yocto_colorledcluster.h.
|
protected |
Definition at line 86 of file yocto_colorledcluster.h.
|
protected |
Definition at line 87 of file yocto_colorledcluster.h.
|
protected |
Definition at line 84 of file yocto_colorledcluster.h.
|
protected |
Definition at line 88 of file yocto_colorledcluster.h.
|
static |
Definition at line 104 of file yocto_colorledcluster.h.
|
static |
Definition at line 106 of file yocto_colorledcluster.h.
|
static |
Definition at line 107 of file yocto_colorledcluster.h.
|
static |
Definition at line 108 of file yocto_colorledcluster.h.
|
static |
Definition at line 105 of file yocto_colorledcluster.h.