2N TELEKOMUNIKACE a.s., www.2n.cz
10/42
3. Transitions means a string of transitions in the following format: <initial
brightness>,<target brightness>,<transition time in ms>, … . The count of
numbers in the string must be divisible by 3 and contain one transition at least.
4. Mask of used LEDs for the effect itself. These LEDs are affected by the
transition defined.
5. Mask of used LEDs. It contains all bits from the argument 4 mask plus others
in which the brightness value is 0. The other LEDs are not affected by the effect
and can use other effects that use a set of LEDs disjunctive with this effect. The
following LEDs are available for effects at present:
LED_RED = 0x01;
LED_GREEN = 0x02
LED_BLUE = 0x04;
LED_NFC = 0x08;
Example of effect definition for red LED blinking:
IndoorTouch.LedsAddEffect(
"test-r"
, LED_EFFECT_CONTINUITY_REPEATING,
"0,2
55,1000,255,0,1000"
, LED_RED, LED_RED | LED_GREEN | LED_BLUE));
The library includes a pre-defined effect "red-blink-missedcalls“ for red blinking.
The return value is as follows:
IndoorTouch.RC_OK = 0;
IndoorTouch.RC_ERR_CONN = -1; API daemon connection error
IndoorTouch.RC_ERR_EXIST = -3; the effect name already exists
IndoorTouch.RC_ERR_INVALID = -5; invalid function arguments
IndoorTouch.RC_ERR_MAXREACHED = -10; maximum count of defined effects
exceeded
3.3.1.2 Effect Removing
int
IndoorTouch.LedsRemoveEffect(String effectName);
Removes an effect from the list of defined effects. If the so-defined effect is active, it
i s
n o t
a f f e c t e d
b y
t h e
c a l l .
The return value is as follows:
IndoorTouch.RC_OK = 0;
IndoorTouch.RC_ERR_CONN = -1; API daemon connection error
IndoorTouch.RC_ERR_NOTEXIST = -4; the effect name does not exist
3.3.1.3 Effect Activation