Define and set sw_build_id in the basic attr cluster
This commit is contained in:
parent
7dcd4bfe53
commit
b72b97091c
2 changed files with 9 additions and 0 deletions
|
|
@ -13,6 +13,10 @@ config PRST_ZB_BUILD_DATE
|
||||||
string "Zigbee basic cluster build date attribute. Max 16 bytes."
|
string "Zigbee basic cluster build date attribute. Max 16 bytes."
|
||||||
default ""
|
default ""
|
||||||
|
|
||||||
|
config PRST_ZB_SOFTWARE_VERSION
|
||||||
|
string "Zigbee basic cluster software version attribute. Max 16 bytes."
|
||||||
|
default ""
|
||||||
|
|
||||||
config PRST_ZB_MODEL_ID
|
config PRST_ZB_MODEL_ID
|
||||||
string "Zigbee basic cluster model id attribute. Max 32 bytes."
|
string "Zigbee basic cluster model id attribute. Max 32 bytes."
|
||||||
default "b-parasite"
|
default "b-parasite"
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,11 @@ void prst_zb_attrs_init(struct zb_device_ctx *dev_ctx) {
|
||||||
CONFIG_PRST_ZB_BUILD_DATE,
|
CONFIG_PRST_ZB_BUILD_DATE,
|
||||||
ZB_ZCL_STRING_CONST_SIZE(CONFIG_PRST_ZB_BUILD_DATE));
|
ZB_ZCL_STRING_CONST_SIZE(CONFIG_PRST_ZB_BUILD_DATE));
|
||||||
|
|
||||||
|
ZB_ZCL_SET_STRING_VAL(
|
||||||
|
dev_ctx->basic_attr.sw_ver,
|
||||||
|
CONFIG_PRST_ZB_SOFTWARE_VERSION,
|
||||||
|
ZB_ZCL_STRING_CONST_SIZE(CONFIG_PRST_ZB_SOFTWARE_VERSION));
|
||||||
|
|
||||||
dev_ctx->basic_attr.hw_version = CONFIG_PRST_ZB_HARDWARE_VERSION;
|
dev_ctx->basic_attr.hw_version = CONFIG_PRST_ZB_HARDWARE_VERSION;
|
||||||
|
|
||||||
dev_ctx->batt_attrs.quantity = 1;
|
dev_ctx->batt_attrs.quantity = 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue