From 57d36846ccaf99a2ab25bf0a4dea66a16d45c36d Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Wed, 16 Sep 2026 09:34:02 -0400 Subject: [PATCH 01/12] refactor api reference docspace --- .../custom-matter-device.md | 127 +----------- .../air-quality-sensor-app.md | 16 ++ sld295-matter-api-reference/attributes.md | 44 ---- .../base-platform-app.md | 17 ++ sld295-matter-api-reference/closure-app.md | 40 ++++ .../cluster-implementation.md | 7 - sld295-matter-api-reference/cluster.md | 16 -- sld295-matter-api-reference/commands.md | 11 - sld295-matter-api-reference/datamodeltypes.md | 15 -- sld295-matter-api-reference/event.md | 13 -- sld295-matter-api-reference/evse-app.md | 14 ++ .../fan-control-app.md | 20 ++ sld295-matter-api-reference/index.md | 188 ++++++++++++++++-- .../light-switch-app.md | 17 ++ sld295-matter-api-reference/lighting-app.md | 18 ++ sld295-matter-api-reference/lock-app.md | 35 ++++ .../multi-sensor-app.md | 20 ++ sld295-matter-api-reference/onoff-plug-app.md | 15 ++ sld295-matter-api-reference/oven-app.md | 25 +++ sld295-matter-api-reference/rangehood-app.md | 16 ++ .../refrigerator-app.md | 21 ++ sld295-matter-api-reference/thermostat-app.md | 19 ++ sld57-matter-landing-page/index.md | 2 +- .../matter-application-cluster-logic.md | 4 +- .../matter-event-timer-guide.md | 2 +- .../matter-scenes-quick-start-guide.md | 2 +- 26 files changed, 475 insertions(+), 249 deletions(-) create mode 100644 sld295-matter-api-reference/air-quality-sensor-app.md delete mode 100644 sld295-matter-api-reference/attributes.md create mode 100644 sld295-matter-api-reference/base-platform-app.md create mode 100644 sld295-matter-api-reference/closure-app.md delete mode 100644 sld295-matter-api-reference/cluster-implementation.md delete mode 100644 sld295-matter-api-reference/cluster.md delete mode 100644 sld295-matter-api-reference/commands.md delete mode 100644 sld295-matter-api-reference/datamodeltypes.md delete mode 100644 sld295-matter-api-reference/event.md create mode 100644 sld295-matter-api-reference/evse-app.md create mode 100644 sld295-matter-api-reference/fan-control-app.md create mode 100644 sld295-matter-api-reference/light-switch-app.md create mode 100644 sld295-matter-api-reference/lighting-app.md create mode 100644 sld295-matter-api-reference/lock-app.md create mode 100644 sld295-matter-api-reference/multi-sensor-app.md create mode 100644 sld295-matter-api-reference/onoff-plug-app.md create mode 100644 sld295-matter-api-reference/oven-app.md create mode 100644 sld295-matter-api-reference/rangehood-app.md create mode 100644 sld295-matter-api-reference/refrigerator-app.md create mode 100644 sld295-matter-api-reference/thermostat-app.md diff --git a/sld250-matter-references/custom-matter-device.md b/sld250-matter-references/custom-matter-device.md index e6cc8be..81b915e 100644 --- a/sld250-matter-references/custom-matter-device.md +++ b/sld250-matter-references/custom-matter-device.md @@ -9,128 +9,7 @@ using Matter. ## Extending Base App Implementation -### CustomerAppTask - -To customize app behavior, override any Silicon Labs implemented API in `CustomerAppTask`. This example provides `CustomerAppTask.h` and `CustomerAppTask.cpp` for that purpose. The build system generates the base implementation and the complete set of overridable `*Impl()` APIs in `autogen/AppTask.cpp` and `autogen/AppTaskImpl.h`. Any `*Impl()` methods that you do not override use the Silicon Labs default implementation. -### How to Override APIs - -`CustomerAppTask` extends the base `AppTask` by using the Curiously Recurring Template Pattern (CRTP). The base class declares one `*Impl()` method for each overridable API. Override only the `*Impl()` methods that you need. To override a `*Impl()` method: - -1. Find the method to override in the base API. For more information, see [Override API reference](#override-api-reference). -2. Declare the same method signature in `CustomerAppTask.h` under the `private:` section. Match the base `*Impl()` signature exactly. - > **NOTE:** - > `*Impl()` overrides are non-static instance methods, even when the corresponding public dispatcher (for example, `ButtonEventHandler`) is static. -3. Implement the method in `CustomerAppTask.cpp`. -4. Build the project. If you implement the corresponding `*Impl()` method in `CustomerAppTask`, your implementation is used. Otherwise, the Silicon Labs default implementation is used. You only need to implement the methods that you want to customize. All other methods automatically use the default implementation. - -### DataModelCallbacks and CustomerAppTask - -What used to live in `DataModelCallbacks.cpp` before Matter Extension 2.9.1 now lives in `AppTask.cpp`. The -Matter SDK's `MatterPostAttributeChangeCallback` is implemented in -`examples/platform/silabs/BaseApplication.cpp` and forwards to -`AppTask::DMPostAttributeChangeCallback` (defined in `AppTask.cpp`), which you -can customize via `DMPostAttributeChangeCallbackImpl()` in `CustomerAppTask`. - -Forwarding into `AppTask` still goes through CRTP as in -[How to Override APIs](#how-to-override-apis). - -- **Methods that already exist in the AppTask** — Customize them by overriding - the matching `*Impl()` method in `CustomerAppTask`. Do not edit the - `AppTask.cpp` for app-specific behavior. - -- **New custom data model methods** — Add them in `CustomerAppTask` directly. - Do not add new application logic in autogenerated sources; those edits will - not survive regeneration or project upgrades. - -### Sample Implementation - -The following shows a minimal example `CustomerAppTask` that overrides `AppInitImpl()` and `ButtonEventHandlerImpl()` from -the lighting app implementation. - -**CustomerAppTask.h** - -```cpp -#pragma once -#include "AppTaskImpl.h" - -/** - * Minimal AppTaskImpl-derived class. Override only the *Impl() methods you need; - * add AppInitImpl(), GetAppTask(), and sAppTask as required by the CRTP base. - */ -class CustomerAppTask : public AppTaskImpl -{ -public: - static CustomerAppTask & GetAppTask() { return sAppTask; } - -private: - friend class AppTaskImpl; - CHIP_ERROR AppInitImpl(); - void ButtonEventHandlerImpl(uint8_t button, uint8_t btnAction); - static CustomerAppTask sAppTask; -}; -``` - -**CustomerAppTask.cpp** - -```cpp -#include "CustomerAppTask.h" -#include "AppTask.h" -#include "AppConfig.h" -#include "AppEvent.h" -#include -#include - -using namespace ::chip::DeviceLayer::Silabs; - -#define APP_FUNCTION_BUTTON 0 -#define APP_LIGHT_SWITCH 1 - -CustomerAppTask CustomerAppTask::sAppTask; - -AppTask & AppTask::GetAppTask() -{ - return CustomerAppTask::GetAppTask(); -} - -CHIP_ERROR CustomerAppTask::AppInitImpl() -{ - SILABS_LOG("CustomerAppTask: custom implementation (AppInitImpl)"); - CHIP_ERROR err = this->AppTask::AppInit(); - if (err == CHIP_NO_ERROR) - { - // Override the SDK default button handler registered in AppTask::AppInit(). - chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(CustomerAppTask::ButtonEventHandler); - } - return err; -} - -void CustomerAppTask::ButtonEventHandlerImpl(uint8_t button, uint8_t btnAction) -{ - SILABS_LOG("CustomerAppTask: custom implementation (ButtonEventHandlerImpl)"); - AppEvent button_event = {}; - button_event.Type = AppEvent::kEventType_Button; - button_event.ButtonEvent.Action = btnAction; - if (button == APP_LIGHT_SWITCH && btnAction == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) - { - button_event.Handler = LightActionEventHandler; - AppTask::GetAppTask().PostEvent(&button_event); - } - else if (button == APP_FUNCTION_BUTTON) - { - button_event.Handler = BaseApplication::ButtonHandler; - AppTask::GetAppTask().PostEvent(&button_event); - } -} -``` - -### Override API Reference - -The base API and implementation are generated into the `autogen/` directory. These files are regenerated whenever you upgrade the project and match the installed SDK version. Use them as a reference for overridable methods and app configuration. - -| File | Purpose | -|------|--------| -| `autogen/AppTaskImpl.h` | Declarations of every overridable `*Impl()` method. Copy the signatures you need from here into `CustomerAppTask.h`. | -| `autogen/AppTask.cpp` | Silicon Labs provides the default `AppTask` implementation. Any `*Impl()` methods that you don't override use this implementation. Use it as a reference when customizing app behavior. | +To customize app behavior through the overridable APIs exposed by each app, see [Matter API Reference](/matter/{build-docspace-version}/matter-api-reference/). ## Using Matter with Clusters @@ -186,7 +65,7 @@ through this function. The command can then be dissected using conditional logic to call the proper application functions based on the most recent command received. -Attribute changes route through `CustomerAppTask` and `DMPostAttributeChangeCallbackImpl()`. For more information, see [Extending Base App Implementation](#extending-base-app-implementation). +Attribute changes route through `CustomerAppTask` and `DMPostAttributeChangeCallbackImpl()`. For more information, see [Matter API Reference](/matter/{build-docspace-version}/matter-api-reference/). ## Adding a Cluster to a ZAP Configuration @@ -257,5 +136,3 @@ In order to use a custom cluster in an application, follow these steps: ``` For an example, see [Sample ZAP file](https://github.com/SiliconLabsSoftware/matter_extension/blob/v2.9.1/slc/apps/performance_test_app/thread/performance-test-app.zap) - Install the **Custom ZAP generation** component under **Silicon Labs Matter -> Stack** in the project's Component Editor. - - diff --git a/sld295-matter-api-reference/air-quality-sensor-app.md b/sld295-matter-api-reference/air-quality-sensor-app.md new file mode 100644 index 0000000..99408a2 --- /dev/null +++ b/sld295-matter-api-reference/air-quality-sensor-app.md @@ -0,0 +1,16 @@ +# Air Quality Sensor application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, set the LCD UI, and initialize the air quality sensor. | +| `InitAirQualitySensorImpl` | `InitAirQualitySensor` | Create the periodic sensor timer, initialize hardware when present, and start sampling. | +| `GetAirQualityValueImpl` | `GetAirQualityValue` | Read the onboard air quality sensor, or a simulated value if none is present. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events to the base application handler. | +| `SensorTimerEventHandlerImpl` | `SensorTimerEventHandler` | Read the sensor and schedule an Air Quality attribute update. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Log Identify attribute changes. | diff --git a/sld295-matter-api-reference/attributes.md b/sld295-matter-api-reference/attributes.md deleted file mode 100644 index 8535535..0000000 --- a/sld295-matter-api-reference/attributes.md +++ /dev/null @@ -1,44 +0,0 @@ -# Attribute - -Attributes represent the current state of a device. For instance if the device is on or off, the current temperature, or the current level of a dimmer. Attributes are defined in the cluster specification. - -## Attribute Changes - -When a ZCL attribute is updated in the data model, the framework invokes the post-attribute-change path. The Silicon Labs Matter stack routes this as follows: `MatterPostAttributeChangeCallback` in `BaseApplication.cpp` → `AppTask::DMPostAttributeChangeCallback` in `autogen/AppTask.cpp` → your optional `DMPostAttributeChangeCallbackImpl()` override in `CustomerAppTask`. - -For more information, see [Extending Base App Implementation](/matter/{build-docspace-version}/matter-references/custom-matter-device/#extending-base-app-implementation). - -If this callback is implemented by the device, it is informed of the attribute change. The device may react to the attribute change. For example, in `DMPostAttributeChangeCallback` function the in `AppTask.cpp` file ([onoff-plug-app/src](https://github.com/SiliconLabsSoftware/matter_sdk/blob/main/examples/onoff-plug-app/silabs/src/AppTask.cpp)), if you want to add a custom handler code to control an RGB LED when on/off attribute in the `On-Off` Cluster changes, implement the following in `DMPostAttributeChangeCallbackImpl` in `src/CustomerAppTask.cpp`: - -```cpp -void DMPostAttributeChangeCallbackImpl(const chip::app::ConcreteAttributePath & attributePath, - uint8_t type, - uint16_t size, - uint8_t * value) -{ - ClusterId clusterId = attributePath.mClusterId; - AttributeId attributeId = attributePath.mAttributeId; - ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - - if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id) - { - if (*value) - { // turn on LED - sl_led_turn_on((sl_led_t *)&sl_simple_rgb_pwm_led_rgb_led0); - } - else - {// turn off LED - sl_led_turn_off((sl_led_t *)&sl_simple_rgb_pwm_led_rgb_led0); - } - /* ----------- */ - } - - //... -} -``` - -## Header File - -This file contains the high level namespaces and constant definitions for Attributes. In Simplicity Studio, this will be generated in the autogen/zap-generated/ folder of the matter project. - -- [Attribute](https://github.com/SiliconLabs/matter_extension/blob/main/third_party/matter_sdk/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h) diff --git a/sld295-matter-api-reference/base-platform-app.md b/sld295-matter-api-reference/base-platform-app.md new file mode 100644 index 0000000..aa60774 --- /dev/null +++ b/sld295-matter-api-reference/base-platform-app.md @@ -0,0 +1,17 @@ +# Base Platform application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize the LED, and show the demo UI or QR code when enabled. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route user action button events to `ApplicationEventHandler` and function button events to the base application handler. | +| `ApplicationEventHandlerImpl` | `ApplicationEventHandler` | Toggle the LED for a user action button press. | +| `OnEnterActiveModeImpl` | `OnEnterActiveMode` | Update the demo UI when the ICD server enters active mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | +| `OnEnterIdleModeImpl` | `OnEnterIdleMode` | Update the demo UI when the ICD server enters idle mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | +| `OnTransitionToIdleImpl` | `OnTransitionToIdle` | Log the transition while the ICD server moves to idle mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | +| `OnICDModeChangeImpl` | `OnICDModeChange` | Log the change between SIT and LIT operating modes. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | diff --git a/sld295-matter-api-reference/closure-app.md b/sld295-matter-api-reference/closure-app.md new file mode 100644 index 0000000..b637ee0 --- /dev/null +++ b/sld295-matter-api-reference/closure-app.md @@ -0,0 +1,40 @@ +# Closure application override APIs + +Override each `AppTask` hook below by declaring the `*Impl()` method in +`CustomerAppTask.h` and implementing it in `CustomerAppTask.cpp`. Match the +signature in `autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize the display, and initialize Closure Manager. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route closure button presses to `ClosureButtonActionEventHandler` and function button events to the base application handler. | +| `ClosureButtonActionEventHandlerImpl` | `ClosureButtonActionEventHandler` | Stop motion if a closure action is in progress, otherwise start a MoveTo toward the opposite position. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Log Identify attribute changes. | +| `DMClosureControlClusterAttributeChangedCallbackImpl` | `DMClosureControlClusterAttributeChangedCallback` | Refresh the UI when Closure Control `MainState` or `OverallCurrentState` changes. | +| `DMClosureDimensionClusterAttributeChangedCallbackImpl` | `DMClosureDimensionClusterAttributeChangedCallback` | Log Closure Dimension attribute changes. | + +## ClosureManager + +These APIs use the Closure app's separate manager override chain. Declare and +implement the corresponding `*Impl()` methods in `CustomerAppManager`, which +derives from `ClosureManagerImpl`. Use +`autogen/ClosureManagerImpl.h` for exact signatures. Do not place these +overrides in `CustomerAppTask`. + +| Override | Public API | Default behavior | +|---|---|---| +| `InitImpl` | `Init` | Initialize the closure timer, closure endpoints, and panel endpoints. | +| `OnCalibrateCommandImpl` | `OnCalibrateCommand` | Validate and start an asynchronous closure calibration. | +| `OnMoveToCommandImpl` | `OnMoveToCommand` | Validate a MoveTo command and set overall panel targets. | +| `OnStopCommandImpl` | `OnStopCommand` | Stop the active closure operation and complete the stop action. | +| `OnSetTargetCommandImpl` | `OnSetTargetCommand` | Validate a SetTarget command and set the selected panel target. | +| `OnStepCommandImpl` | `OnStepCommand` | Validate a Step command and set the selected panel step target. | +| `HandleClosureActionCompleteImpl` | `HandleClosureActionComplete` | Finalize a completed calibrate, stop, move, or unlatch action. | +| `HandleClosureMotionActionImpl` | `HandleClosureMotionAction` | Advance closure panels toward their target positions. | +| `HandleClosureUnlatchActionImpl` | `HandleClosureUnlatchAction` | Update closure and panel states for an unlatch action. | +| `GetPanelNextPositionImpl` | `GetPanelNextPosition` | Calculate the next position between a panel's current and target positions. | +| `HandlePanelSetTargetActionImpl` | `HandlePanelSetTargetAction` | Advance one panel toward a SetTarget position. | +| `HandlePanelUnlatchActionImpl` | `HandlePanelUnlatchAction` | Update one panel for an unlatch action. | +| `HandlePanelStepActionImpl` | `HandlePanelStepAction` | Apply a Step action to one panel. | diff --git a/sld295-matter-api-reference/cluster-implementation.md b/sld295-matter-api-reference/cluster-implementation.md deleted file mode 100644 index 3ef31f5..0000000 --- a/sld295-matter-api-reference/cluster-implementation.md +++ /dev/null @@ -1,7 +0,0 @@ -# Cluster Implementation on Matter Core - -This has the high level implementation of all the clusters present in Matter. - -## References - -[Cluster Implementation](https://github.com/SiliconLabs/matter_extension/tree/main/third_party/matter_sdk/src/app/clusters) diff --git a/sld295-matter-api-reference/cluster.md b/sld295-matter-api-reference/cluster.md deleted file mode 100644 index b7747aa..0000000 --- a/sld295-matter-api-reference/cluster.md +++ /dev/null @@ -1,16 +0,0 @@ -# Cluster - -Each Cluster is either a Client, Server, or both​. A Cluster is a collection of Attributes and Commands that are logically related. - -- Client: Stateless. Interacts with a server cluster by Reading, Writing, or Subscribing to an attribute​ -- Server: Holds the State of Data or Attribute - -Clusters contain: Attributes, Events, Commands​. - -For more details see: [Matter Data Model](../sld288-matter-fundamentals-data-model/index.md). - -## Header File - -The header file below contains namespaces and IDs of Clusters. In Simplicity Studio, this will be generated in the autogen/zap-generated/ folder of the matter project. - -- [Cluster](https://github.com/project-chip/connectedhomeip/blob/master/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h) \ No newline at end of file diff --git a/sld295-matter-api-reference/commands.md b/sld295-matter-api-reference/commands.md deleted file mode 100644 index 247c5b4..0000000 --- a/sld295-matter-api-reference/commands.md +++ /dev/null @@ -1,11 +0,0 @@ -# Commands - -Commmands are used to invoke a particular action. For instance an endpoint with the Doorlock client cluster can send an 'Invoke UnlockDoor' command to the Doorlock server to ask it to change the "LockState" attribute to unlocked. When validated and processed by the Doorlock server, this will then Unlock the door. - -## Header File - -This file contains the high level namespaces and constant definitions for Commands. In Simplicity Studio, this will be generated in the autogen/zap-generated/ folder of the matter project. - -- [Commands](https://github.com/SiliconLabs/matter_extension/blob/main/third_party/matter_sdk/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h) - -The folder [```src/app```](https://github.com/SiliconLabs/matter_extension/tree/main/third_party/matter_sdk/src/app) contains several files related to the implementation of commands including interfaces, senders and handlers. diff --git a/sld295-matter-api-reference/datamodeltypes.md b/sld295-matter-api-reference/datamodeltypes.md deleted file mode 100644 index 43008cd..0000000 --- a/sld295-matter-api-reference/datamodeltypes.md +++ /dev/null @@ -1,15 +0,0 @@ -# Data Models - -The Data Model defines namespaces for endpoints, clusters, and attributes in the application. From a developer standpoint, this is handled by the ZAP tool. For Multi-Fabric devices, the data model is shared between the Fabrics. - -For a review of what the Matter Data Model is and how it is used, see the [Matter Data Model](../sld288-matter-fundamentals-data-model/index.md). - -## APIs - -The directory [```/src/app/util```](https://github.com/SiliconLabs/matter_extension/tree/main/third_party/matter_sdk/src/app/util) contains various utilities and some of the external API headers for interacting with the data model layer. In particular, the various data type definitions and the public APIs to the data model are declared in the headers here. - -## Header File - -This file contains definitions and constants for various data types and identifiers used in Matter. - -- [DataModelTypes](https://github.com/SiliconLabs/matter_extension/blob/main/third_party/matter_sdk/src/lib/core/DataModelTypes.h) diff --git a/sld295-matter-api-reference/event.md b/sld295-matter-api-reference/event.md deleted file mode 100644 index d2996b9..0000000 --- a/sld295-matter-api-reference/event.md +++ /dev/null @@ -1,13 +0,0 @@ -# Event - -Events are records of past state transitions such as a light device's on-off attribute changing from on to off. - -The autogenerated file [```include/AppEvent.h```](https://github.com/SiliconLabs/matter_extension/blob/main/third_party/matter_sdk/examples/template/silabs/include/AppEvent.h) contains the definition of the event object used by the application. It includes the event types, the structures for each event, and event handler. - -Custom event posting and handlers are overridden in the `CustomerAppTask` file, not in `autogen/AppTask.cpp`. - -## Header File - -This file contains the high level namespaces and constant definitions for Events. In Simplicity Studio, this will be generated in the autogen/zap-generated/ folder of the matter project. - -- [Event](https://github.com/SiliconLabs/matter_extension/blob/main/third_party/matter_sdk/zzz_generated/app-common/app-common/zap-generated/ids/Events.h) diff --git a/sld295-matter-api-reference/evse-app.md b/sld295-matter-api-reference/evse-app.md new file mode 100644 index 0000000..32d856f --- /dev/null +++ b/sld295-matter-api-reference/evse-app.md @@ -0,0 +1,14 @@ +# EVSE application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, run `ApplicationInit`, and register EVSE test event triggers when enabled. | +| `ApplicationInitImpl` | `ApplicationInit` | Initialize the EVSE application and energy management LED. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route EVSE control button presses to `EnergyManagementActionEventHandler` and function button events to the base application handler. | +| `EnergyManagementActionEventHandlerImpl` | `EnergyManagementActionEventHandler` | Log the control button event. The default does not start a charging action. | diff --git a/sld295-matter-api-reference/fan-control-app.md b/sld295-matter-api-reference/fan-control-app.md new file mode 100644 index 0000000..9ed25c7 --- /dev/null +++ b/sld295-matter-api-reference/fan-control-app.md @@ -0,0 +1,20 @@ +# Fan Control application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize fan control, and update the display. | +| `InitFanControlImpl` | `InitFanControl` | Install Fan Control delegates, initialize the LED, and apply the initial attribute state. | +| `HandleStepImpl` | `HandleStep` | Handle a Fan Control Step command by updating speed or percentage settings. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events to the base application handler. | +| `FanUiUpdateEventHandlerImpl` | `FanUiUpdateEventHandler` | Update the fan LED and, when enabled, the display. | +| `HandleFanModeChangeImpl` | `HandleFanModeChange` | Synchronize speed and percentage settings after a FanMode change. | +| `DeriveFanModeFromPercentImpl` | `DeriveFanModeFromPercent` | Map PercentSetting to Off, Low, Medium, or High fan mode. | +| `HandlePercentSettingChangeImpl` | `HandlePercentSettingChange` | Update PercentCurrent after PercentSetting changes. | +| `HandleSpeedSettingChangeImpl` | `HandleSpeedSettingChange` | Update SpeedCurrent after SpeedSetting changes. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Apply Fan Control PercentSetting, SpeedSetting, and FanMode changes, and log Identify changes. | diff --git a/sld295-matter-api-reference/index.md b/sld295-matter-api-reference/index.md index a3d6fde..76cc4d8 100644 --- a/sld295-matter-api-reference/index.md +++ b/sld295-matter-api-reference/index.md @@ -1,24 +1,186 @@ # Matter API Reference -This section covers the various Application Programming Interfaces (APIs) that a developer might use when developing a new Matter Application. +Use this reference to find the application customization APIs available in a +Silicon Labs Matter application. The available APIs depend on the application +and its configuration. -- [**DataModel**](./datamodeltypes.md) -- [**Attributes**](./attributes.md) -- [**Clusters**](./cluster.md) -- [**Commands**](./commands.md) -- [**Events**](./event.md) -- [**Cluster Implementation**](./cluster-implementation.md) +Most APIs below are exposed through the generated `AppTask` interface. To +customize those APIs, derive `CustomerAppTask` from the generated implementation +and override the corresponding `*Impl()` hook. The Closure app also exposes +`ClosureManager` APIs through a separate `CustomerAppManager` override chain. +See [Extending Base App Implementation](#extending-base-app-implementation) for +the implementation workflow. -## Application APIs +Use `autogen/AppTaskImpl.h` in your project for the complete `AppTask` signatures. +For Closure Manager APIs, use `autogen/ClosureManagerImpl.h`. The app-specific +pages list each `*Impl()` override, its public API name, and the default behavior. -For information about customizing app behavior with `CustomerAppTask`, see [Extending Base App Implementation](/matter/{build-docspace-version}/matter-references/custom-matter-device/#extending-base-app-implementation). +## Extending Base App Implementation -### Initialization +### CustomerAppTask -Default initialization is included in `autogen/AppTask.cpp`. Override `AppInitImpl()` and other `*Impl()` hooks in `src/CustomerAppTask.cpp` to customize behavior. +To customize `AppTask` behavior, override the relevant Silicon Labs implemented +APIs in `CustomerAppTask`. The build system generates the base implementation +and the complete set of overridable `AppTask` `*Impl()` APIs in +`autogen/AppTask.cpp` and `autogen/AppTaskImpl.h`. Any `*Impl()` methods that you +do not override use the Silicon Labs default implementation. + +### How to Override APIs + +`CustomerAppTask` extends the base `AppTask` by using the Curiously Recurring +Template Pattern (CRTP). The base class declares one `*Impl()` method for each +overridable API. Override only the `*Impl()` methods that you need. To override +a `*Impl()` method: + +1. Find the `*Impl()` override in the app-specific reference. Copy that name, + not the public API name. +2. Declare the same method signature in `CustomerAppTask.h` under the `private:` + section. Match the base `*Impl()` signature exactly. +3. Implement the method in `CustomerAppTask.cpp`. +4. Build the project. If you implement the corresponding `*Impl()` method in + `CustomerAppTask`, your implementation is used. Otherwise, the Silicon Labs + default implementation is used. You only need to implement the methods that + you want to customize. All other methods automatically use the default + implementation. + +### ClosureManager and CustomerAppManager + +The Closure app has a second CRTP override chain for its `ClosureManager` APIs. +`CustomerAppManager` derives from `ClosureManagerImpl`. +Declare and implement `ClosureManager` `*Impl()` overrides in +`CustomerAppManager`, not in `CustomerAppTask`. + +Use `autogen/ClosureManagerImpl.h` for the complete signatures. Methods that you +do not override in `CustomerAppManager` use the Silicon Labs default `ClosureManager` +implementation. + +### DataModelCallbacks and CustomerAppTask + +What used to live in `DataModelCallbacks.cpp` before Matter Extension 2.9.1 +now lives in `AppTask.cpp`. The Matter SDK's +`MatterPostAttributeChangeCallback` is implemented in +`examples/platform/silabs/BaseApplication.cpp` and forwards to +`AppTask::DMPostAttributeChangeCallback` (defined in `AppTask.cpp`), which you +can customize via `DMPostAttributeChangeCallbackImpl()` in `CustomerAppTask`. + +Forwarding into `AppTask` still goes through CRTP as described in +[How to Override APIs](#how-to-override-apis). + +- **Methods that already exist in the AppTask** — Customize them by overriding + the matching `*Impl()` method in `CustomerAppTask`. Do not edit the + `AppTask.cpp` for app-specific behavior. + +- **New custom data model methods** — Add them in `CustomerAppTask` directly. + Do not add new application logic in autogenerated sources; those edits will + not survive regeneration or project upgrades. + +### Sample Implementation + +The following shows a minimal example `CustomerAppTask` that overrides +`AppInitImpl()` and `ButtonEventHandlerImpl()` from the lighting app +implementation. + +**CustomerAppTask.h** ```cpp -CHIP_ERROR AppTask::Init() +#pragma once +#include "AppTaskImpl.h" + +/** + * Minimal AppTaskImpl-derived class. Override only the *Impl() methods you need; + * add AppInitImpl(), GetAppTask(), and sAppTask as required by the CRTP base. + */ +class CustomerAppTask : public AppTaskImpl +{ +public: + static CustomerAppTask & GetAppTask() { return sAppTask; } + +private: + friend class AppTaskImpl; + CHIP_ERROR AppInitImpl(); + void ButtonEventHandlerImpl(uint8_t button, uint8_t btnAction); + static CustomerAppTask sAppTask; +}; +``` + +**CustomerAppTask.cpp** + +```cpp +#include "CustomerAppTask.h" +#include "AppTask.h" +#include "AppConfig.h" +#include "AppEvent.h" +#include +#include + +using namespace ::chip::DeviceLayer::Silabs; + +#define APP_FUNCTION_BUTTON 0 +#define APP_LIGHT_SWITCH 1 + +CustomerAppTask CustomerAppTask::sAppTask; + +AppTask & AppTask::GetAppTask() +{ + return CustomerAppTask::GetAppTask(); +} + +CHIP_ERROR CustomerAppTask::AppInitImpl() +{ + SILABS_LOG("CustomerAppTask: custom implementation (AppInitImpl)"); + CHIP_ERROR err = this->AppTask::AppInit(); + if (err == CHIP_NO_ERROR) + { + // Override the SDK default button handler registered in AppTask::AppInit(). + chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(CustomerAppTask::ButtonEventHandler); + } + return err; +} + +void CustomerAppTask::ButtonEventHandlerImpl(uint8_t button, uint8_t btnAction) +{ + SILABS_LOG("CustomerAppTask: custom implementation (ButtonEventHandlerImpl)"); + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.Action = btnAction; + if (button == APP_LIGHT_SWITCH && btnAction == static_cast(SilabsPlatform::ButtonAction::ButtonPressed)) + { + button_event.Handler = LightActionEventHandler; + AppTask::GetAppTask().PostEvent(&button_event); + } + else if (button == APP_FUNCTION_BUTTON) + { + button_event.Handler = BaseApplication::ButtonHandler; + AppTask::GetAppTask().PostEvent(&button_event); + } +} ``` -The `AppTask.cpp` file may also contain event handlers and helper code useful to the application. +### Override API Reference + +The base API and implementation are generated into the `autogen/` directory. +These files are regenerated whenever you upgrade the project and match the +installed SDK version. Use them as a reference for overridable methods and app +configuration. The app-specific pages below list each `*Impl()` override, its +public API, and the default behavior. + +| File | Purpose | +|------|--------| +| `autogen/AppTaskImpl.h` | Declarations of every overridable `*Impl()` method. Copy the signatures you need from here into `CustomerAppTask.h`. | +| `autogen/AppTask.cpp` | Silicon Labs provides the default `AppTask` implementation. Any `*Impl()` methods that you don't override use this implementation. Use it as a reference when customizing app behavior. | +| `autogen/ClosureManagerImpl.h` | Closure app only. Declarations of overridable `ClosureManager` `*Impl()` methods. Copy the signatures you need from here into `CustomerAppManager.h`. | + +- [Air Quality Sensor](./air-quality-sensor-app.md) +- [Base Platform](./base-platform-app.md) +- [Closure](./closure-app.md) +- [EVSE](./evse-app.md) +- [Fan Control](./fan-control-app.md) +- [Light Switch](./light-switch-app.md) +- [Lighting](./lighting-app.md) +- [Lock](./lock-app.md) +- [Multi-Sensor](./multi-sensor-app.md) +- [On/Off Plug](./onoff-plug-app.md) +- [Oven](./oven-app.md) +- [Rangehood](./rangehood-app.md) +- [Refrigerator](./refrigerator-app.md) +- [Thermostat](./thermostat-app.md) diff --git a/sld295-matter-api-reference/light-switch-app.md b/sld295-matter-api-reference/light-switch-app.md new file mode 100644 index 0000000..359a78b --- /dev/null +++ b/sld295-matter-api-reference/light-switch-app.md @@ -0,0 +1,17 @@ +# Light Switch application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize the light switch endpoints, and create the level control long press timer. | +| `InitLightSwitchImpl` | `InitLightSwitch` | Set the light switch and generic switch endpoints and schedule Binding Manager initialization. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Convert hardware button activity into application button events. | +| `AppEventHandlerImpl` | `AppEventHandler` | Translate application button events into On/Off and Level Control binding actions. | +| `InitBindingHandlerImpl` | `InitBindingHandler` | Initialize the Binding Manager and register its command and context release handlers. | +| `LightSwitchChangedHandlerImpl` | `LightSwitchChangedHandler` | Send a pending On/Off or Level Control command through a matching bound peer or group. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Log Identify attribute changes. | diff --git a/sld295-matter-api-reference/lighting-app.md b/sld295-matter-api-reference/lighting-app.md new file mode 100644 index 0000000..1506794 --- /dev/null +++ b/sld295-matter-api-reference/lighting-app.md @@ -0,0 +1,18 @@ +# Lighting application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize the light, LED, and display. | +| `InitLightImpl` | `InitLight` | Create the off effect timer and load OnOff (and RGB color attributes when enabled) from cluster state. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route light action and function button events. | +| `OnTriggerOffWithEffectImpl` | `OnTriggerOffWithEffect` | Select and start the timer for an OffWithEffect command. | +| `LightActionEventHandlerImpl` | `LightActionEventHandler` | Toggle the light for a button event and synchronize the OnOff attribute. | +| `LightTimerEventHandlerImpl` | `LightTimerEventHandler` | Post the event that completes an off effect. | +| `LightControlEventHandlerImpl` | `LightControlEventHandler` | Apply level and color control events to the RGB LED. Available when `SL_MATTER_RGB_LED_ENABLED` is enabled. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Route OnOff, Level Control, Color Control, and Identify attribute changes. | diff --git a/sld295-matter-api-reference/lock-app.md b/sld295-matter-api-reference/lock-app.md new file mode 100644 index 0000000..04756a5 --- /dev/null +++ b/sld295-matter-api-reference/lock-app.md @@ -0,0 +1,35 @@ +# Lock application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize the lock, and sync the Door Lock cluster state. | +| `InitLockImpl` | `InitLock` | Initialize lock state, credential storage, actuator timers, and the Door Lock server. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route lock action and function button events. | +| `LockButtonActionHandlerImpl` | `LockButtonActionHandler` | Convert a lock button press into a lock or unlock action. | +| `UnlatchCallbackImpl` | `UnlatchCallback` | Schedule the transition from the unlatched state to the unlocked state when the unlatch timer expires. | +| `ActuatorMovementEventHandlerImpl` | `ActuatorMovementEventHandler` | Complete actuator motion, update the Door Lock state, and process a pending request. | +| `LockActionEventHandlerImpl` | `LockActionEventHandler` | Start the lock, unlock, or unlatch action carried by an application event. | +| `LockRequestEventHandlerImpl` | `LockRequestEventHandler` | Drain a staged Door Lock request and pass it to the application task. | +| `HandleLockRequestOnAppTaskImpl` | `HandleLockRequestOnAppTask` | Queue, complete, or start a Door Lock request according to actuator state. | +| `UnlockAfterUnlatchImpl` | `UnlockAfterUnlatch` | Change an unlatched lock to unlocked and stage the unlock request. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Respond to Door Lock `LockState` attribute changes. | +| `DMDoorLockOnDoorLockCommandImpl` | `DMDoorLockOnDoorLockCommand` | Validate a Lock command and stage a request for the locked state. | +| `DMDoorLockOnDoorUnlockCommandImpl` | `DMDoorLockOnDoorUnlockCommand` | Validate an Unlock command and stage an unlock or unlatch request, depending on Unbolt support. | +| `DMDoorLockOnDoorUnboltCommandImpl` | `DMDoorLockOnDoorUnboltCommand` | Validate an Unbolt command and stage a request for the unlocked state. | +| `DMDoorLockGetCredentialImpl` | `DMDoorLockGetCredential` | Retrieve credential data for the Door Lock server. | +| `DMDoorLockSetCredentialImpl` | `DMDoorLockSetCredential` | Persist credential data for the Door Lock server. | +| `DMDoorLockGetUserImpl` | `DMDoorLockGetUser` | Retrieve user data for the Door Lock server. | +| `DMDoorLockSetUserImpl` | `DMDoorLockSetUser` | Persist user data for the Door Lock server. | +| `DMDoorLockGetWeekDayScheduleImpl` | `DMDoorLockGetWeekDaySchedule` | Retrieve a user's weekday schedule. | +| `DMDoorLockSetWeekDayScheduleImpl` | `DMDoorLockSetWeekDaySchedule` | Persist a user's weekday schedule. | +| `DMDoorLockGetYearDayScheduleImpl` | `DMDoorLockGetYearDaySchedule` | Retrieve a user's year day schedule. | +| `DMDoorLockSetYearDayScheduleImpl` | `DMDoorLockSetYearDaySchedule` | Persist a user's year day schedule. | +| `DMDoorLockGetHolidayScheduleImpl` | `DMDoorLockGetHolidaySchedule` | Retrieve a holiday schedule. | +| `DMDoorLockSetHolidayScheduleImpl` | `DMDoorLockSetHolidaySchedule` | Persist a holiday schedule. | +| `DMDoorLockOnAutoRelockImpl` | `DMDoorLockOnAutoRelock` | Start a lock action when automatic relocking occurs. | diff --git a/sld295-matter-api-reference/multi-sensor-app.md b/sld295-matter-api-reference/multi-sensor-app.md new file mode 100644 index 0000000..ff9e949 --- /dev/null +++ b/sld295-matter-api-reference/multi-sensor-app.md @@ -0,0 +1,20 @@ +# Multi Sensor application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize the occupancy LED and display, and start the sensor manager. | +| `InitSensorManagerImpl` | `InitSensorManager` | Initialize sensor clusters, register the attribute listener, and schedule periodic sampling. | +| `GetTemperatureAndHumidityImpl` | `GetTemperatureAndHumidity` | Read the Si70xx sensor when present, otherwise supply simulated temperature and humidity values. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events and occupancy toggle button events. | +| `ProcessButtonEventImpl` | `ProcessButtonEvent` | Toggle the Occupancy attribute for an application button event. | +| `TriggerSensorActionImpl` | `TriggerSensorAction` | Sample temperature and humidity and update their measured value attributes. | +| `OccupancyAttributeUpdateEventImpl` | `OccupancyAttributeUpdateEvent` | Update the occupancy LED and display after an Occupancy change. | +| `SensorAttributeUpdateEventImpl` | `SensorAttributeUpdateEvent` | Update the display after a temperature or humidity change. | +| `OnAttributeChangedImpl` | `OnAttributeChanged` | Translate Occupancy, Temperature Measurement, and Relative Humidity Measurement changes into application events. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Log Identify attribute changes. | diff --git a/sld295-matter-api-reference/onoff-plug-app.md b/sld295-matter-api-reference/onoff-plug-app.md new file mode 100644 index 0000000..f7ec9bc --- /dev/null +++ b/sld295-matter-api-reference/onoff-plug-app.md @@ -0,0 +1,15 @@ +# On/Off Plug application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize the plug, LED, and display. | +| `InitPlugImpl` | `InitPlug` | Read the OnOff attribute into the plug on/off state. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route plug action and function button events. | +| `OnOffActionEventHandlerImpl` | `OnOffActionEventHandler` | Toggle the plug and synchronize its OnOff attribute for a button event. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handle OnOff, Level Control, and Identify attribute changes. | diff --git a/sld295-matter-api-reference/oven-app.md b/sld295-matter-api-reference/oven-app.md new file mode 100644 index 0000000..f9699a9 --- /dev/null +++ b/sld295-matter-api-reference/oven-app.md @@ -0,0 +1,25 @@ +# Oven application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize the oven, connectivity handler, cooktop LED, and display. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route oven action and function button events. | +| `OvenButtonHandlerImpl` | `OvenButtonHandler` | Convert an oven button press into a cooktop on/off action. | +| `OvenActionHandlerImpl` | `OvenActionHandler` | Apply an oven or cooktop action and update the application UI. | +| `ConnectivityEventHandlerImpl` | `ConnectivityEventHandler` | Propagate the cooktop off state after DNS-SD initializes. | +| `InitBindingHandlerImpl` | `InitBindingHandler` | Initialize the Binding Manager and register its command and context release handlers. | +| `CookTopBindingPropagateStateImpl` | `CookTopBindingPropagateState` | Notify bound OnOff and Fan Control clusters of the cooktop state. | +| `BoundDeviceChangedHandlerImpl` | `BoundDeviceChangedHandler` | Write the pending cooktop state to a matching bound OnOff or Fan Control peer. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Route OnOff changes and observe Temperature Control and Identify changes. | +| `OnAttributeChangedImpl` | `OnAttributeChanged` | Translate an Oven Mode `CurrentMode` change into an application event. | +| `DMOvenModeClusterInitCallbackImpl` | `DMOvenModeClusterInitCallback` | No default application logic. The Oven Mode cluster init callback does nothing. | +| `DMOvenModeClusterShutdownCallbackImpl` | `DMOvenModeClusterShutdownCallback` | No default application logic. The Oven Mode cluster shutdown callback does nothing. | +| `InitOvenImpl` | `InitOven` | Initialize oven endpoints, delegates, binding, supported levels, and initial cluster state. | +| `OnOffAttributeChangeHandlerImpl` | `OnOffAttributeChangeHandler` | Synchronize cooktop and cooking surface state after an OnOff change. | +| `IsTransitionBlockedImpl` | `IsTransitionBlocked` | Return true when the requested Oven Mode transition is in the blocked transition list. | diff --git a/sld295-matter-api-reference/rangehood-app.md b/sld295-matter-api-reference/rangehood-app.md new file mode 100644 index 0000000..aaf53c9 --- /dev/null +++ b/sld295-matter-api-reference/rangehood-app.md @@ -0,0 +1,16 @@ +# Rangehood application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, initialize the rangehood, and update the display. | +| `InitRangeHoodImpl` | `InitRangeHood` | Initialize the extractor hood endpoint and light LED from cluster state. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route fan control and function button events. | +| `ActionTriggerHandlerImpl` | `ActionTriggerHandler` | Apply light on/off actions and refresh the UI for fan mode changes. | +| `FanControlButtonHandlerImpl` | `FanControlButtonHandler` | Toggle the fan mode for a button press. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Route Fan Control and OnOff changes and observe Identify changes. | diff --git a/sld295-matter-api-reference/refrigerator-app.md b/sld295-matter-api-reference/refrigerator-app.md new file mode 100644 index 0000000..ef6ece9 --- /dev/null +++ b/sld295-matter-api-reference/refrigerator-app.md @@ -0,0 +1,21 @@ +# Refrigerator application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. The public `Init()` method maps to +`CabinetModeInitImpl()`, not `InitImpl()`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback and initialize the refrigerator. | +| `InitRefrigeratorImpl` | `InitRefrigerator` | Configure refrigerator endpoint composition, semantic tags, and the Temperature Control delegate. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events to the base application handler. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handle Refrigerator Alarm and Temperature Control changes and observe Identify changes. | +| `CabinetModeClusterInitImpl` | `CabinetModeClusterInit` | Construct and initialize the `ModeBase::Instance` for the Cabinet Mode cluster on the refrigerator endpoint. | +| `CabinetModeInitImpl` | `Init` | Return success. The Cabinet Mode delegate has no additional default initialization. | +| `HandleChangeToModeImpl` | `HandleChangeToMode` | Accept the requested Cabinet Mode, except a direct transition between Normal and Rapid Freeze. | +| `GetModeLabelByIndexImpl` | `GetModeLabelByIndex` | Return the supported Cabinet Mode label at the given index. | +| `GetModeValueByIndexImpl` | `GetModeValueByIndex` | Return the supported Cabinet Mode value at the given index. | +| `GetModeTagsByIndexImpl` | `GetModeTagsByIndex` | Return the semantic tags for the supported Cabinet Mode at the given index. | diff --git a/sld295-matter-api-reference/thermostat-app.md b/sld295-matter-api-reference/thermostat-app.md new file mode 100644 index 0000000..74d992b --- /dev/null +++ b/sld295-matter-api-reference/thermostat-app.md @@ -0,0 +1,19 @@ +# Thermostat application override APIs + +Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +and implementing it in `CustomerAppTask.cpp`. Match the signature in +`autogen/AppTaskImpl.h`. + +## AppTask + +| Override | Public API | Default behavior | +|---|---|---| +| `AppInitImpl` | `AppInit` | Register the button callback, set the LCD UI, and initialize the thermostat. | +| `InitThermostatImpl` | `InitThermostat` | Initialize the sensor, UI, and periodic temperature sampling. | +| `InitSensorImpl` | `InitSensor` | Initialize the hardware temperature sensor when present. | +| `GetTemperatureImpl` | `GetTemperature` | Read the Si70xx sensor when present, otherwise supply a simulated temperature. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events to the base application handler. | +| `SensorTimerEventHandlerImpl` | `SensorTimerEventHandler` | Post a temperature update application event when the sensor timer expires. | +| `TemperatureUpdateEventHandlerImpl` | `TemperatureUpdateEventHandler` | Sample temperature and update the Thermostat `LocalTemperature` attribute. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handle Thermostat changes and observe Identify changes. | +| `DMThermostatClusterInitImpl` | `DMThermostatClusterInit` | Install the default Thermostat delegate for an endpoint. | diff --git a/sld57-matter-landing-page/index.md b/sld57-matter-landing-page/index.md index e1aa768..7133347 100644 --- a/sld57-matter-landing-page/index.md +++ b/sld57-matter-landing-page/index.md @@ -31,7 +31,7 @@ Want to get a Matter application up and running quickly? Here's a high-level ove 4. **[Optional] Customize Matter App Behavior and Logic** - Use Project Configurator and other Studio tools to customize your app logic: [Developing with Project Configurator](https://docs.silabs.com/ssv6ug/latest/ssv6-configure-project/) - - Customize app behavior in `CustomerAppTask` and `autogen/AppTask.cpp`. For more information, see [Extending Base App Implementation](/matter/{build-docspace-version}/matter-references/custom-matter-device/#extending-base-app-implementation). + - Customize app behavior in `CustomerAppTask` and `autogen/AppTask.cpp`. For more information, see [Matter API Reference](/matter/{build-docspace-version}/matter-api-reference/). - Follow documentation to develop a custom matter device with ZAP and corresponding callbacks: [Custom Matter Device Development](/matter/{build-docspace-version}/matter-references/custom-matter-device) 5. **Build and Flash** diff --git a/sld601-matter-application-development/matter-application-cluster-logic.md b/sld601-matter-application-development/matter-application-cluster-logic.md index 279c1c6..b843538 100644 --- a/sld601-matter-application-development/matter-application-cluster-logic.md +++ b/sld601-matter-application-development/matter-application-cluster-logic.md @@ -61,7 +61,7 @@ Additionally, a corresponding component is automatically added to your project. ## Step 4: Add Application Logic -For information about customizing app behavior, see [Extending Base App Implementation](/matter/{build-docspace-version}/matter-references/custom-matter-device/#extending-base-app-implementation). +For information about customizing app behavior, see [Matter API Reference](/matter/{build-docspace-version}/matter-api-reference/). Application logic centers on AppTask: @@ -140,4 +140,4 @@ Once the custom Door Lock node is successfully commissioned to the network, you mattertool onoff read on-off 1 ``` -Replace with the actual node ID assigned to your device during commissioning. \ No newline at end of file +Replace with the actual node ID assigned to your device during commissioning. diff --git a/sld601-matter-application-development/matter-event-timer-guide.md b/sld601-matter-application-development/matter-event-timer-guide.md index 02ca399..37ff358 100644 --- a/sld601-matter-application-development/matter-event-timer-guide.md +++ b/sld601-matter-application-development/matter-event-timer-guide.md @@ -5,7 +5,7 @@ The Matter event handler uses the FreeRTOS queue to transport a message from the producer to the consumer area. Events can be used to create asynchronous message processing or inter-task communication. -For information about customizing app behavior, see [Extending Base App Implementation](/matter/{build-docspace-version}/matter-references/custom-matter-device/#extending-base-app-implementation). +For information about customizing app behavior, see [Matter API Reference](/matter/{build-docspace-version}/matter-api-reference/). Steps to make an event work: diff --git a/sld601-matter-application-development/matter-scenes-quick-start-guide.md b/sld601-matter-application-development/matter-scenes-quick-start-guide.md index 5d719e9..a6883ce 100644 --- a/sld601-matter-application-development/matter-scenes-quick-start-guide.md +++ b/sld601-matter-application-development/matter-scenes-quick-start-guide.md @@ -166,7 +166,7 @@ public: ### Step 3 Implement Callbacks -For information about customizing app behavior, see [Extending Base App Implementation](/matter/{build-docspace-version}/matter-references/custom-matter-device/#extending-base-app-implementation). +For information about customizing app behavior, see [Matter API Reference](/matter/{build-docspace-version}/matter-api-reference/). Make the following additions to `src/CustomerAppTask.cpp`: From 9e24fbe3bf9c592910f133a0fcc80ca7e9b13be8 Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Thu, 17 Sep 2026 13:13:07 -0400 Subject: [PATCH 02/12] Apply batched suggestions from code review Co-authored-by: silabs-BhoomikaB --- .../air-quality-sensor-app.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sld295-matter-api-reference/air-quality-sensor-app.md b/sld295-matter-api-reference/air-quality-sensor-app.md index 99408a2..456d31d 100644 --- a/sld295-matter-api-reference/air-quality-sensor-app.md +++ b/sld295-matter-api-reference/air-quality-sensor-app.md @@ -1,6 +1,6 @@ -# Air Quality Sensor application override APIs +# Air Quality Sensor Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. and implementing it in `CustomerAppTask.cpp`. Match the signature in `autogen/AppTaskImpl.h`. @@ -8,9 +8,9 @@ and implementing it in `CustomerAppTask.cpp`. Match the signature in | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, set the LCD UI, and initialize the air quality sensor. | -| `InitAirQualitySensorImpl` | `InitAirQualitySensor` | Create the periodic sensor timer, initialize hardware when present, and start sampling. | -| `GetAirQualityValueImpl` | `GetAirQualityValue` | Read the onboard air quality sensor, or a simulated value if none is present. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events to the base application handler. | -| `SensorTimerEventHandlerImpl` | `SensorTimerEventHandler` | Read the sensor and schedule an Air Quality attribute update. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Log Identify attribute changes. | +| `AppInitImpl` | `AppInit` | Registers the button callback, configures the LCD UI, and initializes the air quality sensor. | +| `InitAirQualitySensorImpl` | `InitAirQualitySensor` | Creates the periodic sensor timer, initializes the sensor hardware when available, and starts sampling. | +| GetAirQualityValueImpl | GetAirQualityValue | Reads the value from the onboard air quality sensor. If the sensor is unavailable, returns a simulated value. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function-button events to the base application handler. | +| `SensorTimerEventHandlerImpl` | `SensorTimerEventHandler` | Reads the sensor value and schedules an update to the Air Quality attribute. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Logs changes to the Identify attribute. | From dc093a774be37b31885dd7791b9358e2144e3ea2 Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Thu, 17 Sep 2026 13:20:50 -0400 Subject: [PATCH 03/12] apply common edits across app files --- .../air-quality-sensor-app.md | 2 - .../base-platform-app.md | 20 +++---- sld295-matter-api-reference/closure-app.md | 44 +++++++-------- sld295-matter-api-reference/evse-app.md | 14 ++--- .../fan-control-app.md | 26 ++++----- .../light-switch-app.md | 20 +++---- sld295-matter-api-reference/lighting-app.md | 22 ++++---- sld295-matter-api-reference/lock-app.md | 56 +++++++++---------- .../multi-sensor-app.md | 26 ++++----- sld295-matter-api-reference/onoff-plug-app.md | 16 +++--- sld295-matter-api-reference/oven-app.md | 32 +++++------ sld295-matter-api-reference/rangehood-app.md | 18 +++--- .../refrigerator-app.md | 26 ++++----- sld295-matter-api-reference/thermostat-app.md | 24 ++++---- 14 files changed, 159 insertions(+), 187 deletions(-) diff --git a/sld295-matter-api-reference/air-quality-sensor-app.md b/sld295-matter-api-reference/air-quality-sensor-app.md index 456d31d..d404356 100644 --- a/sld295-matter-api-reference/air-quality-sensor-app.md +++ b/sld295-matter-api-reference/air-quality-sensor-app.md @@ -1,8 +1,6 @@ # Air Quality Sensor Application Override APIs To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. ## AppTask diff --git a/sld295-matter-api-reference/base-platform-app.md b/sld295-matter-api-reference/base-platform-app.md index aa60774..a2789c1 100644 --- a/sld295-matter-api-reference/base-platform-app.md +++ b/sld295-matter-api-reference/base-platform-app.md @@ -1,17 +1,15 @@ -# Base Platform application override APIs +# Base Platform Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize the LED, and show the demo UI or QR code when enabled. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route user action button events to `ApplicationEventHandler` and function button events to the base application handler. | -| `ApplicationEventHandlerImpl` | `ApplicationEventHandler` | Toggle the LED for a user action button press. | -| `OnEnterActiveModeImpl` | `OnEnterActiveMode` | Update the demo UI when the ICD server enters active mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | -| `OnEnterIdleModeImpl` | `OnEnterIdleMode` | Update the demo UI when the ICD server enters idle mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | -| `OnTransitionToIdleImpl` | `OnTransitionToIdle` | Log the transition while the ICD server moves to idle mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | -| `OnICDModeChangeImpl` | `OnICDModeChange` | Log the change between SIT and LIT operating modes. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the LED, and shows the demo UI or QR code when enabled. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes user action button events to `ApplicationEventHandler` and function button events to the base application handler. | +| `ApplicationEventHandlerImpl` | `ApplicationEventHandler` | Toggles the LED for a user action button press. | +| `OnEnterActiveModeImpl` | `OnEnterActiveMode` | Updates the demo UI when the ICD server enters active mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | +| `OnEnterIdleModeImpl` | `OnEnterIdleMode` | Updates the demo UI when the ICD server enters idle mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | +| `OnTransitionToIdleImpl` | `OnTransitionToIdle` | Logs the transition while the ICD server moves to idle mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | +| `OnICDModeChangeImpl` | `OnICDModeChange` | Logs the change between SIT and LIT operating modes. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | diff --git a/sld295-matter-api-reference/closure-app.md b/sld295-matter-api-reference/closure-app.md index b637ee0..5401204 100644 --- a/sld295-matter-api-reference/closure-app.md +++ b/sld295-matter-api-reference/closure-app.md @@ -1,19 +1,17 @@ -# Closure application override APIs +# Closure Application Override APIs -Override each `AppTask` hook below by declaring the `*Impl()` method in -`CustomerAppTask.h` and implementing it in `CustomerAppTask.cpp`. Match the -signature in `autogen/AppTaskImpl.h`. +To override any of the following AppTask hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize the display, and initialize Closure Manager. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route closure button presses to `ClosureButtonActionEventHandler` and function button events to the base application handler. | -| `ClosureButtonActionEventHandlerImpl` | `ClosureButtonActionEventHandler` | Stop motion if a closure action is in progress, otherwise start a MoveTo toward the opposite position. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Log Identify attribute changes. | -| `DMClosureControlClusterAttributeChangedCallbackImpl` | `DMClosureControlClusterAttributeChangedCallback` | Refresh the UI when Closure Control `MainState` or `OverallCurrentState` changes. | -| `DMClosureDimensionClusterAttributeChangedCallbackImpl` | `DMClosureDimensionClusterAttributeChangedCallback` | Log Closure Dimension attribute changes. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the display, and initializes Closure Manager. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes closure button presses to `ClosureButtonActionEventHandler` and function button events to the base application handler. | +| `ClosureButtonActionEventHandlerImpl` | `ClosureButtonActionEventHandler` | Stops motion if a closure action is in progress, otherwise starts a MoveTo toward the opposite position. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Logs Identify attribute changes. | +| `DMClosureControlClusterAttributeChangedCallbackImpl` | `DMClosureControlClusterAttributeChangedCallback` | Refreshes the UI when Closure Control `MainState` or `OverallCurrentState` changes. | +| `DMClosureDimensionClusterAttributeChangedCallbackImpl` | `DMClosureDimensionClusterAttributeChangedCallback` | Logs Closure Dimension attribute changes. | ## ClosureManager @@ -25,16 +23,16 @@ overrides in `CustomerAppTask`. | Override | Public API | Default behavior | |---|---|---| -| `InitImpl` | `Init` | Initialize the closure timer, closure endpoints, and panel endpoints. | -| `OnCalibrateCommandImpl` | `OnCalibrateCommand` | Validate and start an asynchronous closure calibration. | -| `OnMoveToCommandImpl` | `OnMoveToCommand` | Validate a MoveTo command and set overall panel targets. | -| `OnStopCommandImpl` | `OnStopCommand` | Stop the active closure operation and complete the stop action. | -| `OnSetTargetCommandImpl` | `OnSetTargetCommand` | Validate a SetTarget command and set the selected panel target. | -| `OnStepCommandImpl` | `OnStepCommand` | Validate a Step command and set the selected panel step target. | -| `HandleClosureActionCompleteImpl` | `HandleClosureActionComplete` | Finalize a completed calibrate, stop, move, or unlatch action. | -| `HandleClosureMotionActionImpl` | `HandleClosureMotionAction` | Advance closure panels toward their target positions. | -| `HandleClosureUnlatchActionImpl` | `HandleClosureUnlatchAction` | Update closure and panel states for an unlatch action. | -| `GetPanelNextPositionImpl` | `GetPanelNextPosition` | Calculate the next position between a panel's current and target positions. | -| `HandlePanelSetTargetActionImpl` | `HandlePanelSetTargetAction` | Advance one panel toward a SetTarget position. | -| `HandlePanelUnlatchActionImpl` | `HandlePanelUnlatchAction` | Update one panel for an unlatch action. | -| `HandlePanelStepActionImpl` | `HandlePanelStepAction` | Apply a Step action to one panel. | +| `InitImpl` | `Init` | Initializes the closure timer, closure endpoints, and panel endpoints. | +| `OnCalibrateCommandImpl` | `OnCalibrateCommand` | Validates and starts an asynchronous closure calibration. | +| `OnMoveToCommandImpl` | `OnMoveToCommand` | Validates a MoveTo command and sets overall panel targets. | +| `OnStopCommandImpl` | `OnStopCommand` | Stops the active closure operation and completes the stop action. | +| `OnSetTargetCommandImpl` | `OnSetTargetCommand` | Validates a SetTarget command and sets the selected panel target. | +| `OnStepCommandImpl` | `OnStepCommand` | Validates a Step command and sets the selected panel step target. | +| `HandleClosureActionCompleteImpl` | `HandleClosureActionComplete` | Finalizes a completed calibrate, stop, move, or unlatch action. | +| `HandleClosureMotionActionImpl` | `HandleClosureMotionAction` | Advances closure panels toward their target positions. | +| `HandleClosureUnlatchActionImpl` | `HandleClosureUnlatchAction` | Updates closure and panel states for an unlatch action. | +| `GetPanelNextPositionImpl` | `GetPanelNextPosition` | Calculates the next position between a panel's current and target positions. | +| `HandlePanelSetTargetActionImpl` | `HandlePanelSetTargetAction` | Advances one panel toward a SetTarget position. | +| `HandlePanelUnlatchActionImpl` | `HandlePanelUnlatchAction` | Updates one panel for an unlatch action. | +| `HandlePanelStepActionImpl` | `HandlePanelStepAction` | Applies a Step action to one panel. | diff --git a/sld295-matter-api-reference/evse-app.md b/sld295-matter-api-reference/evse-app.md index 32d856f..2e68260 100644 --- a/sld295-matter-api-reference/evse-app.md +++ b/sld295-matter-api-reference/evse-app.md @@ -1,14 +1,12 @@ -# EVSE application override APIs +# EVSE Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, run `ApplicationInit`, and register EVSE test event triggers when enabled. | -| `ApplicationInitImpl` | `ApplicationInit` | Initialize the EVSE application and energy management LED. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route EVSE control button presses to `EnergyManagementActionEventHandler` and function button events to the base application handler. | -| `EnergyManagementActionEventHandlerImpl` | `EnergyManagementActionEventHandler` | Log the control button event. The default does not start a charging action. | +| `AppInitImpl` | `AppInit` | Registers the button callback, runs `ApplicationInit`, and registers EVSE test event triggers when enabled. | +| `ApplicationInitImpl` | `ApplicationInit` | Initializes the EVSE application and energy management LED. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes EVSE control button presses to `EnergyManagementActionEventHandler` and function button events to the base application handler. | +| `EnergyManagementActionEventHandlerImpl` | `EnergyManagementActionEventHandler` | Logs the control button event. The default does not start a charging action. | diff --git a/sld295-matter-api-reference/fan-control-app.md b/sld295-matter-api-reference/fan-control-app.md index 9ed25c7..ed9b1f6 100644 --- a/sld295-matter-api-reference/fan-control-app.md +++ b/sld295-matter-api-reference/fan-control-app.md @@ -1,20 +1,18 @@ -# Fan Control application override APIs +# Fan Control Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize fan control, and update the display. | -| `InitFanControlImpl` | `InitFanControl` | Install Fan Control delegates, initialize the LED, and apply the initial attribute state. | -| `HandleStepImpl` | `HandleStep` | Handle a Fan Control Step command by updating speed or percentage settings. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events to the base application handler. | -| `FanUiUpdateEventHandlerImpl` | `FanUiUpdateEventHandler` | Update the fan LED and, when enabled, the display. | -| `HandleFanModeChangeImpl` | `HandleFanModeChange` | Synchronize speed and percentage settings after a FanMode change. | -| `DeriveFanModeFromPercentImpl` | `DeriveFanModeFromPercent` | Map PercentSetting to Off, Low, Medium, or High fan mode. | -| `HandlePercentSettingChangeImpl` | `HandlePercentSettingChange` | Update PercentCurrent after PercentSetting changes. | -| `HandleSpeedSettingChangeImpl` | `HandleSpeedSettingChange` | Update SpeedCurrent after SpeedSetting changes. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Apply Fan Control PercentSetting, SpeedSetting, and FanMode changes, and log Identify changes. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes fan control, and updates the display. | +| `InitFanControlImpl` | `InitFanControl` | Installs Fan Control delegates, initializes the LED, and applies the initial attribute state. | +| `HandleStepImpl` | `HandleStep` | Handles a Fan Control Step command by updating speed or percentage settings. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function button events to the base application handler. | +| `FanUiUpdateEventHandlerImpl` | `FanUiUpdateEventHandler` | Updates the fan LED and, when enabled, the display. | +| `HandleFanModeChangeImpl` | `HandleFanModeChange` | Synchronizes speed and percentage settings after a FanMode change. | +| `DeriveFanModeFromPercentImpl` | `DeriveFanModeFromPercent` | Maps PercentSetting to Off, Low, Medium, or High fan mode. | +| `HandlePercentSettingChangeImpl` | `HandlePercentSettingChange` | Updates PercentCurrent after PercentSetting changes. | +| `HandleSpeedSettingChangeImpl` | `HandleSpeedSettingChange` | Updates SpeedCurrent after SpeedSetting changes. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Applies Fan Control PercentSetting, SpeedSetting, and FanMode changes, and logs Identify changes. | diff --git a/sld295-matter-api-reference/light-switch-app.md b/sld295-matter-api-reference/light-switch-app.md index 359a78b..b94d76c 100644 --- a/sld295-matter-api-reference/light-switch-app.md +++ b/sld295-matter-api-reference/light-switch-app.md @@ -1,17 +1,15 @@ -# Light Switch application override APIs +# Light Switch Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize the light switch endpoints, and create the level control long press timer. | -| `InitLightSwitchImpl` | `InitLightSwitch` | Set the light switch and generic switch endpoints and schedule Binding Manager initialization. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Convert hardware button activity into application button events. | -| `AppEventHandlerImpl` | `AppEventHandler` | Translate application button events into On/Off and Level Control binding actions. | -| `InitBindingHandlerImpl` | `InitBindingHandler` | Initialize the Binding Manager and register its command and context release handlers. | -| `LightSwitchChangedHandlerImpl` | `LightSwitchChangedHandler` | Send a pending On/Off or Level Control command through a matching bound peer or group. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Log Identify attribute changes. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the light switch endpoints, and creates the level control long press timer. | +| `InitLightSwitchImpl` | `InitLightSwitch` | Sets the light switch and generic switch endpoints and schedules Binding Manager initialization. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Converts hardware button activity into application button events. | +| `AppEventHandlerImpl` | `AppEventHandler` | Translates application button events into On/Off and Level Control binding actions. | +| `InitBindingHandlerImpl` | `InitBindingHandler` | Initializes the Binding Manager and registers its command and context release handlers. | +| `LightSwitchChangedHandlerImpl` | `LightSwitchChangedHandler` | Sends a pending On/Off or Level Control command through a matching bound peer or group. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Logs Identify attribute changes. | diff --git a/sld295-matter-api-reference/lighting-app.md b/sld295-matter-api-reference/lighting-app.md index 1506794..02561c0 100644 --- a/sld295-matter-api-reference/lighting-app.md +++ b/sld295-matter-api-reference/lighting-app.md @@ -1,18 +1,16 @@ -# Lighting application override APIs +# Lighting Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize the light, LED, and display. | -| `InitLightImpl` | `InitLight` | Create the off effect timer and load OnOff (and RGB color attributes when enabled) from cluster state. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route light action and function button events. | -| `OnTriggerOffWithEffectImpl` | `OnTriggerOffWithEffect` | Select and start the timer for an OffWithEffect command. | -| `LightActionEventHandlerImpl` | `LightActionEventHandler` | Toggle the light for a button event and synchronize the OnOff attribute. | -| `LightTimerEventHandlerImpl` | `LightTimerEventHandler` | Post the event that completes an off effect. | -| `LightControlEventHandlerImpl` | `LightControlEventHandler` | Apply level and color control events to the RGB LED. Available when `SL_MATTER_RGB_LED_ENABLED` is enabled. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Route OnOff, Level Control, Color Control, and Identify attribute changes. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the light, LED, and display. | +| `InitLightImpl` | `InitLight` | Creates the off effect timer and loads OnOff (and RGB color attributes when enabled) from cluster state. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes light action and function button events. | +| `OnTriggerOffWithEffectImpl` | `OnTriggerOffWithEffect` | Selects and starts the timer for an OffWithEffect command. | +| `LightActionEventHandlerImpl` | `LightActionEventHandler` | Toggles the light for a button event and synchronizes the OnOff attribute. | +| `LightTimerEventHandlerImpl` | `LightTimerEventHandler` | Posts the event that completes an off effect. | +| `LightControlEventHandlerImpl` | `LightControlEventHandler` | Applies level and color control events to the RGB LED. Available when `SL_MATTER_RGB_LED_ENABLED` is enabled. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Routes OnOff, Level Control, Color Control, and Identify attribute changes. | diff --git a/sld295-matter-api-reference/lock-app.md b/sld295-matter-api-reference/lock-app.md index 04756a5..1c5b446 100644 --- a/sld295-matter-api-reference/lock-app.md +++ b/sld295-matter-api-reference/lock-app.md @@ -1,35 +1,33 @@ -# Lock application override APIs +# Lock Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize the lock, and sync the Door Lock cluster state. | -| `InitLockImpl` | `InitLock` | Initialize lock state, credential storage, actuator timers, and the Door Lock server. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route lock action and function button events. | -| `LockButtonActionHandlerImpl` | `LockButtonActionHandler` | Convert a lock button press into a lock or unlock action. | -| `UnlatchCallbackImpl` | `UnlatchCallback` | Schedule the transition from the unlatched state to the unlocked state when the unlatch timer expires. | -| `ActuatorMovementEventHandlerImpl` | `ActuatorMovementEventHandler` | Complete actuator motion, update the Door Lock state, and process a pending request. | -| `LockActionEventHandlerImpl` | `LockActionEventHandler` | Start the lock, unlock, or unlatch action carried by an application event. | -| `LockRequestEventHandlerImpl` | `LockRequestEventHandler` | Drain a staged Door Lock request and pass it to the application task. | -| `HandleLockRequestOnAppTaskImpl` | `HandleLockRequestOnAppTask` | Queue, complete, or start a Door Lock request according to actuator state. | -| `UnlockAfterUnlatchImpl` | `UnlockAfterUnlatch` | Change an unlatched lock to unlocked and stage the unlock request. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Respond to Door Lock `LockState` attribute changes. | -| `DMDoorLockOnDoorLockCommandImpl` | `DMDoorLockOnDoorLockCommand` | Validate a Lock command and stage a request for the locked state. | -| `DMDoorLockOnDoorUnlockCommandImpl` | `DMDoorLockOnDoorUnlockCommand` | Validate an Unlock command and stage an unlock or unlatch request, depending on Unbolt support. | -| `DMDoorLockOnDoorUnboltCommandImpl` | `DMDoorLockOnDoorUnboltCommand` | Validate an Unbolt command and stage a request for the unlocked state. | -| `DMDoorLockGetCredentialImpl` | `DMDoorLockGetCredential` | Retrieve credential data for the Door Lock server. | -| `DMDoorLockSetCredentialImpl` | `DMDoorLockSetCredential` | Persist credential data for the Door Lock server. | -| `DMDoorLockGetUserImpl` | `DMDoorLockGetUser` | Retrieve user data for the Door Lock server. | -| `DMDoorLockSetUserImpl` | `DMDoorLockSetUser` | Persist user data for the Door Lock server. | -| `DMDoorLockGetWeekDayScheduleImpl` | `DMDoorLockGetWeekDaySchedule` | Retrieve a user's weekday schedule. | -| `DMDoorLockSetWeekDayScheduleImpl` | `DMDoorLockSetWeekDaySchedule` | Persist a user's weekday schedule. | -| `DMDoorLockGetYearDayScheduleImpl` | `DMDoorLockGetYearDaySchedule` | Retrieve a user's year day schedule. | -| `DMDoorLockSetYearDayScheduleImpl` | `DMDoorLockSetYearDaySchedule` | Persist a user's year day schedule. | -| `DMDoorLockGetHolidayScheduleImpl` | `DMDoorLockGetHolidaySchedule` | Retrieve a holiday schedule. | -| `DMDoorLockSetHolidayScheduleImpl` | `DMDoorLockSetHolidaySchedule` | Persist a holiday schedule. | -| `DMDoorLockOnAutoRelockImpl` | `DMDoorLockOnAutoRelock` | Start a lock action when automatic relocking occurs. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the lock, and syncs the Door Lock cluster state. | +| `InitLockImpl` | `InitLock` | Initializes lock state, credential storage, actuator timers, and the Door Lock server. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes lock action and function button events. | +| `LockButtonActionHandlerImpl` | `LockButtonActionHandler` | Converts a lock button press into a lock or unlock action. | +| `UnlatchCallbackImpl` | `UnlatchCallback` | Schedules the transition from the unlatched state to the unlocked state when the unlatch timer expires. | +| `ActuatorMovementEventHandlerImpl` | `ActuatorMovementEventHandler` | Completes actuator motion, updates the Door Lock state, and processes a pending request. | +| `LockActionEventHandlerImpl` | `LockActionEventHandler` | Starts the lock, unlock, or unlatch action carried by an application event. | +| `LockRequestEventHandlerImpl` | `LockRequestEventHandler` | Drains a staged Door Lock request and passes it to the application task. | +| `HandleLockRequestOnAppTaskImpl` | `HandleLockRequestOnAppTask` | Queues, completes, or starts a Door Lock request according to actuator state. | +| `UnlockAfterUnlatchImpl` | `UnlockAfterUnlatch` | Changes an unlatched lock to unlocked and stages the unlock request. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Responds to Door Lock `LockState` attribute changes. | +| `DMDoorLockOnDoorLockCommandImpl` | `DMDoorLockOnDoorLockCommand` | Validates a Lock command and stages a request for the locked state. | +| `DMDoorLockOnDoorUnlockCommandImpl` | `DMDoorLockOnDoorUnlockCommand` | Validates an Unlock command and stages an unlock or unlatch request, depending on Unbolt support. | +| `DMDoorLockOnDoorUnboltCommandImpl` | `DMDoorLockOnDoorUnboltCommand` | Validates an Unbolt command and stages a request for the unlocked state. | +| `DMDoorLockGetCredentialImpl` | `DMDoorLockGetCredential` | Retrieves credential data for the Door Lock server. | +| `DMDoorLockSetCredentialImpl` | `DMDoorLockSetCredential` | Persists credential data for the Door Lock server. | +| `DMDoorLockGetUserImpl` | `DMDoorLockGetUser` | Retrieves user data for the Door Lock server. | +| `DMDoorLockSetUserImpl` | `DMDoorLockSetUser` | Persists user data for the Door Lock server. | +| `DMDoorLockGetWeekDayScheduleImpl` | `DMDoorLockGetWeekDaySchedule` | Retrieves a user's weekday schedule. | +| `DMDoorLockSetWeekDayScheduleImpl` | `DMDoorLockSetWeekDaySchedule` | Persists a user's weekday schedule. | +| `DMDoorLockGetYearDayScheduleImpl` | `DMDoorLockGetYearDaySchedule` | Retrieves a user's year day schedule. | +| `DMDoorLockSetYearDayScheduleImpl` | `DMDoorLockSetYearDaySchedule` | Persists a user's year day schedule. | +| `DMDoorLockGetHolidayScheduleImpl` | `DMDoorLockGetHolidaySchedule` | Retrieves a holiday schedule. | +| `DMDoorLockSetHolidayScheduleImpl` | `DMDoorLockSetHolidaySchedule` | Persists a holiday schedule. | +| `DMDoorLockOnAutoRelockImpl` | `DMDoorLockOnAutoRelock` | Starts a lock action when automatic relocking occurs. | diff --git a/sld295-matter-api-reference/multi-sensor-app.md b/sld295-matter-api-reference/multi-sensor-app.md index ff9e949..02f4c52 100644 --- a/sld295-matter-api-reference/multi-sensor-app.md +++ b/sld295-matter-api-reference/multi-sensor-app.md @@ -1,20 +1,18 @@ -# Multi Sensor application override APIs +# Multi Sensor Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize the occupancy LED and display, and start the sensor manager. | -| `InitSensorManagerImpl` | `InitSensorManager` | Initialize sensor clusters, register the attribute listener, and schedule periodic sampling. | -| `GetTemperatureAndHumidityImpl` | `GetTemperatureAndHumidity` | Read the Si70xx sensor when present, otherwise supply simulated temperature and humidity values. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events and occupancy toggle button events. | -| `ProcessButtonEventImpl` | `ProcessButtonEvent` | Toggle the Occupancy attribute for an application button event. | -| `TriggerSensorActionImpl` | `TriggerSensorAction` | Sample temperature and humidity and update their measured value attributes. | -| `OccupancyAttributeUpdateEventImpl` | `OccupancyAttributeUpdateEvent` | Update the occupancy LED and display after an Occupancy change. | -| `SensorAttributeUpdateEventImpl` | `SensorAttributeUpdateEvent` | Update the display after a temperature or humidity change. | -| `OnAttributeChangedImpl` | `OnAttributeChanged` | Translate Occupancy, Temperature Measurement, and Relative Humidity Measurement changes into application events. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Log Identify attribute changes. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the occupancy LED and display, and starts the sensor manager. | +| `InitSensorManagerImpl` | `InitSensorManager` | Initializes sensor clusters, registers the attribute listener, and schedules periodic sampling. | +| `GetTemperatureAndHumidityImpl` | `GetTemperatureAndHumidity` | Reads the Si70xx sensor when present, otherwise supplies simulated temperature and humidity values. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function button events and occupancy toggle button events. | +| `ProcessButtonEventImpl` | `ProcessButtonEvent` | Toggles the Occupancy attribute for an application button event. | +| `TriggerSensorActionImpl` | `TriggerSensorAction` | Samples temperature and humidity and updates their measured value attributes. | +| `OccupancyAttributeUpdateEventImpl` | `OccupancyAttributeUpdateEvent` | Updates the occupancy LED and display after an Occupancy change. | +| `SensorAttributeUpdateEventImpl` | `SensorAttributeUpdateEvent` | Updates the display after a temperature or humidity change. | +| `OnAttributeChangedImpl` | `OnAttributeChanged` | Translates Occupancy, Temperature Measurement, and Relative Humidity Measurement changes into application events. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Logs Identify attribute changes. | diff --git a/sld295-matter-api-reference/onoff-plug-app.md b/sld295-matter-api-reference/onoff-plug-app.md index f7ec9bc..a9fa99e 100644 --- a/sld295-matter-api-reference/onoff-plug-app.md +++ b/sld295-matter-api-reference/onoff-plug-app.md @@ -1,15 +1,13 @@ -# On/Off Plug application override APIs +# On/Off Plug Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize the plug, LED, and display. | -| `InitPlugImpl` | `InitPlug` | Read the OnOff attribute into the plug on/off state. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route plug action and function button events. | -| `OnOffActionEventHandlerImpl` | `OnOffActionEventHandler` | Toggle the plug and synchronize its OnOff attribute for a button event. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handle OnOff, Level Control, and Identify attribute changes. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the plug, LED, and display. | +| `InitPlugImpl` | `InitPlug` | Reads the OnOff attribute into the plug on/off state. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes plug action and function button events. | +| `OnOffActionEventHandlerImpl` | `OnOffActionEventHandler` | Toggles the plug and synchronizes its OnOff attribute for a button event. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handles OnOff, Level Control, and Identify attribute changes. | diff --git a/sld295-matter-api-reference/oven-app.md b/sld295-matter-api-reference/oven-app.md index f9699a9..7543bea 100644 --- a/sld295-matter-api-reference/oven-app.md +++ b/sld295-matter-api-reference/oven-app.md @@ -1,25 +1,23 @@ -# Oven application override APIs +# Oven Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize the oven, connectivity handler, cooktop LED, and display. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route oven action and function button events. | -| `OvenButtonHandlerImpl` | `OvenButtonHandler` | Convert an oven button press into a cooktop on/off action. | -| `OvenActionHandlerImpl` | `OvenActionHandler` | Apply an oven or cooktop action and update the application UI. | -| `ConnectivityEventHandlerImpl` | `ConnectivityEventHandler` | Propagate the cooktop off state after DNS-SD initializes. | -| `InitBindingHandlerImpl` | `InitBindingHandler` | Initialize the Binding Manager and register its command and context release handlers. | -| `CookTopBindingPropagateStateImpl` | `CookTopBindingPropagateState` | Notify bound OnOff and Fan Control clusters of the cooktop state. | -| `BoundDeviceChangedHandlerImpl` | `BoundDeviceChangedHandler` | Write the pending cooktop state to a matching bound OnOff or Fan Control peer. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Route OnOff changes and observe Temperature Control and Identify changes. | -| `OnAttributeChangedImpl` | `OnAttributeChanged` | Translate an Oven Mode `CurrentMode` change into an application event. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the oven, connectivity handler, cooktop LED, and display. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes oven action and function button events. | +| `OvenButtonHandlerImpl` | `OvenButtonHandler` | Converts an oven button press into a cooktop on/off action. | +| `OvenActionHandlerImpl` | `OvenActionHandler` | Applies an oven or cooktop action and updates the application UI. | +| `ConnectivityEventHandlerImpl` | `ConnectivityEventHandler` | Propagates the cooktop off state after DNS-SD initializes. | +| `InitBindingHandlerImpl` | `InitBindingHandler` | Initializes the Binding Manager and registers its command and context release handlers. | +| `CookTopBindingPropagateStateImpl` | `CookTopBindingPropagateState` | Notifies bound OnOff and Fan Control clusters of the cooktop state. | +| `BoundDeviceChangedHandlerImpl` | `BoundDeviceChangedHandler` | Writes the pending cooktop state to a matching bound OnOff or Fan Control peer. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Routes OnOff changes and observes Temperature Control and Identify changes. | +| `OnAttributeChangedImpl` | `OnAttributeChanged` | Translates an Oven Mode `CurrentMode` change into an application event. | | `DMOvenModeClusterInitCallbackImpl` | `DMOvenModeClusterInitCallback` | No default application logic. The Oven Mode cluster init callback does nothing. | | `DMOvenModeClusterShutdownCallbackImpl` | `DMOvenModeClusterShutdownCallback` | No default application logic. The Oven Mode cluster shutdown callback does nothing. | -| `InitOvenImpl` | `InitOven` | Initialize oven endpoints, delegates, binding, supported levels, and initial cluster state. | -| `OnOffAttributeChangeHandlerImpl` | `OnOffAttributeChangeHandler` | Synchronize cooktop and cooking surface state after an OnOff change. | -| `IsTransitionBlockedImpl` | `IsTransitionBlocked` | Return true when the requested Oven Mode transition is in the blocked transition list. | +| `InitOvenImpl` | `InitOven` | Initializes oven endpoints, delegates, binding, supported levels, and initial cluster state. | +| `OnOffAttributeChangeHandlerImpl` | `OnOffAttributeChangeHandler` | Synchronizes cooktop and cooking surface state after an OnOff change. | +| `IsTransitionBlockedImpl` | `IsTransitionBlocked` | Returns true when the requested Oven Mode transition is in the blocked transition list. | diff --git a/sld295-matter-api-reference/rangehood-app.md b/sld295-matter-api-reference/rangehood-app.md index aaf53c9..bd5cacd 100644 --- a/sld295-matter-api-reference/rangehood-app.md +++ b/sld295-matter-api-reference/rangehood-app.md @@ -1,16 +1,14 @@ -# Rangehood application override APIs +# Rangehood Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, initialize the rangehood, and update the display. | -| `InitRangeHoodImpl` | `InitRangeHood` | Initialize the extractor hood endpoint and light LED from cluster state. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route fan control and function button events. | -| `ActionTriggerHandlerImpl` | `ActionTriggerHandler` | Apply light on/off actions and refresh the UI for fan mode changes. | -| `FanControlButtonHandlerImpl` | `FanControlButtonHandler` | Toggle the fan mode for a button press. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Route Fan Control and OnOff changes and observe Identify changes. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the rangehood, and updates the display. | +| `InitRangeHoodImpl` | `InitRangeHood` | Initializes the extractor hood endpoint and light LED from cluster state. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes fan control and function button events. | +| `ActionTriggerHandlerImpl` | `ActionTriggerHandler` | Applies light on/off actions and refreshes the UI for fan mode changes. | +| `FanControlButtonHandlerImpl` | `FanControlButtonHandler` | Toggles the fan mode for a button press. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Routes Fan Control and OnOff changes and observes Identify changes. | diff --git a/sld295-matter-api-reference/refrigerator-app.md b/sld295-matter-api-reference/refrigerator-app.md index ef6ece9..88c7f5e 100644 --- a/sld295-matter-api-reference/refrigerator-app.md +++ b/sld295-matter-api-reference/refrigerator-app.md @@ -1,21 +1,19 @@ -# Refrigerator application override APIs +# Refrigerator Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. The public `Init()` method maps to +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. The public `Init()` method maps to `CabinetModeInitImpl()`, not `InitImpl()`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback and initialize the refrigerator. | -| `InitRefrigeratorImpl` | `InitRefrigerator` | Configure refrigerator endpoint composition, semantic tags, and the Temperature Control delegate. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events to the base application handler. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handle Refrigerator Alarm and Temperature Control changes and observe Identify changes. | -| `CabinetModeClusterInitImpl` | `CabinetModeClusterInit` | Construct and initialize the `ModeBase::Instance` for the Cabinet Mode cluster on the refrigerator endpoint. | -| `CabinetModeInitImpl` | `Init` | Return success. The Cabinet Mode delegate has no additional default initialization. | -| `HandleChangeToModeImpl` | `HandleChangeToMode` | Accept the requested Cabinet Mode, except a direct transition between Normal and Rapid Freeze. | -| `GetModeLabelByIndexImpl` | `GetModeLabelByIndex` | Return the supported Cabinet Mode label at the given index. | -| `GetModeValueByIndexImpl` | `GetModeValueByIndex` | Return the supported Cabinet Mode value at the given index. | -| `GetModeTagsByIndexImpl` | `GetModeTagsByIndex` | Return the semantic tags for the supported Cabinet Mode at the given index. | +| `AppInitImpl` | `AppInit` | Registers the button callback and initializes the refrigerator. | +| `InitRefrigeratorImpl` | `InitRefrigerator` | Configures refrigerator endpoint composition, semantic tags, and the Temperature Control delegate. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function button events to the base application handler. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handles Refrigerator Alarm and Temperature Control changes and observes Identify changes. | +| `CabinetModeClusterInitImpl` | `CabinetModeClusterInit` | Constructs and initializes the `ModeBase::Instance` for the Cabinet Mode cluster on the refrigerator endpoint. | +| `CabinetModeInitImpl` | `Init` | Returns success. The Cabinet Mode delegate has no additional default initialization. | +| `HandleChangeToModeImpl` | `HandleChangeToMode` | Accepts the requested Cabinet Mode, except a direct transition between Normal and Rapid Freeze. | +| `GetModeLabelByIndexImpl` | `GetModeLabelByIndex` | Returns the supported Cabinet Mode label at the given index. | +| `GetModeValueByIndexImpl` | `GetModeValueByIndex` | Returns the supported Cabinet Mode value at the given index. | +| `GetModeTagsByIndexImpl` | `GetModeTagsByIndex` | Returns the semantic tags for the supported Cabinet Mode at the given index. | diff --git a/sld295-matter-api-reference/thermostat-app.md b/sld295-matter-api-reference/thermostat-app.md index 74d992b..de20239 100644 --- a/sld295-matter-api-reference/thermostat-app.md +++ b/sld295-matter-api-reference/thermostat-app.md @@ -1,19 +1,17 @@ -# Thermostat application override APIs +# Thermostat Application Override APIs -Override each hook below by declaring the `*Impl()` method in `CustomerAppTask.h` -and implementing it in `CustomerAppTask.cpp`. Match the signature in -`autogen/AppTaskImpl.h`. +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. ## AppTask | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Register the button callback, set the LCD UI, and initialize the thermostat. | -| `InitThermostatImpl` | `InitThermostat` | Initialize the sensor, UI, and periodic temperature sampling. | -| `InitSensorImpl` | `InitSensor` | Initialize the hardware temperature sensor when present. | -| `GetTemperatureImpl` | `GetTemperature` | Read the Si70xx sensor when present, otherwise supply a simulated temperature. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Route function button events to the base application handler. | -| `SensorTimerEventHandlerImpl` | `SensorTimerEventHandler` | Post a temperature update application event when the sensor timer expires. | -| `TemperatureUpdateEventHandlerImpl` | `TemperatureUpdateEventHandler` | Sample temperature and update the Thermostat `LocalTemperature` attribute. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handle Thermostat changes and observe Identify changes. | -| `DMThermostatClusterInitImpl` | `DMThermostatClusterInit` | Install the default Thermostat delegate for an endpoint. | +| `AppInitImpl` | `AppInit` | Registers the button callback, sets the LCD UI, and initializes the thermostat. | +| `InitThermostatImpl` | `InitThermostat` | Initializes the sensor, UI, and periodic temperature sampling. | +| `InitSensorImpl` | `InitSensor` | Initializes the hardware temperature sensor when present. | +| `GetTemperatureImpl` | `GetTemperature` | Reads the Si70xx sensor when present, otherwise supplies a simulated temperature. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function button events to the base application handler. | +| `SensorTimerEventHandlerImpl` | `SensorTimerEventHandler` | Posts a temperature update application event when the sensor timer expires. | +| `TemperatureUpdateEventHandlerImpl` | `TemperatureUpdateEventHandler` | Samples temperature and updates the Thermostat `LocalTemperature` attribute. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handles Thermostat changes and observes Identify changes. | +| `DMThermostatClusterInitImpl` | `DMThermostatClusterInit` | Installs the default Thermostat delegate for an endpoint. | From 5dcf8c895fa1af0c8a6748d4c6fc4ea8594c9aba Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Fri, 18 Sep 2026 07:13:35 -0400 Subject: [PATCH 04/12] Apply batched suggestions from code review Co-authored-by: silabs-BhoomikaB --- sld295-matter-api-reference/base-platform-app.md | 6 +++--- sld295-matter-api-reference/closure-app.md | 4 ++-- sld295-matter-api-reference/evse-app.md | 2 +- sld295-matter-api-reference/fan-control-app.md | 4 ++-- sld295-matter-api-reference/index.md | 12 +++++++----- sld295-matter-api-reference/lighting-app.md | 2 +- sld295-matter-api-reference/lock-app.md | 2 +- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/sld295-matter-api-reference/base-platform-app.md b/sld295-matter-api-reference/base-platform-app.md index a2789c1..85b3257 100644 --- a/sld295-matter-api-reference/base-platform-app.md +++ b/sld295-matter-api-reference/base-platform-app.md @@ -7,9 +7,9 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | Override | Public API | Default behavior | |---|---|---| | `AppInitImpl` | `AppInit` | Registers the button callback, initializes the LED, and shows the demo UI or QR code when enabled. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes user action button events to `ApplicationEventHandler` and function button events to the base application handler. | -| `ApplicationEventHandlerImpl` | `ApplicationEventHandler` | Toggles the LED for a user action button press. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes user-action button events to `ApplicationEventHandler` and function-button events to the base application handler. | +| `ApplicationEventHandlerImpl` | `ApplicationEventHandler` | Toggles the LED when the user-action button is pressed. | | `OnEnterActiveModeImpl` | `OnEnterActiveMode` | Updates the demo UI when the ICD server enters active mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | | `OnEnterIdleModeImpl` | `OnEnterIdleMode` | Updates the demo UI when the ICD server enters idle mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | | `OnTransitionToIdleImpl` | `OnTransitionToIdle` | Logs the transition while the ICD server moves to idle mode. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | -| `OnICDModeChangeImpl` | `OnICDModeChange` | Logs the change between SIT and LIT operating modes. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | +| `OnICDModeChangeImpl` | `OnICDModeChange` | Logs changes between Short Idle Time (SIT) and Long Idle Time (LIT) operating modes. Available when `CHIP_CONFIG_ENABLE_ICD_SERVER` is enabled. | diff --git a/sld295-matter-api-reference/closure-app.md b/sld295-matter-api-reference/closure-app.md index 5401204..de5feee 100644 --- a/sld295-matter-api-reference/closure-app.md +++ b/sld295-matter-api-reference/closure-app.md @@ -8,14 +8,14 @@ To override any of the following AppTask hooks, declare the corresponding `*Impl |---|---|---| | `AppInitImpl` | `AppInit` | Registers the button callback, initializes the display, and initializes Closure Manager. | | `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes closure button presses to `ClosureButtonActionEventHandler` and function button events to the base application handler. | -| `ClosureButtonActionEventHandlerImpl` | `ClosureButtonActionEventHandler` | Stops motion if a closure action is in progress, otherwise starts a MoveTo toward the opposite position. | +| `ClosureButtonActionEventHandlerImpl` | `ClosureButtonActionEventHandler` | Stops motion if a closure action is in progress; otherwise, it starts a MoveTo toward the opposite position. | | `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Logs Identify attribute changes. | | `DMClosureControlClusterAttributeChangedCallbackImpl` | `DMClosureControlClusterAttributeChangedCallback` | Refreshes the UI when Closure Control `MainState` or `OverallCurrentState` changes. | | `DMClosureDimensionClusterAttributeChangedCallbackImpl` | `DMClosureDimensionClusterAttributeChangedCallback` | Logs Closure Dimension attribute changes. | ## ClosureManager -These APIs use the Closure app's separate manager override chain. Declare and +These APIs use the Closure app's separate manager override chain. Declare and implement the corresponding `*Impl()` methods in `CustomerAppManager`, which derives from `ClosureManagerImpl`. Use `autogen/ClosureManagerImpl.h` for exact signatures. Do not place these overrides in `CustomerAppTask`. implement the corresponding `*Impl()` methods in `CustomerAppManager`, which derives from `ClosureManagerImpl`. Use `autogen/ClosureManagerImpl.h` for exact signatures. Do not place these diff --git a/sld295-matter-api-reference/evse-app.md b/sld295-matter-api-reference/evse-app.md index 2e68260..c1bb845 100644 --- a/sld295-matter-api-reference/evse-app.md +++ b/sld295-matter-api-reference/evse-app.md @@ -9,4 +9,4 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | `AppInitImpl` | `AppInit` | Registers the button callback, runs `ApplicationInit`, and registers EVSE test event triggers when enabled. | | `ApplicationInitImpl` | `ApplicationInit` | Initializes the EVSE application and energy management LED. | | `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes EVSE control button presses to `EnergyManagementActionEventHandler` and function button events to the base application handler. | -| `EnergyManagementActionEventHandlerImpl` | `EnergyManagementActionEventHandler` | Logs the control button event. The default does not start a charging action. | +| `EnergyManagementActionEventHandlerImpl` | `EnergyManagementActionEventHandler` | Logs the control button event. By default, the handler does not start a charging action. | diff --git a/sld295-matter-api-reference/fan-control-app.md b/sld295-matter-api-reference/fan-control-app.md index ed9b1f6..abae910 100644 --- a/sld295-matter-api-reference/fan-control-app.md +++ b/sld295-matter-api-reference/fan-control-app.md @@ -11,8 +11,8 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | `HandleStepImpl` | `HandleStep` | Handles a Fan Control Step command by updating speed or percentage settings. | | `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function button events to the base application handler. | | `FanUiUpdateEventHandlerImpl` | `FanUiUpdateEventHandler` | Updates the fan LED and, when enabled, the display. | -| `HandleFanModeChangeImpl` | `HandleFanModeChange` | Synchronizes speed and percentage settings after a FanMode change. | +| `HandleFanModeChangeImpl` | `HandleFanModeChange` | Synchronizes speed and percentage settings after a change to FanMode. | | `DeriveFanModeFromPercentImpl` | `DeriveFanModeFromPercent` | Maps PercentSetting to Off, Low, Medium, or High fan mode. | | `HandlePercentSettingChangeImpl` | `HandlePercentSettingChange` | Updates PercentCurrent after PercentSetting changes. | | `HandleSpeedSettingChangeImpl` | `HandleSpeedSettingChange` | Updates SpeedCurrent after SpeedSetting changes. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Applies Fan Control PercentSetting, SpeedSetting, and FanMode changes, and logs Identify changes. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Applies changes to the Fan Control PercentSetting, SpeedSetting, and FanMode attributes and logs Identify changes. | diff --git a/sld295-matter-api-reference/index.md b/sld295-matter-api-reference/index.md index 76cc4d8..a67d418 100644 --- a/sld295-matter-api-reference/index.md +++ b/sld295-matter-api-reference/index.md @@ -4,7 +4,7 @@ Use this reference to find the application customization APIs available in a Silicon Labs Matter application. The available APIs depend on the application and its configuration. -Most APIs below are exposed through the generated `AppTask` interface. To +Most **of the following** APIs are exposed through the generated `AppTask` interface. To customize those APIs, derive `CustomerAppTask` from the generated implementation and override the corresponding `*Impl()` hook. The Closure app also exposes `ClosureManager` APIs through a separate `CustomerAppManager` override chain. See [Extending Base App Implementation](#extending-base-app-implementation) for the implementation workflow. customize those APIs, derive `CustomerAppTask` from the generated implementation and override the corresponding `*Impl()` hook. The Closure app also exposes `ClosureManager` APIs through a separate `CustomerAppManager` override chain. @@ -37,7 +37,9 @@ a `*Impl()` method: 2. Declare the same method signature in `CustomerAppTask.h` under the `private:` section. Match the base `*Impl()` signature exactly. 3. Implement the method in `CustomerAppTask.cpp`. -4. Build the project. If you implement the corresponding `*Impl()` method in +4. Build the project. + +If you implement the corresponding `*Impl()` method in `CustomerAppTask`, the application uses your implementation. Otherwise, it uses the Silicon Labs default implementation. All other methods automatically use their default implementations. `CustomerAppTask`, your implementation is used. Otherwise, the Silicon Labs default implementation is used. You only need to implement the methods that you want to customize. All other methods automatically use the default @@ -56,7 +58,7 @@ implementation. ### DataModelCallbacks and CustomerAppTask -What used to live in `DataModelCallbacks.cpp` before Matter Extension 2.9.1 +Code that previously resided in `DataModelCallbacks.cpp` before Matter Extension 2.9.1 now resides in `AppTask.cpp`. The Matter SDK's `MatterPostAttributeChangeCallback` is implemented in `examples/platform/silabs/BaseApplication.cpp` and forwards to `AppTask::DMPostAttributeChangeCallback`, which is defined in `AppTask.cpp`. You can customize this callback by overriding `DMPostAttributeChangeCallbackImpl()` in `CustomerAppTask`. now lives in `AppTask.cpp`. The Matter SDK's `MatterPostAttributeChangeCallback` is implemented in `examples/platform/silabs/BaseApplication.cpp` and forwards to @@ -76,7 +78,7 @@ Forwarding into `AppTask` still goes through CRTP as described in ### Sample Implementation -The following shows a minimal example `CustomerAppTask` that overrides +The following example shows a minimal `CustomerAppTask` that overrides `AppInitImpl()` and `ButtonEventHandlerImpl()` from the lighting app implementation. @@ -158,7 +160,7 @@ void CustomerAppTask::ButtonEventHandlerImpl(uint8_t button, uint8_t btnAction) ### Override API Reference -The base API and implementation are generated into the `autogen/` directory. +The base API and implementation files are generated in the `autogen/` directory. These files are regenerated whenever you upgrade the project to match the installed SDK version. Use them as a reference for overridable methods and app configuration. The app-specific pages in the following list describe each `*Impl()` override, its public API, and the default behavior. These files are regenerated whenever you upgrade the project and match the installed SDK version. Use them as a reference for overridable methods and app configuration. The app-specific pages below list each `*Impl()` override, its diff --git a/sld295-matter-api-reference/lighting-app.md b/sld295-matter-api-reference/lighting-app.md index 02561c0..146db6e 100644 --- a/sld295-matter-api-reference/lighting-app.md +++ b/sld295-matter-api-reference/lighting-app.md @@ -7,7 +7,7 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | Override | Public API | Default behavior | |---|---|---| | `AppInitImpl` | `AppInit` | Registers the button callback, initializes the light, LED, and display. | -| `InitLightImpl` | `InitLight` | Creates the off effect timer and loads OnOff (and RGB color attributes when enabled) from cluster state. | +| `InitLightImpl` | `InitLight` | Creates the off-effect timer and loads the OnOff attribute and, when enabled, the RGB color attributes from the cluster state. | | `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes light action and function button events. | | `OnTriggerOffWithEffectImpl` | `OnTriggerOffWithEffect` | Selects and starts the timer for an OffWithEffect command. | | `LightActionEventHandlerImpl` | `LightActionEventHandler` | Toggles the light for a button event and synchronizes the OnOff attribute. | diff --git a/sld295-matter-api-reference/lock-app.md b/sld295-matter-api-reference/lock-app.md index 1c5b446..10e6604 100644 --- a/sld295-matter-api-reference/lock-app.md +++ b/sld295-matter-api-reference/lock-app.md @@ -6,7 +6,7 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the lock, and syncs the Door Lock cluster state. | +| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the lock, and synchronizes the Door Lock cluster state. | | `InitLockImpl` | `InitLock` | Initializes lock state, credential storage, actuator timers, and the Door Lock server. | | `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes lock action and function button events. | | `LockButtonActionHandlerImpl` | `LockButtonActionHandler` | Converts a lock button press into a lock or unlock action. | From 7f9f705aba0cbc76960eef3d96ecc0d9bd3b7f28 Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Fri, 18 Sep 2026 07:18:12 -0400 Subject: [PATCH 05/12] Update sld295-matter-api-reference/air-quality-sensor-app.md Co-authored-by: silabs-BhoomikaB --- sld295-matter-api-reference/air-quality-sensor-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sld295-matter-api-reference/air-quality-sensor-app.md b/sld295-matter-api-reference/air-quality-sensor-app.md index d404356..547e39a 100644 --- a/sld295-matter-api-reference/air-quality-sensor-app.md +++ b/sld295-matter-api-reference/air-quality-sensor-app.md @@ -8,7 +8,7 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth |---|---|---| | `AppInitImpl` | `AppInit` | Registers the button callback, configures the LCD UI, and initializes the air quality sensor. | | `InitAirQualitySensorImpl` | `InitAirQualitySensor` | Creates the periodic sensor timer, initializes the sensor hardware when available, and starts sampling. | -| GetAirQualityValueImpl | GetAirQualityValue | Reads the value from the onboard air quality sensor. If the sensor is unavailable, returns a simulated value. | +| `GetAirQualityValueImpl` | `GetAirQualityValue` | Reads the value from the onboard air quality sensor. If the sensor is unavailable, returns a simulated value. | | `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function-button events to the base application handler. | | `SensorTimerEventHandlerImpl` | `SensorTimerEventHandler` | Reads the sensor value and schedules an update to the Air Quality attribute. | | `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Logs changes to the Identify attribute. | From 43e287a13f3022845c218552de51025eccdfdccc Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Fri, 18 Sep 2026 07:20:00 -0400 Subject: [PATCH 06/12] fix formatting issues from batch application --- sld295-matter-api-reference/closure-app.md | 2 +- sld295-matter-api-reference/index.md | 38 +++++++++++----------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sld295-matter-api-reference/closure-app.md b/sld295-matter-api-reference/closure-app.md index de5feee..00341c0 100644 --- a/sld295-matter-api-reference/closure-app.md +++ b/sld295-matter-api-reference/closure-app.md @@ -15,7 +15,7 @@ To override any of the following AppTask hooks, declare the corresponding `*Impl ## ClosureManager -These APIs use the Closure app's separate manager override chain. Declare and implement the corresponding `*Impl()` methods in `CustomerAppManager`, which derives from `ClosureManagerImpl`. Use `autogen/ClosureManagerImpl.h` for exact signatures. Do not place these overrides in `CustomerAppTask`. +These APIs use the Closure app's separate manager override chain. Declare and implement the corresponding `*Impl()` methods in `CustomerAppManager`, which derives from `ClosureManagerImpl`. Use `autogen/ClosureManagerImpl.h` for exact signatures. Do not place these diff --git a/sld295-matter-api-reference/index.md b/sld295-matter-api-reference/index.md index a67d418..3eafe7a 100644 --- a/sld295-matter-api-reference/index.md +++ b/sld295-matter-api-reference/index.md @@ -4,12 +4,12 @@ Use this reference to find the application customization APIs available in a Silicon Labs Matter application. The available APIs depend on the application and its configuration. -Most **of the following** APIs are exposed through the generated `AppTask` interface. To customize those APIs, derive `CustomerAppTask` from the generated implementation and override the corresponding `*Impl()` hook. The Closure app also exposes `ClosureManager` APIs through a separate `CustomerAppManager` override chain. See [Extending Base App Implementation](#extending-base-app-implementation) for the implementation workflow. -customize those APIs, derive `CustomerAppTask` from the generated implementation -and override the corresponding `*Impl()` hook. The Closure app also exposes -`ClosureManager` APIs through a separate `CustomerAppManager` override chain. -See [Extending Base App Implementation](#extending-base-app-implementation) for -the implementation workflow. +Most **of the following** APIs are exposed through the generated `AppTask` +interface. To customize those APIs, derive `CustomerAppTask` from the generated +implementation and override the corresponding `*Impl()` hook. The Closure app +also exposes `ClosureManager` APIs through a separate `CustomerAppManager` +override chain. See [Extending Base App Implementation](#extending-base-app-implementation) +for the implementation workflow. Use `autogen/AppTaskImpl.h` in your project for the complete `AppTask` signatures. For Closure Manager APIs, use `autogen/ClosureManagerImpl.h`. The app-specific @@ -39,11 +39,10 @@ a `*Impl()` method: 3. Implement the method in `CustomerAppTask.cpp`. 4. Build the project. -If you implement the corresponding `*Impl()` method in `CustomerAppTask`, the application uses your implementation. Otherwise, it uses the Silicon Labs default implementation. All other methods automatically use their default implementations. - `CustomerAppTask`, your implementation is used. Otherwise, the Silicon Labs - default implementation is used. You only need to implement the methods that - you want to customize. All other methods automatically use the default - implementation. +If you implement the corresponding `*Impl()` method in `CustomerAppTask`, the +application uses your implementation. Otherwise, it uses the Silicon Labs +default implementation. All other methods automatically use their default +implementations. ### ClosureManager and CustomerAppManager @@ -58,12 +57,13 @@ implementation. ### DataModelCallbacks and CustomerAppTask -Code that previously resided in `DataModelCallbacks.cpp` before Matter Extension 2.9.1 now resides in `AppTask.cpp`. The Matter SDK's `MatterPostAttributeChangeCallback` is implemented in `examples/platform/silabs/BaseApplication.cpp` and forwards to `AppTask::DMPostAttributeChangeCallback`, which is defined in `AppTask.cpp`. You can customize this callback by overriding `DMPostAttributeChangeCallbackImpl()` in `CustomerAppTask`. -now lives in `AppTask.cpp`. The Matter SDK's +Code that previously resided in `DataModelCallbacks.cpp` before Matter +Extension 2.9.1 now resides in `AppTask.cpp`. The Matter SDK's `MatterPostAttributeChangeCallback` is implemented in `examples/platform/silabs/BaseApplication.cpp` and forwards to -`AppTask::DMPostAttributeChangeCallback` (defined in `AppTask.cpp`), which you -can customize via `DMPostAttributeChangeCallbackImpl()` in `CustomerAppTask`. +`AppTask::DMPostAttributeChangeCallback`, which is defined in `AppTask.cpp`. +You can customize this callback by overriding +`DMPostAttributeChangeCallbackImpl()` in `CustomerAppTask`. Forwarding into `AppTask` still goes through CRTP as described in [How to Override APIs](#how-to-override-apis). @@ -160,11 +160,11 @@ void CustomerAppTask::ButtonEventHandlerImpl(uint8_t button, uint8_t btnAction) ### Override API Reference -The base API and implementation files are generated in the `autogen/` directory. These files are regenerated whenever you upgrade the project to match the installed SDK version. Use them as a reference for overridable methods and app configuration. The app-specific pages in the following list describe each `*Impl()` override, its public API, and the default behavior. -These files are regenerated whenever you upgrade the project and match the +The base API and implementation files are generated in the `autogen/` directory. +These files are regenerated whenever you upgrade the project to match the installed SDK version. Use them as a reference for overridable methods and app -configuration. The app-specific pages below list each `*Impl()` override, its -public API, and the default behavior. +configuration. The app-specific pages in the following list describe each +`*Impl()` override, its public API, and the default behavior. | File | Purpose | |------|--------| From 688f2d2cff526c13aa29d566d9d895456c3c3bd2 Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Fri, 18 Sep 2026 07:24:35 -0400 Subject: [PATCH 07/12] Apply batched suggestions from code review Co-authored-by: silabs-BhoomikaB --- sld295-matter-api-reference/lock-app.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sld295-matter-api-reference/lock-app.md b/sld295-matter-api-reference/lock-app.md index 10e6604..4b812c6 100644 --- a/sld295-matter-api-reference/lock-app.md +++ b/sld295-matter-api-reference/lock-app.md @@ -7,11 +7,11 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | Override | Public API | Default behavior | |---|---|---| | `AppInitImpl` | `AppInit` | Registers the button callback, initializes the lock, and synchronizes the Door Lock cluster state. | -| `InitLockImpl` | `InitLock` | Initializes lock state, credential storage, actuator timers, and the Door Lock server. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes lock action and function button events. | -| `LockButtonActionHandlerImpl` | `LockButtonActionHandler` | Converts a lock button press into a lock or unlock action. | +| `InitLockImpl` | `InitLock` | Initializes the lock state, credential storage, actuator timers, and the Door Lock server. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes lock-action and function-button events. | +| `LockButtonActionHandlerImpl` | `LockButtonActionHandler` | Converts a lock-button press into a lock or unlock action. | | `UnlatchCallbackImpl` | `UnlatchCallback` | Schedules the transition from the unlatched state to the unlocked state when the unlatch timer expires. | -| `ActuatorMovementEventHandlerImpl` | `ActuatorMovementEventHandler` | Completes actuator motion, updates the Door Lock state, and processes a pending request. | +| `ActuatorMovementEventHandlerImpl` | `ActuatorMovementEventHandler` | Completes the actuator movement, updates the Door Lock state, and processes any pending request. | | `LockActionEventHandlerImpl` | `LockActionEventHandler` | Starts the lock, unlock, or unlatch action carried by an application event. | | `LockRequestEventHandlerImpl` | `LockRequestEventHandler` | Drains a staged Door Lock request and passes it to the application task. | | `HandleLockRequestOnAppTaskImpl` | `HandleLockRequestOnAppTask` | Queues, completes, or starts a Door Lock request according to actuator state. | From a6cef782d70ff12993ac568c4de608350ef84189 Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Fri, 18 Sep 2026 09:02:58 -0400 Subject: [PATCH 08/12] Apply batched suggestions from code review Co-authored-by: silabs-BhoomikaB --- sld295-matter-api-reference/lock-app.md | 6 +++--- sld295-matter-api-reference/multi-sensor-app.md | 10 +++++----- sld295-matter-api-reference/onoff-plug-app.md | 6 +++--- sld295-matter-api-reference/oven-app.md | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sld295-matter-api-reference/lock-app.md b/sld295-matter-api-reference/lock-app.md index 4b812c6..072ec99 100644 --- a/sld295-matter-api-reference/lock-app.md +++ b/sld295-matter-api-reference/lock-app.md @@ -15,7 +15,7 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | `LockActionEventHandlerImpl` | `LockActionEventHandler` | Starts the lock, unlock, or unlatch action carried by an application event. | | `LockRequestEventHandlerImpl` | `LockRequestEventHandler` | Drains a staged Door Lock request and passes it to the application task. | | `HandleLockRequestOnAppTaskImpl` | `HandleLockRequestOnAppTask` | Queues, completes, or starts a Door Lock request according to actuator state. | -| `UnlockAfterUnlatchImpl` | `UnlockAfterUnlatch` | Changes an unlatched lock to unlocked and stages the unlock request. | +| `UnlockAfterUnlatchImpl` | `UnlockAfterUnlatch` | Changes an unlatched lock to the unlocked state and stages an unlock request. | | `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Responds to Door Lock `LockState` attribute changes. | | `DMDoorLockOnDoorLockCommandImpl` | `DMDoorLockOnDoorLockCommand` | Validates a Lock command and stages a request for the locked state. | | `DMDoorLockOnDoorUnlockCommandImpl` | `DMDoorLockOnDoorUnlockCommand` | Validates an Unlock command and stages an unlock or unlatch request, depending on Unbolt support. | @@ -26,8 +26,8 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | `DMDoorLockSetUserImpl` | `DMDoorLockSetUser` | Persists user data for the Door Lock server. | | `DMDoorLockGetWeekDayScheduleImpl` | `DMDoorLockGetWeekDaySchedule` | Retrieves a user's weekday schedule. | | `DMDoorLockSetWeekDayScheduleImpl` | `DMDoorLockSetWeekDaySchedule` | Persists a user's weekday schedule. | -| `DMDoorLockGetYearDayScheduleImpl` | `DMDoorLockGetYearDaySchedule` | Retrieves a user's year day schedule. | -| `DMDoorLockSetYearDayScheduleImpl` | `DMDoorLockSetYearDaySchedule` | Persists a user's year day schedule. | +| `DMDoorLockGetYearDayScheduleImpl` | `DMDoorLockGetYearDaySchedule` | Retrieves a user's year-day schedule. | +| `DMDoorLockSetYearDayScheduleImpl` | `DMDoorLockSetYearDaySchedule` | Persists a user's year-day schedule. | | `DMDoorLockGetHolidayScheduleImpl` | `DMDoorLockGetHolidaySchedule` | Retrieves a holiday schedule. | | `DMDoorLockSetHolidayScheduleImpl` | `DMDoorLockSetHolidaySchedule` | Persists a holiday schedule. | | `DMDoorLockOnAutoRelockImpl` | `DMDoorLockOnAutoRelock` | Starts a lock action when automatic relocking occurs. | diff --git a/sld295-matter-api-reference/multi-sensor-app.md b/sld295-matter-api-reference/multi-sensor-app.md index 02f4c52..5ce5882 100644 --- a/sld295-matter-api-reference/multi-sensor-app.md +++ b/sld295-matter-api-reference/multi-sensor-app.md @@ -7,12 +7,12 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | Override | Public API | Default behavior | |---|---|---| | `AppInitImpl` | `AppInit` | Registers the button callback, initializes the occupancy LED and display, and starts the sensor manager. | -| `InitSensorManagerImpl` | `InitSensorManager` | Initializes sensor clusters, registers the attribute listener, and schedules periodic sampling. | -| `GetTemperatureAndHumidityImpl` | `GetTemperatureAndHumidity` | Reads the Si70xx sensor when present, otherwise supplies simulated temperature and humidity values. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function button events and occupancy toggle button events. | +| `InitSensorManagerImpl` | `InitSensorManager` | Initializes the sensor clusters, registers the attribute listener, and schedules periodic sampling. | +| `GetTemperatureAndHumidityImpl` | `GetTemperatureAndHumidity` | Reads the Si70xx sensor if it is present; otherwise, provides simulated temperature and humidity values. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes events from the function and occupancy-toggle buttons. | | `ProcessButtonEventImpl` | `ProcessButtonEvent` | Toggles the Occupancy attribute for an application button event. | | `TriggerSensorActionImpl` | `TriggerSensorAction` | Samples temperature and humidity and updates their measured value attributes. | -| `OccupancyAttributeUpdateEventImpl` | `OccupancyAttributeUpdateEvent` | Updates the occupancy LED and display after an Occupancy change. | +| `OccupancyAttributeUpdateEventImpl` | `OccupancyAttributeUpdateEvent` | Updates the occupancy LED and display after the Occupancy attribute changes. | | `SensorAttributeUpdateEventImpl` | `SensorAttributeUpdateEvent` | Updates the display after a temperature or humidity change. | -| `OnAttributeChangedImpl` | `OnAttributeChanged` | Translates Occupancy, Temperature Measurement, and Relative Humidity Measurement changes into application events. | +| `OnAttributeChangedImpl` | `OnAttributeChanged` | Converts Occupancy, Temperature Measurement, and Relative Humidity Measurement changes into application events. | | `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Logs Identify attribute changes. | diff --git a/sld295-matter-api-reference/onoff-plug-app.md b/sld295-matter-api-reference/onoff-plug-app.md index a9fa99e..7fbe79a 100644 --- a/sld295-matter-api-reference/onoff-plug-app.md +++ b/sld295-matter-api-reference/onoff-plug-app.md @@ -6,8 +6,8 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the plug, LED, and display. | -| `InitPlugImpl` | `InitPlug` | Reads the OnOff attribute into the plug on/off state. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes plug action and function button events. | +| `AppInitImpl` | `AppInit` | Registers the button callback and initializes the plug, LED, and display. | +| `InitPlugImpl` | `InitPlug` | Reads the OnOff attribute into the plug On/Off state. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes plug-action and function-button events. | | `OnOffActionEventHandlerImpl` | `OnOffActionEventHandler` | Toggles the plug and synchronizes its OnOff attribute for a button event. | | `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handles OnOff, Level Control, and Identify attribute changes. | diff --git a/sld295-matter-api-reference/oven-app.md b/sld295-matter-api-reference/oven-app.md index 7543bea..9215a4d 100644 --- a/sld295-matter-api-reference/oven-app.md +++ b/sld295-matter-api-reference/oven-app.md @@ -6,11 +6,11 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | Override | Public API | Default behavior | |---|---|---| -| `AppInitImpl` | `AppInit` | Registers the button callback, initializes the oven, connectivity handler, cooktop LED, and display. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes oven action and function button events. | +| `AppInitImpl` | `AppInit` | Registers the button callback and initializes the oven, connectivity handler, cooktop LED, and display. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes oven-action and function-button events. | | `OvenButtonHandlerImpl` | `OvenButtonHandler` | Converts an oven button press into a cooktop on/off action. | | `OvenActionHandlerImpl` | `OvenActionHandler` | Applies an oven or cooktop action and updates the application UI. | -| `ConnectivityEventHandlerImpl` | `ConnectivityEventHandler` | Propagates the cooktop off state after DNS-SD initializes. | +| `ConnectivityEventHandlerImpl` | `ConnectivityEventHandler` | Propagates the cooktop off state after DNS-SD initialization completes. | | `InitBindingHandlerImpl` | `InitBindingHandler` | Initializes the Binding Manager and registers its command and context release handlers. | | `CookTopBindingPropagateStateImpl` | `CookTopBindingPropagateState` | Notifies bound OnOff and Fan Control clusters of the cooktop state. | | `BoundDeviceChangedHandlerImpl` | `BoundDeviceChangedHandler` | Writes the pending cooktop state to a matching bound OnOff or Fan Control peer. | From ef658ff90f7460a10327bd315e39bbb92821dc4a Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Fri, 18 Sep 2026 13:04:49 -0400 Subject: [PATCH 09/12] Apply batched suggestions from code review Co-authored-by: silabs-BhoomikaB --- sld295-matter-api-reference/oven-app.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sld295-matter-api-reference/oven-app.md b/sld295-matter-api-reference/oven-app.md index 9215a4d..ed0358a 100644 --- a/sld295-matter-api-reference/oven-app.md +++ b/sld295-matter-api-reference/oven-app.md @@ -15,9 +15,9 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | `CookTopBindingPropagateStateImpl` | `CookTopBindingPropagateState` | Notifies bound OnOff and Fan Control clusters of the cooktop state. | | `BoundDeviceChangedHandlerImpl` | `BoundDeviceChangedHandler` | Writes the pending cooktop state to a matching bound OnOff or Fan Control peer. | | `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Routes OnOff changes and observes Temperature Control and Identify changes. | -| `OnAttributeChangedImpl` | `OnAttributeChanged` | Translates an Oven Mode `CurrentMode` change into an application event. | -| `DMOvenModeClusterInitCallbackImpl` | `DMOvenModeClusterInitCallback` | No default application logic. The Oven Mode cluster init callback does nothing. | +| `OnAttributeChangedImpl` | `OnAttributeChanged` | Converts an Oven Mode `CurrentMode` change into an application event. | +| `DMOvenModeClusterInitCallbackImpl` | `DMOvenModeClusterInitCallback` | Performs no application-specific action by default. | | `DMOvenModeClusterShutdownCallbackImpl` | `DMOvenModeClusterShutdownCallback` | No default application logic. The Oven Mode cluster shutdown callback does nothing. | -| `InitOvenImpl` | `InitOven` | Initializes oven endpoints, delegates, binding, supported levels, and initial cluster state. | -| `OnOffAttributeChangeHandlerImpl` | `OnOffAttributeChangeHandler` | Synchronizes cooktop and cooking surface state after an OnOff change. | -| `IsTransitionBlockedImpl` | `IsTransitionBlocked` | Returns true when the requested Oven Mode transition is in the blocked transition list. | +| `InitOvenImpl` | `InitOven` | Initializes the oven endpoints, delegates, binding, supported levels, and initial cluster state. | +| `OnOffAttributeChangeHandlerImpl` | `OnOffAttributeChangeHandler` | Synchronizes the cooktop and cooking-surface states after a change to the OnOff attribute. | +| `IsTransitionBlockedImpl` | `IsTransitionBlocked` | Returns true if the requested Oven Mode transition is in the blocked-transition list. | From 5adfc9d9b3ed6abda0bafbdfd7eaccda9906f47f Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Fri, 18 Sep 2026 15:45:14 -0400 Subject: [PATCH 10/12] apply review comment --- sld295-matter-api-reference/oven-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sld295-matter-api-reference/oven-app.md b/sld295-matter-api-reference/oven-app.md index ed0358a..84ee379 100644 --- a/sld295-matter-api-reference/oven-app.md +++ b/sld295-matter-api-reference/oven-app.md @@ -17,7 +17,7 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Routes OnOff changes and observes Temperature Control and Identify changes. | | `OnAttributeChangedImpl` | `OnAttributeChanged` | Converts an Oven Mode `CurrentMode` change into an application event. | | `DMOvenModeClusterInitCallbackImpl` | `DMOvenModeClusterInitCallback` | Performs no application-specific action by default. | -| `DMOvenModeClusterShutdownCallbackImpl` | `DMOvenModeClusterShutdownCallback` | No default application logic. The Oven Mode cluster shutdown callback does nothing. | +| `DMOvenModeClusterShutdownCallbackImpl` | `DMOvenModeClusterShutdownCallback` | Performs no application-specific action by default. | | `InitOvenImpl` | `InitOven` | Initializes the oven endpoints, delegates, binding, supported levels, and initial cluster state. | | `OnOffAttributeChangeHandlerImpl` | `OnOffAttributeChangeHandler` | Synchronizes the cooktop and cooking-surface states after a change to the OnOff attribute. | | `IsTransitionBlockedImpl` | `IsTransitionBlocked` | Returns true if the requested Oven Mode transition is in the blocked-transition list. | From 71e86032574b248adfbea4a38ec6ab419175d9dc Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Mon, 21 Sep 2026 07:16:30 -0400 Subject: [PATCH 11/12] Apply batched suggestions from code review Co-authored-by: silabs-BhoomikaB --- sld295-matter-api-reference/rangehood-app.md | 10 +++++----- .../refrigerator-app.md | 20 +++++++++---------- sld295-matter-api-reference/thermostat-app.md | 14 ++++++------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sld295-matter-api-reference/rangehood-app.md b/sld295-matter-api-reference/rangehood-app.md index bd5cacd..3c9d702 100644 --- a/sld295-matter-api-reference/rangehood-app.md +++ b/sld295-matter-api-reference/rangehood-app.md @@ -7,8 +7,8 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | Override | Public API | Default behavior | |---|---|---| | `AppInitImpl` | `AppInit` | Registers the button callback, initializes the rangehood, and updates the display. | -| `InitRangeHoodImpl` | `InitRangeHood` | Initializes the extractor hood endpoint and light LED from cluster state. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes fan control and function button events. | -| `ActionTriggerHandlerImpl` | `ActionTriggerHandler` | Applies light on/off actions and refreshes the UI for fan mode changes. | -| `FanControlButtonHandlerImpl` | `FanControlButtonHandler` | Toggles the fan mode for a button press. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Routes Fan Control and OnOff changes and observes Identify changes. | +| `InitRangeHoodImpl` | `InitRangeHood` | Initializes the extractor hood endpoint and sets the light LED based on the cluster state. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes fan-control and function-button events. | +| `ActionTriggerHandlerImpl` | `ActionTriggerHandler` | Applies light on/off actions and refreshes the UI when the fan mode changes. | +| `FanControlButtonHandlerImpl` | `FanControlButtonHandler` | Toggles the fan mode in response to a button press. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Routes attribute changes from the Fan Control and On/Off clusters and monitors attribute changes from the Identify cluster. | diff --git a/sld295-matter-api-reference/refrigerator-app.md b/sld295-matter-api-reference/refrigerator-app.md index 88c7f5e..06cfa83 100644 --- a/sld295-matter-api-reference/refrigerator-app.md +++ b/sld295-matter-api-reference/refrigerator-app.md @@ -1,6 +1,6 @@ # Refrigerator Application Override APIs -To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches the declaration in `autogen/AppTaskImpl.h`. The public `Init()` method maps to +To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches its declaration in `autogen/AppTaskImpl.h`. The public `Init()` method maps to `CabinetModeInitImpl()` rather than `InitImpl()`. `CabinetModeInitImpl()`, not `InitImpl()`. ## AppTask @@ -8,12 +8,12 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth | Override | Public API | Default behavior | |---|---|---| | `AppInitImpl` | `AppInit` | Registers the button callback and initializes the refrigerator. | -| `InitRefrigeratorImpl` | `InitRefrigerator` | Configures refrigerator endpoint composition, semantic tags, and the Temperature Control delegate. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function button events to the base application handler. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handles Refrigerator Alarm and Temperature Control changes and observes Identify changes. | -| `CabinetModeClusterInitImpl` | `CabinetModeClusterInit` | Constructs and initializes the `ModeBase::Instance` for the Cabinet Mode cluster on the refrigerator endpoint. | -| `CabinetModeInitImpl` | `Init` | Returns success. The Cabinet Mode delegate has no additional default initialization. | -| `HandleChangeToModeImpl` | `HandleChangeToMode` | Accepts the requested Cabinet Mode, except a direct transition between Normal and Rapid Freeze. | -| `GetModeLabelByIndexImpl` | `GetModeLabelByIndex` | Returns the supported Cabinet Mode label at the given index. | -| `GetModeValueByIndexImpl` | `GetModeValueByIndex` | Returns the supported Cabinet Mode value at the given index. | -| `GetModeTagsByIndexImpl` | `GetModeTagsByIndex` | Returns the semantic tags for the supported Cabinet Mode at the given index. | +| `InitRefrigeratorImpl` | `InitRefrigerator` | Configures the refrigerator endpoint composition and semantic tags, and initializes the Temperature Control delegate. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function-button events to the base application handler. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handles attribute changes from the Refrigerator Alarm and Temperature Control clusters and monitors attribute changes from the Identify cluster. | +| `CabinetModeClusterInitImpl` | `CabinetModeClusterInit` | Constructs and initializes a `ModeBase::Instance` for the Cabinet Mode cluster on the refrigerator endpoint. | +| `CabinetModeInitImpl` | `Init` | Returns a success status. The Cabinet Mode delegate requires no additional initialization by default. | +| `HandleChangeToModeImpl` | `HandleChangeToMode` | Accepts the requested Cabinet Mode unless the request is for a direct transition between Normal and Rapid Freeze. | +| `GetModeLabelByIndexImpl` | `GetModeLabelByIndex` | Returns the supported Cabinet Mode label at the specified index. | +| `GetModeValueByIndexImpl` | `GetModeValueByIndex` | Returns the supported Cabinet Mode value at the specified index. | +| `GetModeTagsByIndexImpl` | `GetModeTagsByIndex` | Returns the semantic tags associated with the supported Cabinet Mode at the specified index. | diff --git a/sld295-matter-api-reference/thermostat-app.md b/sld295-matter-api-reference/thermostat-app.md index de20239..b9e8f4d 100644 --- a/sld295-matter-api-reference/thermostat-app.md +++ b/sld295-matter-api-reference/thermostat-app.md @@ -8,10 +8,10 @@ To override any of the following hooks, declare the corresponding `*Impl()` meth |---|---|---| | `AppInitImpl` | `AppInit` | Registers the button callback, sets the LCD UI, and initializes the thermostat. | | `InitThermostatImpl` | `InitThermostat` | Initializes the sensor, UI, and periodic temperature sampling. | -| `InitSensorImpl` | `InitSensor` | Initializes the hardware temperature sensor when present. | -| `GetTemperatureImpl` | `GetTemperature` | Reads the Si70xx sensor when present, otherwise supplies a simulated temperature. | -| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function button events to the base application handler. | -| `SensorTimerEventHandlerImpl` | `SensorTimerEventHandler` | Posts a temperature update application event when the sensor timer expires. | -| `TemperatureUpdateEventHandlerImpl` | `TemperatureUpdateEventHandler` | Samples temperature and updates the Thermostat `LocalTemperature` attribute. | -| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handles Thermostat changes and observes Identify changes. | -| `DMThermostatClusterInitImpl` | `DMThermostatClusterInit` | Installs the default Thermostat delegate for an endpoint. | +| `InitSensorImpl` | `InitSensor` | Initializes the hardware temperature sensor if it is present. | +| `GetTemperatureImpl` | `GetTemperature` | Reads the Si70xx sensor if it is present; otherwise, provides a simulated temperature. | +| `ButtonEventHandlerImpl` | `ButtonEventHandler` | Routes function-button events to the base application handler. | +| `SensorTimerEventHandlerImpl` | `SensorTimerEventHandler` | Posts an application event to update the temperature when the sensor timer expires. | +| `TemperatureUpdateEventHandlerImpl` | `TemperatureUpdateEventHandler` | Samples the temperature and updates the Thermostat `LocalTemperature` attribute. | +| `DMPostAttributeChangeCallbackImpl` | `DMPostAttributeChangeCallback` | Handles attribute changes from the Thermostat cluster and monitors attribute changes from the Identify cluster. | +| `DMThermostatClusterInitImpl` | `DMThermostatClusterInit` | Installs the default Thermostat delegate on an endpoint. | From dc794bfdbad6f3c66ae928014587859e7d381493 Mon Sep 17 00:00:00 2001 From: Michael Duggan Date: Mon, 21 Sep 2026 07:20:35 -0400 Subject: [PATCH 12/12] fix formatting issue from code review --- sld295-matter-api-reference/index.md | 2 +- sld295-matter-api-reference/refrigerator-app.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sld295-matter-api-reference/index.md b/sld295-matter-api-reference/index.md index 3eafe7a..ee8017a 100644 --- a/sld295-matter-api-reference/index.md +++ b/sld295-matter-api-reference/index.md @@ -4,7 +4,7 @@ Use this reference to find the application customization APIs available in a Silicon Labs Matter application. The available APIs depend on the application and its configuration. -Most **of the following** APIs are exposed through the generated `AppTask` +Most of the following APIs are exposed through the generated `AppTask` interface. To customize those APIs, derive `CustomerAppTask` from the generated implementation and override the corresponding `*Impl()` hook. The Closure app also exposes `ClosureManager` APIs through a separate `CustomerAppManager` diff --git a/sld295-matter-api-reference/refrigerator-app.md b/sld295-matter-api-reference/refrigerator-app.md index 06cfa83..068fa60 100644 --- a/sld295-matter-api-reference/refrigerator-app.md +++ b/sld295-matter-api-reference/refrigerator-app.md @@ -1,7 +1,6 @@ # Refrigerator Application Override APIs To override any of the following hooks, declare the corresponding `*Impl()` method in `CustomerAppTask.h` and implement it in `CustomerAppTask.cpp`. Ensure that the method signature matches its declaration in `autogen/AppTaskImpl.h`. The public `Init()` method maps to `CabinetModeInitImpl()` rather than `InitImpl()`. -`CabinetModeInitImpl()`, not `InitImpl()`. ## AppTask