Z-Uno2 user defined configuration parameters
Posted: 13 Dec 2021 00:18
I'm using Z-Uno2 with 3.0.8. I am looking to define and use custom Z-Wave configuration parameters. i looked at the Z-Uno reference and tried to build and run the Z-Uno2 sample but it didn't work. Looking at the source code it seems that I have to define the data structure for each parameter and add an accessor function that replaces the default __attribute__ ((weak) function. An extract of my code is below. This all works perfectly with both the SiLabs Simplicity Studio network tools and my Z-Wave application. Can you please confirm that this is the correct approach for the Z-Uno2 (or will there be a macro to replace the code)?
Code: Select all
/ LockButtonInterval
const ZunoCFGParameter_t userParam67 =
{
.name = "LockButtonInterval",
.info = "Lock button LED display time in seconds",
.minValue = 1,
.maxValue = 20,
.defaultValue = 2,
.size = ZUNO_CFG_PARAMETER_SIZE_16BIT,
.format = ZUNO_CFG_PARAMETER_FORMAT_UNSIGNED,
.readOnly = false,
.altering = false
};
// Search available user configuration definitions and return if found
const ZunoCFGParameter_t *zunoCFGParameter(size_t param) {
(void)param;
switch (param) {
case 64: return &userParam64;
case 65: return &userParam65;
case 66: return &userParam66;
case 67: return &userParam67;
}
return (ZUNO_CFG_PARAMETER_UNKNOWN);
}