Skip to content

Commit

Permalink
Pull request/power source configuration cluster (#12209)
Browse files Browse the repository at this point in the history
* Implemented Power source configuration cluster

* Add power source configuration in all-clusters-app and controller-clusters

* Autogenerate all

* Clean up zap errors trickled down from ToT

* Added power source configuration implementation

- A read on Sources attribute searches for all power source server clusters and decodes it in the response

* Enabled Power source configuration and Power source clusters in lock-app

* Regenerate all

Regenerate all after rebasing on ToT

* Changed Sources attribute to external since lists can not be defined in ZAP right now

* Add power source configuration source file for mbed and esp32 compilation

+ regenerate all

* Regenerate after rebase. Not sure why this on off related code always toggles on autogen.

* Improved read implementation

* Corrected INVALID_PATH logic

* Add missing source for Power source configuration cluster

* Updated descriptor cluster server tests to include Power source configuration cluster

* Regenerate all after rebase on ToT

Regenerate after changing descriptor cluster tests

* Use endpoint 0 for Power source configuration cluster test

* Regenerate after rebase on ToT

Rebase and regenerate

Rebase and regenerate

* Renamed confusing variable name

* Rebase and regen
  • Loading branch information
fessehaeve authored Dec 3, 2021
1 parent 3c6a943 commit 4f4268e
Show file tree
Hide file tree
Showing 61 changed files with 13,825 additions and 6,691 deletions.
296 changes: 52 additions & 244 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,57 @@
}
]
},
{
"name": "Power Source Configuration",
"code": 46,
"mfgCode": null,
"define": "POWER_SOURCE_CONFIGURATION_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": []
},
{
"name": "Power Source Configuration",
"code": 46,
"mfgCode": null,
"define": "POWER_SOURCE_CONFIGURATION_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "Sources",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 0,
"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": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "General Commissioning",
"code": 48,
Expand Down Expand Up @@ -9139,251 +9190,8 @@
"define": "BRIDGED_DEVICE_BASIC_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
{
"name": "StartUp",
"code": 0,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "ShutDown",
"code": 1,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "Leave",
"code": 2,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
},
{
"name": "ReachableChanged",
"code": 3,
"mfgCode": null,
"source": "server",
"incoming": 1,
"outgoing": 1
}
],
"commands": [],
"attributes": [
{
"name": "VendorName",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "VendorID",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ProductName",
"code": 3,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "NodeLabel",
"code": 5,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "HardwareVersion",
"code": 7,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "HardwareVersionString",
"code": 8,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "SoftwareVersion",
"code": 9,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "SoftwareVersionString",
"code": 10,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ManufacturingDate",
"code": 11,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "PartNumber",
"code": 12,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ProductURL",
"code": 13,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ProductLabel",
"code": 14,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "SerialNumber",
"code": 15,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "Reachable",
"code": 17,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
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 @@ -73,6 +73,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/wifi_network_diagnostics_server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/pump-configuration-and-control-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src"
#${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ias-zone-client
)
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 @@ -137,6 +137,7 @@ target_sources(${APP_TARGET} PRIVATE
${APP_CLUSTERS}/identify-server/identify-server.cpp
${APP_CLUSTERS}/window-covering-server/window-covering-server.cpp
${APP_CLUSTERS}/general_diagnostics_server/general_diagnostics_server.cpp
${APP_CLUSTERS}/power-source-configuration-server/power-source-configuration-server.cpp
)

target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip)
Expand Down
2 changes: 2 additions & 0 deletions examples/lock-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ idf_component_register(INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi_network_diagnostics_server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software_diagnostics_server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general_diagnostics_server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server"
PRIV_REQUIRES bt chip QRCode)

get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)
Expand Down Expand Up @@ -142,6 +143,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server"
PRIV_REQUIRES chip QRCode bt)

set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17)
Expand Down
Loading

0 comments on commit 4f4268e

Please sign in to comment.