ZUNO_SWITCH_COLOR()

This macro is used to setup color switch channel for Z-Uno board using ZUNO_SETUP_CHANNELS. ZUNO_SWITCH_COLOR(flags, getter, setter) flags Byte mask with supported colors. There are predefined constants named SWITCH_COLOR_FLAGS_*. Exact list can be found in ZUNO_Definitions.h. getter pointer to a user defined function, which is supposed to return current value of a specified component for this channel. setter pointer to a user defined function, which is called when new value is received for this channel. Setter function will accept one parameter with values from 0 (off) to 99 (maximum) Functions getter should return 0-255, where 0 is Off and 255 is maximal brightness. Parameter component refers to the color component (see SWITCH_COLOR_COMPONENT_* in ZUNO_Definitions.h. BYTE getter(BYTE component) Functions setter accepts values 0-255 (0 is Off, 255 is maximal value). Parameter component refers to the color component (see SWITCH_COLOR_COMPONENT_* in ZUNO_Definitions.h. void setter(BYTE component, BYTE value) Channel generated using this macro will have Z-Wave Device Class GENERIC_TYPE_SWITCH_MULTILEVEL / SPECIFIC_TYPE_COLOR_TUNABLE_MULTILEVEL with Switch Color Command Class. This type is allowed only in ZUNO_SLEEPING_MODE_ALWAYS_AWAKE power mode (see ZUNO_SETUP_SLEEPING_MODE).
        ZUNO_SETUP_CHANNELS(ZUNO_SWITCH_COLOR(SWITCH_COLOR_FLAGS_RED|SWITCH_COLOR_FLAGS_GREEN|SWITCH_COLOR_FLAGS_BLUE, getterFunction, setterFunction))
           
void setup() {
    ...
}

void loop() {
    ...
}

BYTE getterFunction(BYTE component) {
    return currentValue;
}

void setterFunction(BYTE component, BYTE newValue) {
    ...
}