Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to create out-of-tree MEI clusters #36818

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f20f644
Ability to create out-of-tree MEI clusters
markus-becker-tridonic-com Dec 12, 2024
e6a4ff0
change for gni based builds
markus-becker-tridonic-com Dec 12, 2024
c56864a
Restyled by clang-format
restyled-commits Dec 12, 2024
4c675db
Restyled by gn
restyled-commits Dec 12, 2024
550f58c
Remove commented code (address review comment)
markus-becker-tridonic-com Jan 10, 2025
6923bb8
Rename from Mei to Manufacturer-specific
markus-becker-tridonic-com Jan 10, 2025
a37e464
zap_regen_all
markus-becker-tridonic-com Jan 10, 2025
adc269b
Some restyles
markus-becker-tridonic-com Jan 10, 2025
62a23dd
Rename kotlin files
markus-becker-tridonic-com Jan 10, 2025
140ff47
Restyled by clang-format
restyled-commits Jan 10, 2025
f1f2648
Restyled by prettier-json
restyled-commits Jan 10, 2025
864e025
Exclude generated Accessors.cpp examples/manufacturer-specific-app fr…
markus-becker-tridonic-com Jan 10, 2025
7787e44
Add an MD file including the
markus-becker-tridonic-com Jan 10, 2025
4ca33c7
Exclude Accessors.cpp also for emberAfWriteAttribute and indent ember…
markus-becker-tridonic-com Jan 10, 2025
0abdfa5
regen again
markus-becker-tridonic-com Jan 10, 2025
ac840e4
Restyled by clang-format
restyled-commits Jan 10, 2025
2822948
ktfmt
markus-becker-tridonic-com Jan 13, 2025
b7b76d7
Add manufacturer-specific-app nrfconnect build step
markus-becker-tridonic-com Jan 13, 2025
a10f99c
remove duplicated/old generated file
markus-becker-tridonic-com Jan 13, 2025
b830097
add PROJECT_APP_COMMON_INC_DIR for telink as well
markus-becker-tridonic-com Jan 13, 2025
08a2d71
correct name of external manufacturer specific cluster filename
markus-becker-tridonic-com Jan 13, 2025
d16850f
remove more commented code.
markus-becker-tridonic-com Jan 13, 2025
1e783c8
Remove duplicated ClusterCluster
markus-becker-tridonic-com Jan 13, 2025
b0d8bb0
regenerated files
markus-becker-tridonic-com Jan 13, 2025
9d9ce81
Fix some remainders of MEI
markus-becker-tridonic-com Jan 14, 2025
3661fb5
Restyled by clang-format
restyled-commits Jan 14, 2025
06f910c
Remove more commented build code
markus-becker-tridonic-com Jan 14, 2025
716d6b4
More changes for the external MS cluster.
markus-becker-tridonic-com Jan 14, 2025
a5bb7ce
zap generate for manufacturer specific sample.
markus-becker-tridonic-com Jan 14, 2025
cffa1b4
Restyled by clang-format
restyled-commits Jan 14, 2025
8d8454c
More cluster name clean-ups
markus-becker-tridonic-com Jan 15, 2025
e52bb6e
Liste External MS cluster in CommandHandlerInterfaceOnlyClusters
markus-becker-tridonic-com Jan 15, 2025
958e7aa
Successfully compiling sample for NRF
markus-becker-tridonic-com Jan 15, 2025
0e0942a
Restyled by whitespace
restyled-commits Jan 15, 2025
adc9569
Restyled by clang-format
restyled-commits Jan 15, 2025
c50376b
zap-regen-all
markus-becker-tridonic-com Jan 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename from Mei to Manufacturer-specific
  • Loading branch information
markus-becker-tridonic-com committed Jan 10, 2025
commit 6923bb8f27c0ea25d92383409e84b834cf546628
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \
src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/sample-manufacturer-specific-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml \
Expand Down
2 changes: 1 addition & 1 deletion config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ config CHIP_PROJECT_CONFIG
platform-specific settings.

config CHIP_PROJECT_APP_COMMON_INCLUDE_DIRS
string "Project specific app-common directory for MEI clusters"
string "Project specific app-common directory for Manufacturer-specific clusters"
help
Provides a directory to the app-common/ folder.

Expand Down
14 changes: 7 additions & 7 deletions examples/chef/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ To add new devices for chef:
## Manufacturer Extensions / Custom Clusters

You may add vendor-defined features to chef. The
`rootnode_onofflight_meisample*` device showcases its usage by using the Sample
MEI cluster which is defined on
`src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml`
`rootnode_onofflight_manufacturer_specific_sample*` device showcases its usage by using the Sample
Manufacturer-specific cluster which is defined in
`src/app/zap-templates/zcl/data-model/chip/sample-manufacturer-specific-cluster.xml`

This cluster has

Expand All @@ -246,15 +246,15 @@ This cluster has
- A command/response pair `add-arguments`. The command takes two uint8
arguments and the response command returns their sum.

You may test the `Sample MEI` via chip-tool using the following commands:
You may test the `Sample Manufacturer Specific Cluster` via chip-tool using the following commands:

```
# commissioning of on-network chef device
chip-tool pairing onnetwork 1 20202021
# tests command to sum arguments: returns 30
chip-tool samplemei add-arguments 1 1 10 20
chip-tool sample-manufacturer-specific add-arguments 1 1 10 20
# sets Flip-Flop to false
chip-tool samplemei write flip-flop 0 1 1
chip-tool sample-manufacturer-specific write flip-flop 0 1 1
# reads Flip-Flop
chip-tool samplemei read flip-flop 1 1
chip-tool sample-manufacturer-specific read flip-flop 1 1
```
Original file line number Diff line number Diff line change
Expand Up @@ -1756,7 +1756,7 @@ cluster FixedLabel = 64 {
}

/** The Sample MEI cluster showcases a cluster manufacturer extensions */
cluster SampleMei = 4294048800 {
cluster SampleManufacturerSpecific = 4294048800 {
revision 1; // NOTE: Default/not specifically set

fabric_sensitive info event PingCountEvent = 0 {
Expand Down Expand Up @@ -2082,7 +2082,7 @@ endpoint 1 {
callback attribute clusterRevision;
}

server cluster SampleMei {
server cluster SampleManufacturerSpecific {
emits event PingCountEvent;
ram attribute flipFlop default = false;
callback attribute generatedCommandList;
Expand All @@ -2096,5 +2096,3 @@ endpoint 1 {
handle command AddArguments;
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -3258,10 +3258,10 @@
"enabled": 1
},
{
"name": "Sample MEI",
"name": "Sample Manufacturer-Specific",
"code": 4294048800,
"mfgCode": null,
"define": "SAMPLE_MEI_CLUSTER",
"define": "SAMPLE_MANUFACTURER_SPECIFIC_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
{
"pathRelativity": "relativeToZap",
"path": "../nrfconnect/mei/xml/sample-external-mei-cluster.xml",
"path": "../nrfconnect/manufacturer-specific/xml/sample-external-manufacturer-specific-cluster.xml",
"type": "zcl-xml-standalone"
}
],
Expand Down Expand Up @@ -5649,10 +5649,10 @@
]
},
{
"name": "Sample External MEI",
"name": "Sample External manufacturer-specific cluster",
"code": 4294048801,
"mfgCode": null,
"define": "SAMPLE_EXTERNAL_MEI_CLUSTER",
"define": "SAMPLE_EXTERNAL_MANUFACTURER_SPECIFIC_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ cmake_minimum_required(VERSION 3.13.1)

get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
get_filename_component(NRFCONNECT_COMMON ${CHIP_ROOT}/examples/platform/nrfconnect REALPATH)
get_filename_component(EXTERNAL_MEI_COMMON ${CHIP_ROOT}/examples/external-mei-app/external-mei-common REALPATH)
get_filename_component(MANUFACTURER_SPECIFIC_COMMON ${CHIP_ROOT}/examples/manufacturer-specific-app/manufacturer-specific-common REALPATH)
get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH)

include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)

list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module)
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})

project(chip-nrfconnect-external-mei-example)
project(chip-nrfconnect-manufacturer-specific-app)

include(${CHIP_ROOT}/config/nrfconnect/app/check-sysbuild-use.cmake)
include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake)
Expand All @@ -40,10 +40,10 @@ target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized)

target_include_directories(app PRIVATE
main/include
${EXTERNAL_MEI_COMMON}
${MANUFACTURER_SPECIFIC_COMMON}
${GEN_DIR}
# ${GEN_DIR}/app-common
${GEN_DIR}/external-mei-app
${GEN_DIR}/manufacturer-specific-app
${NRFCONNECT_COMMON}/util/include
${NRFCONNECT_COMMON}/app/include)

Expand All @@ -55,22 +55,22 @@ target_sources(app PRIVATE
${NRFCONNECT_COMMON}/util/LEDWidget.cpp
${NRFCONNECT_COMMON}/util/PWMDevice.cpp)

# add on MEI clusters
# add on manufacturer specific cluster
target_sources(app PRIVATE
mei/clusters/sample-external-mei-server.cpp
mei/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
mei/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
manufacturer-specific/clusters/sample-manufacturer-specific-server.cpp
manufacturer-specific/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
manufacturer-specific/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
)

target_include_directories(app PUBLIC
mei/clusters/
mei/zzz_generated/app-common
manufacturer-specific/clusters/
manufacturer-specific/zzz_generated/app-common
)

chip_configure_data_model(app
ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../external-mei-common/external-mei-app.zap
ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../manufacturer-specific-common/manufacturer-specific-app.zap
EXTERNAL_CLUSTERS SAMPLE_EXTERNAL_MEI_CLUSTER
EXTERNAL_APP_COMMON mei/zzz_generated/app-common
EXTERNAL_APP_COMMON manufacturer-specific/zzz_generated/app-common
)

if(CONFIG_CHIP_OTA_REQUESTOR OR CONFIG_MCUMGR_TRANSPORT_BT)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
mainmenu "Matter nRF Connect External MEI Example Application"
mainmenu "Matter nRF Connect External Manufacturer-specific Cluster Example Application"

# Sample configuration used for Thread networking
if NET_L2_OPENTHREAD
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "sample-external-mei-server.h"
#include "sample-external-manufacturer-specific-server.h"

#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/cluster-objects.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef SRC_APP_CLUSTERS_SAMPLE_MEI_CLUSTER_SERVER_SERVER_H_
#define SRC_APP_CLUSTERS_SAMPLE_MEI_CLUSTER_SERVER_SERVER_H_
#ifndef SRC_APP_CLUSTERS_SAMPLE_MANUFACTURER_SPECIFIC_CLUSTER_SERVER_SERVER_H_
#define SRC_APP_CLUSTERS_SAMPLE_MANUFACTURER_SPECIFIC_CLUSTER_SERVER_SERVER_H_

#include <app-common/zap-generated/cluster-objects.h>
#include <app/AttributeAccessInterface.h>
Expand All @@ -11,13 +11,13 @@
#include <lib/support/Span.h>
#include <platform/CHIPDeviceConfig.h>

#ifdef ZCL_USING_SAMPLE_MEI_CLUSTER_SERVER
#define SAMPLE_MEI_NUM_SUPPORTED_ENDPOINTS \
(MATTER_DM_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
#ifdef ZCL_USING_SAMPLE_MANUFACTURER_SPECIFIC_CLUSTER_SERVER
#define SAMPLE_MANUFACTURER_SPECIFIC_NUM_SUPPORTED_ENDPOINTS \
(MATTER_DM_SAMPLE_MANUFACTURER_SPECIFIC_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT)
#else
#define SAMPLE_MEI_NUM_SUPPORTED_ENDPOINTS CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT
#endif /* ZCL_USING_SAMPLE_MEI_CLUSTER_SERVER */
static constexpr size_t kNumSupportedEndpoints = SAMPLE_MEI_NUM_SUPPORTED_ENDPOINTS;
#define SAMPLE_MANUFACTURER_SPECIFIC_NUM_SUPPORTED_ENDPOINTS CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT
#endif /* ZCL_USING_SAMPLE_MANUFACTURER_SPECIFIC_CLUSTER_SERVER */
static constexpr size_t kNumSupportedEndpoints = SAMPLE_MANUFACTURER_SPECIFIC_NUM_SUPPORTED_ENDPOINTS;

namespace chip {
namespace app {
Expand Down Expand Up @@ -87,4 +87,4 @@ class SampleExternalMeiServer : public AttributeAccessInterface, public CommandH
} // namespace app
} // namespace chip

#endif // SRC_APP_CLUSTERS_SAMPLE_MEI_CLUSTER_SERVER_SERVER_H_
#endif // SRC_APP_CLUSTERS_SAMPLE_MANUFACTURER_SPECIFIC_CLUSTER_SERVER_SERVER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CommandHandlerInterfaceOnlyClusters:
- Activated Carbon Filter Monitoring
- HEPA Filter Monitoring
- RVC Operational State
- Sample MEI
- Sample Manufacturer-specific
- Microwave Oven Control
- Chime
- Commissioner Control
Expand Down Expand Up @@ -64,7 +64,7 @@ ClustersWithInitFunctions:
- Time Format Localization
- Thermostat
- Mode Select
- Sample MEI
- Sample Manufacturer-specific
- Scenes Management

ClustersWithAttributeChangedFunctions:
Expand All @@ -82,7 +82,7 @@ ClustersWithShutdownFunctions:
- Door Lock
- Level Control
- Color Control
- Sample MEI
- Sample Manufacturer-specific
- Scenes Management
- Thermostat

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "CHIP Application MEI templates",
"name": "CHIP Application manufacturer-specific templates",
"version": "chip-v1",
"helpers": [
"partials/helper.js",
Expand Down Expand Up @@ -100,4 +100,4 @@
"output": "cluster-enums-check.h"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ limitations under the License.

<cluster>
<domain>General</domain>
<name>Sample External MEI</name>
<name>Sample External manufacturer-specific cluster</name>
<!-- The MSB 16 bits of <code> are the VendorID. Replace this with your
VendorID. 0xFFF1 is a Test VendorID.

The LSB 16 bits of <code> are a self-assigned ClusterID -->
<code>0xFFF1FC21</code>
<define>SAMPLE_EXTERNAL_MEI_CLUSTER</define>
<description>The Sample External MEI cluster showcases an out-of-tree cluster manufacturer extensions</description>
<define>SAMPLE_EXTERNAL_MANUFACTURER_SPECIFIC_MEI_CLUSTER</define>
<description>The Sample External manufacturer-specific cluster showcases an out-of-tree cluster manufacturer extensions</description>

<!-- Attributes -->
<!-- A simple boolean attribute that flips or flops -->
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading