Skip to content

Commit

Permalink
Unit Localization cluster server (#14258)
Browse files Browse the repository at this point in the history
* Unit Localization Cluster tweaks

Renamed XML file to match name in zcl.json and all.xml.

Added explicit ClusterRevision.

Corrected type for TemperatureUnit.

Added FeatureMap.

* Implement Unit Localization cluster server

* Fix Unit Localization settings per example

* ZAP regen

* ZAP regen
  • Loading branch information
lzgrablic02 authored and pull[bot] committed Dec 19, 2023
1 parent 917f8de commit 2501960
Show file tree
Hide file tree
Showing 112 changed files with 5,332 additions and 2,231 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3017,6 +3017,18 @@ server cluster TimeFormatLocalization = 44 {
readonly global attribute int16u clusterRevision = 65533;
}

server cluster UnitLocalization = 45 {
enum TempUnit : ENUM8 {
kFahrenheit = 0;
kCelsius = 1;
kKelvin = 2;
}

attribute TempUnit temperatureUnit = 0;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;
}

server cluster UserLabel = 65 {
attribute LabelStruct labelList[] = 0;
readonly global attribute int16u clusterRevision = 65533;
Expand Down Expand Up @@ -3142,6 +3154,7 @@ endpoint 0 {
server cluster SoftwareDiagnostics;
server cluster ThreadNetworkDiagnostics;
server cluster TimeFormatLocalization;
server cluster UnitLocalization;
server cluster UserLabel;
server cluster WiFiNetworkDiagnostics;
}
Expand Down
66 changes: 66 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,72 @@
}
]
},
{
"name": "Unit Localization",
"code": 45,
"mfgCode": null,
"define": "UNIT_LOCALIZATION_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": []
},
{
"name": "Unit Localization",
"code": 45,
"mfgCode": null,
"define": "UNIT_LOCALIZATION_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "TemperatureUnit",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Power Source Configuration",
"code": 46,
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/unit-localization-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wake-on-lan-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/pump-configuration-and-control-server"
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ target_sources(${APP_TARGET} PRIVATE
${APP_CLUSTERS}/low-power-server/low-power-server.cpp
${APP_CLUSTERS}/localization-configuration-server/localization-configuration-server.cpp
${APP_CLUSTERS}/time-format-localization-server/time-format-localization-server.cpp
${APP_CLUSTERS}/unit-localization-server/unit-localization-server.cpp
${APP_CLUSTERS}/media-input-server/media-input-server.cpp
${APP_CLUSTERS}/media-playback-server/media-playback-server.cpp
${APP_CLUSTERS}/mode-select-server/mode-select-server.cpp
Expand Down
13 changes: 13 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,18 @@ server cluster TimeFormatLocalization = 44 {
readonly global attribute int16u clusterRevision = 65533;
}

server cluster UnitLocalization = 45 {
enum TempUnit : ENUM8 {
kFahrenheit = 0;
kCelsius = 1;
kKelvin = 2;
}

attribute TempUnit temperatureUnit = 0;
readonly global attribute bitmap32 featureMap = 65532;
readonly global attribute int16u clusterRevision = 65533;
}

server cluster UserLabel = 65 {
attribute LabelStruct labelList[] = 0;
readonly global attribute int16u clusterRevision = 65533;
Expand Down Expand Up @@ -952,6 +964,7 @@ endpoint 0 {
server cluster SoftwareDiagnostics;
server cluster ThreadNetworkDiagnostics;
server cluster TimeFormatLocalization;
server cluster UnitLocalization;
server cluster UserLabel;
server cluster WiFiNetworkDiagnostics;
}
Expand Down
66 changes: 66 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,72 @@
}
]
},
{
"name": "Unit Localization",
"code": 45,
"mfgCode": null,
"define": "UNIT_LOCALIZATION_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": []
},
{
"name": "Unit Localization",
"code": 45,
"mfgCode": null,
"define": "UNIT_LOCALIZATION_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "TemperatureUnit",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "General Commissioning",
"code": 48,
Expand Down
1 change: 1 addition & 0 deletions examples/bridge-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/unit-localization-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server"
Expand Down
66 changes: 66 additions & 0 deletions examples/door-lock-app/door-lock-common/door-lock-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,72 @@
}
]
},
{
"name": "Unit Localization",
"code": 45,
"mfgCode": null,
"define": "UNIT_LOCALIZATION_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": []
},
{
"name": "Unit Localization",
"code": 45,
"mfgCode": null,
"define": "UNIT_LOCALIZATION_CLUSTER",
"side": "server",
"enabled": 0,
"commands": [],
"attributes": [
{
"name": "TemperatureUnit",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 0,
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Power Source Configuration",
"code": 46,
Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/unit-localization-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning-old"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server"
Expand Down
66 changes: 66 additions & 0 deletions examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1688,6 +1688,72 @@
}
]
},
{
"name": "Unit Localization",
"code": 45,
"mfgCode": null,
"define": "UNIT_LOCALIZATION_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": []
},
{
"name": "Unit Localization",
"code": 45,
"mfgCode": null,
"define": "UNIT_LOCALIZATION_CLUSTER",
"side": "server",
"enabled": 0,
"commands": [],
"attributes": [
{
"name": "TemperatureUnit",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 0,
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "General Commissioning",
"code": 48,
Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ target_sources(${APP_TARGET} PRIVATE
${CHIP_ROOT}/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp
${CHIP_ROOT}/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp
${CHIP_ROOT}/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp
${CHIP_ROOT}/src/app/clusters/unit-localization-server/unit-localization-server.cpp
${CHIP_ROOT}/src/app/clusters/fixed-label-server/fixed-label-server.cpp
${CHIP_ROOT}/src/app/clusters/user-label-server/user-label-server.cpp
${CHIP_ROOT}/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp
Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/telink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ target_sources(app PRIVATE
${CHIP_ROOT}/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp
${CHIP_ROOT}/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp
${CHIP_ROOT}/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp
${CHIP_ROOT}/src/app/clusters/unit-localization-server/unit-localization-server.cpp
${CHIP_ROOT}/src/app/clusters/fixed-label-server/fixed-label-server.cpp
${CHIP_ROOT}/src/app/clusters/user-label-server/user-label-server.cpp
${CHIP_ROOT}/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp
Expand Down
Loading

0 comments on commit 2501960

Please sign in to comment.