-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add new on/off cluster implementation based on the Silicon Labs ZigbeePro code #1609
Add new on/off cluster implementation based on the Silicon Labs ZigbeePro code #1609
Conversation
@wehale, could you or someone else from Silicon Labs please review the commits that pull in Silicon Labs code (the first two commits in this branch) to make sure that there's nothing obviously broken with the licensing bits? This is particularly important for the generated files, since I added the license header to those, and that needs approval from someone at Silicon Labs... |
This pull request introduces 1 alert when merging ea31e71 into 475b533 - view on LGTM.com new alerts:
|
Hmm. Looks like the nRF example app (examples/lock-app) is using the dotdot data model bits. I guess I need to fix it to link to I'm not sure yet what the "GN Examples / Linux Standalone" failure is. |
Sergei, can you look at this?
Thanks,
Ezra
…Sent from my iPhone
On Jul 15, 2020, at 1:34 AM, Boris Zbarsky <[email protected]> wrote:
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
@wehale<https://github.com/wehale>, could you or someone else from Silicon Labs please review the commits that pull in Silicon Labs code (the first two commits in this branch) to make sure that there's nothing obviously broken with the licensing bits? This is particularly important for the generated files, since I added the license header to those, and that needs approval from someone at Silicon Labs...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1609 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AD27TVGU2ZYSBV4BXAAX3JLR3U5U3ANCNFSM4O2FTPZA>.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this all looks good, the licenses look correct.
*/ | ||
// This file is generated by Simplicity Studio. Please do not edit manually. | ||
// | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Simplicity Studio comment can probably be removed, or will be removed in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect a bunch of cleanup to happen here after initial landing. The goal was to land something minimally different from the "upstream" code as a first cut.
@bzbarsky-apple: I'm reviewing it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are checking in large files under gen/ . Assuming these are machine generated. Could we make the build system generate them instead?
* limitations under the License. | ||
*/ | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to be dual copyright, since SiLabs is already a CHIP Author? Question applies throughout
IANAL
|
||
#include "af-types.h" | ||
|
||
//#include CONFIGURATION_HEADER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented out code?
This commented out include seems to occur in other places as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned above, the goal is to land something with as few differences from the original SiLabs code as possible, subject to the "it compiles and runs" constraint. Once this lands, we will definitely be doing a bunch of cleanup, which will include removing the commented-out bits here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed #1611 on this.
@@ -77,7 +75,7 @@ class DLL_EXPORT CHIPDeviceManagerCallbacks | |||
* @param size size of the attribute | |||
* @param value pointer to the new value | |||
*/ | |||
virtual void PostAttributeChangeCallback(uint8_t endpoint, ChipZclClusterId clusterId, ChipZclAttributeId attributeId, | |||
virtual void PostAttributeChangeCallback(uint8_t endpoint, EmberAfClusterId clusterId, EmberAfAttributeId attributeId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename Ember to CHIP or have a Github issue to do so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be best to rename things in a different PR, this way there is a record that would help correlate the code to its Silabs' origin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter. #1610 filed.
We can and we will, we’re just not ready to yet. We have not landed on exact generation criteria yet. Once we know exactly what we want to generate, we’ll create generation templates for ZAP and move headless generation into the build system.
Thanks,
Ezra
From: Andrei Litvin <[email protected]>
Reply-To: project-chip/connectedhomeip <[email protected]>
Date: Wednesday, July 15, 2020 at 9:30 AM
To: project-chip/connectedhomeip <[email protected]>
Cc: Ezra Hale <[email protected]>, Mention <[email protected]>
Subject: Re: [project-chip/connectedhomeip] Add new on/off cluster implementation based on the Silicon Labs ZigbeePro code (#1609)
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
@andy31415 commented on this pull request.
We are checking in large files under gen/ . Assuming these are machine generated. Could we make the build system generate them instead?
________________________________
In examples/wifi-echo/server/esp32/main/af-main.h<#1609 (comment)>:
+ * Copyright (c) 2020 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
Is this supposed to be dual copyright, since SiLabs is already a CHIP Author? Question applies throughout
IANAL
________________________________
In examples/wifi-echo/server/esp32/main/af-main.h<#1609 (comment)>:
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/***************************************************************************/
+/**
+ * @file
+ * @brief
+ *******************************************************************************
+ ******************************************************************************/
+
+#ifndef SILABS_AF_MAIN_H
+#define SILABS_AF_MAIN_H
+
+#include "af-types.h"
+
+//#include CONFIGURATION_HEADER
Remove commented out code?
This commented out include seems to occur in other places as well.
________________________________
In examples/wifi-echo/server/esp32/main/include/CHIPDeviceManager.h<#1609 (comment)>:
@@ -77,7 +75,7 @@ class DLL_EXPORT CHIPDeviceManagerCallbacks
* @param size size of the attribute
* @param value pointer to the new value
*/
- virtual void PostAttributeChangeCallback(uint8_t endpoint, ChipZclClusterId clusterId, ChipZclAttributeId attributeId,
+ virtual void PostAttributeChangeCallback(uint8_t endpoint, EmberAfClusterId clusterId, EmberAfAttributeId attributeId,
Should we rename Ember to CHIP or have a Github issue to do so?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1609 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AD27TVGTUTADZPB4Q7RF5BTR3WVNRANCNFSM4O2FTPZA>.
|
I have reviewed the first two commits in the PR, everything looks good. |
All except type_stubs.h come from project-chip#1164 types_stub.h comes from project-chip#1425 (comment) and project-chip#1425 (comment)
… Hale. The sample app only implements the On/Off cluster. Most of the files have the same exact name as in the sample app, with the following exceptions: * endpoint_config.h was originally ZigbeeMinimalSoc_endpoint_config.h * gen_config.h was originally ZigbeeMinimalSoc.h * gen_tokens.h was originally ZigbeeMinimalSoc_tokens.h
This corrects various obvious problems in the file that prevent files that include it from compiling.
…s ZigbeePro implementation can handle. The actual encoding we are using is not quite the APS encoding, but it's still a throwaway, so that does not matter too much.
We no longer compile the Dotdot-based ZCL data model files into libCHIP, because those have symbols whose names conflict with the new ZigbeePro-based ZCL data model files.
ae6f93d
to
b83d489
Compare
Size increase report for "nrf-example-build"
Full report output
|
Size increase report for "linux-example-build"
Full report output
|
Size increase report for "esp32-example-build"
Full report output
|
Size increase report for "gn_nrf-example-build"
Full report output
|
Size increase report for "gn_linux-example-build"
Full report output
|
@@ -0,0 +1,162 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these files common or intended to be generated in real apps? I suggest to move them to common
since I did not see esp32 specific codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are common, but can't compile without the gen
bits (which are app-specific) right now. See #1630.
We can move them to examples/common
if files in there can include app-specific headers (which is possible if we set up the include paths for the apps correctly).
Once #1630 is fixed, we can move these files somewhere else much more easily, of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks Boris
Problem
We actually want to pull in the ZigbeePro implementation from Silicon Labs, not the Dotdot implementation.
Summary of Changes
Pulls in (into the echo server for now) enough code to stand up the on-off cluster. Modifies our two chip-tool clients to talk the slightly different format this code expects.
Fixes #1216 and #1393