3.3.1.3 Effect Activation

int LedsActivateEffect(String effectName, int priority);

Activates an effect with a pre-defined priority: LED_PRIORITY_INFO=10, LED_PRIORITY_WARNING=20 or LED_PRIORITY_CRITICAL=30. A higher priority overrides a lower one. This means that if an effect with a higher priority is activated while an effect with a lower priority is active, the higher priority effect will be preferred. If the lower priority effect still remains after the higher priority effect ends, it will be activated again. Thus, the application does not have to be concerned with sharing LEDs with other applications - effect activation with an adequate priority is enough. By default, the blue LED backlight notification is activated automatically with priority 9.
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
  • IndoorTouch.RC_ERR_DENIED = -7; notifications are disabled
  • IndoorTouch.RC_ERR_MAXREACHED = -10; maximum count of defined effects exceeded
  • IndoorTouch.RC_ERR_PRIORITY = -11; an effect with the same LED mask and identical priority has been started