Skip to content

Commit 300c08b

Browse files
authored
Merge branch 'master' into tizen-arm64-dockerfile
2 parents 8e81834 + 197c4d4 commit 300c08b

File tree

99 files changed

+3530
-2055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+3530
-2055
lines changed

.gemini/config.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
have_fun: false
2+
code_review:
3+
# Disabled until we have clarity/guidance at a CSA level
4+
disable: true
5+
comment_severity_threshold: MEDIUM
6+
max_review_comments: -1
7+
pull_request_opened:
8+
help: false
9+
summary: false
10+
code_review: true

config/ameba/chip.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ endif (matter_enable_persistentstorage_audit)
117117

118118
# Build RPC
119119
if (matter_enable_rpc)
120-
#string(APPEND CHIP_GN_ARGS "remove_default_configs = [\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:cpp17\"]\n")
121120
string(APPEND CHIP_GN_ARGS "chip_build_pw_rpc_lib = true\n")
122121
string(APPEND CHIP_GN_ARGS "pw_log_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log_basic\"\n")
123122
string(APPEND CHIP_GN_ARGS "pw_assert_BACKEND = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert_log:check_backend\"\n")

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+15-2
Original file line numberDiff line numberDiff line change
@@ -8167,9 +8167,22 @@ endpoint 1 {
81678167
server cluster Actions {
81688168
callback attribute actionList;
81698169
callback attribute endpointLists;
8170-
callback attribute setupURL;
8170+
ram attribute setupURL default = "https://example.com";
81718171
ram attribute featureMap default = 0;
8172-
callback attribute clusterRevision default = 1;
8172+
ram attribute clusterRevision default = 1;
8173+
8174+
handle command InstantAction;
8175+
handle command InstantActionWithTransition;
8176+
handle command StartAction;
8177+
handle command StartActionWithDuration;
8178+
handle command StopAction;
8179+
handle command PauseAction;
8180+
handle command PauseActionWithDuration;
8181+
handle command ResumeAction;
8182+
handle command EnableAction;
8183+
handle command EnableActionWithDuration;
8184+
handle command DisableAction;
8185+
handle command DisableActionWithDuration;
81738186
}
81748187

81758188
server cluster PowerSource {

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+101-3
Original file line numberDiff line numberDiff line change
@@ -7061,6 +7061,104 @@
70617061
"define": "ACTIONS_CLUSTER",
70627062
"side": "server",
70637063
"enabled": 1,
7064+
"commands": [
7065+
{
7066+
"name": "InstantAction",
7067+
"code": 0,
7068+
"mfgCode": null,
7069+
"source": "client",
7070+
"isIncoming": 1,
7071+
"isEnabled": 1
7072+
},
7073+
{
7074+
"name": "InstantActionWithTransition",
7075+
"code": 1,
7076+
"mfgCode": null,
7077+
"source": "client",
7078+
"isIncoming": 1,
7079+
"isEnabled": 1
7080+
},
7081+
{
7082+
"name": "StartAction",
7083+
"code": 2,
7084+
"mfgCode": null,
7085+
"source": "client",
7086+
"isIncoming": 1,
7087+
"isEnabled": 1
7088+
},
7089+
{
7090+
"name": "StartActionWithDuration",
7091+
"code": 3,
7092+
"mfgCode": null,
7093+
"source": "client",
7094+
"isIncoming": 1,
7095+
"isEnabled": 1
7096+
},
7097+
{
7098+
"name": "StopAction",
7099+
"code": 4,
7100+
"mfgCode": null,
7101+
"source": "client",
7102+
"isIncoming": 1,
7103+
"isEnabled": 1
7104+
},
7105+
{
7106+
"name": "PauseAction",
7107+
"code": 5,
7108+
"mfgCode": null,
7109+
"source": "client",
7110+
"isIncoming": 1,
7111+
"isEnabled": 1
7112+
},
7113+
{
7114+
"name": "PauseActionWithDuration",
7115+
"code": 6,
7116+
"mfgCode": null,
7117+
"source": "client",
7118+
"isIncoming": 1,
7119+
"isEnabled": 1
7120+
},
7121+
{
7122+
"name": "ResumeAction",
7123+
"code": 7,
7124+
"mfgCode": null,
7125+
"source": "client",
7126+
"isIncoming": 1,
7127+
"isEnabled": 1
7128+
},
7129+
{
7130+
"name": "EnableAction",
7131+
"code": 8,
7132+
"mfgCode": null,
7133+
"source": "client",
7134+
"isIncoming": 1,
7135+
"isEnabled": 1
7136+
},
7137+
{
7138+
"name": "EnableActionWithDuration",
7139+
"code": 9,
7140+
"mfgCode": null,
7141+
"source": "client",
7142+
"isIncoming": 1,
7143+
"isEnabled": 1
7144+
},
7145+
{
7146+
"name": "DisableAction",
7147+
"code": 10,
7148+
"mfgCode": null,
7149+
"source": "client",
7150+
"isIncoming": 1,
7151+
"isEnabled": 1
7152+
},
7153+
{
7154+
"name": "DisableActionWithDuration",
7155+
"code": 11,
7156+
"mfgCode": null,
7157+
"source": "client",
7158+
"isIncoming": 1,
7159+
"isEnabled": 1
7160+
}
7161+
],
70647162
"attributes": [
70657163
{
70667164
"name": "ActionList",
@@ -7101,10 +7199,10 @@
71017199
"side": "server",
71027200
"type": "long_char_string",
71037201
"included": 1,
7104-
"storageOption": "External",
7202+
"storageOption": "RAM",
71057203
"singleton": 0,
71067204
"bounded": 0,
7107-
"defaultValue": "",
7205+
"defaultValue": "https://example.com",
71087206
"reportable": 1,
71097207
"minInterval": 0,
71107208
"maxInterval": 65344,
@@ -7133,7 +7231,7 @@
71337231
"side": "server",
71347232
"type": "int16u",
71357233
"included": 1,
7136-
"storageOption": "External",
7234+
"storageOption": "RAM",
71377235
"singleton": 0,
71387236
"bounded": 0,
71397237
"defaultValue": "1",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/*
2+
*
3+
* Copyright (c) 2024 Project CHIP Authors
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#pragma once
18+
#include <app-common/zap-generated/cluster-objects.h>
19+
#include <app-common/zap-generated/ids/Attributes.h>
20+
#include <app-common/zap-generated/ids/Clusters.h>
21+
#include <app/AttributeAccessInterface.h>
22+
#include <app/AttributeAccessInterfaceRegistry.h>
23+
#include <app/clusters/actions-server/actions-server.h>
24+
#include <app/util/attribute-storage.h>
25+
#include <lib/support/CodeUtils.h>
26+
#include <lib/support/logging/CHIPLogging.h>
27+
#include <vector>
28+
29+
namespace chip {
30+
namespace app {
31+
namespace Clusters {
32+
namespace Actions {
33+
class ActionsDelegateImpl : public Delegate
34+
{
35+
private:
36+
std::vector<ActionStructStorage> kActionList = {
37+
ActionStructStorage(0, CharSpan::fromCharString("TurnOnLight"), ActionTypeEnum::kScene, 0, 0, ActionStateEnum::kInactive),
38+
ActionStructStorage(1, CharSpan::fromCharString("TurnOffLight"), ActionTypeEnum::kScene, 1, 0, ActionStateEnum::kInactive),
39+
ActionStructStorage(2, CharSpan::fromCharString("ToggleLight"), ActionTypeEnum::kScene, 2, 0, ActionStateEnum::kInactive)
40+
};
41+
42+
std::vector<EndpointId> firstEpList = { 0 };
43+
std::vector<EndpointId> secondEpList = { 0, 1 };
44+
std::vector<EndpointId> thirdEpList = { 1, 2, 3 };
45+
46+
std::vector<EndpointListStorage> kEndpointList = {
47+
EndpointListStorage(0, CharSpan::fromCharString("On"), EndpointListTypeEnum::kOther,
48+
DataModel::List<const EndpointId>(firstEpList.data(), firstEpList.size())),
49+
EndpointListStorage(1, CharSpan::fromCharString("Off"), EndpointListTypeEnum::kOther,
50+
DataModel::List<const EndpointId>(secondEpList.data(), secondEpList.size())),
51+
EndpointListStorage(2, CharSpan::fromCharString("Toggle"), EndpointListTypeEnum::kOther,
52+
DataModel::List<const EndpointId>(thirdEpList.data(), thirdEpList.size()))
53+
};
54+
55+
CHIP_ERROR ReadActionAtIndex(uint16_t index, ActionStructStorage & action) override;
56+
CHIP_ERROR ReadEndpointListAtIndex(uint16_t index, EndpointListStorage & epList) override;
57+
bool HaveActionWithId(uint16_t actionId, uint16_t & actionIndex) override;
58+
59+
Protocols::InteractionModel::Status HandleInstantAction(uint16_t actionId, Optional<uint32_t> invokeId) override;
60+
Protocols::InteractionModel::Status HandleInstantActionWithTransition(uint16_t actionId, uint16_t transitionTime,
61+
Optional<uint32_t> invokeId) override;
62+
Protocols::InteractionModel::Status HandleStartAction(uint16_t actionId, Optional<uint32_t> invokeId) override;
63+
Protocols::InteractionModel::Status HandleStartActionWithDuration(uint16_t actionId, uint32_t duration,
64+
Optional<uint32_t> invokeId) override;
65+
Protocols::InteractionModel::Status HandleStopAction(uint16_t actionId, Optional<uint32_t> invokeId) override;
66+
Protocols::InteractionModel::Status HandlePauseAction(uint16_t actionId, Optional<uint32_t> invokeId) override;
67+
Protocols::InteractionModel::Status HandlePauseActionWithDuration(uint16_t actionId, uint32_t duration,
68+
Optional<uint32_t> invokeId) override;
69+
Protocols::InteractionModel::Status HandleResumeAction(uint16_t actionId, Optional<uint32_t> invokeId) override;
70+
Protocols::InteractionModel::Status HandleEnableAction(uint16_t actionId, Optional<uint32_t> invokeId) override;
71+
Protocols::InteractionModel::Status HandleEnableActionWithDuration(uint16_t actionId, uint32_t duration,
72+
Optional<uint32_t> invokeId) override;
73+
Protocols::InteractionModel::Status HandleDisableAction(uint16_t actionId, Optional<uint32_t> invokeId) override;
74+
Protocols::InteractionModel::Status HandleDisableActionWithDuration(uint16_t actionId, uint32_t duration,
75+
Optional<uint32_t> invokeId) override;
76+
};
77+
} // namespace Actions
78+
} // namespace Clusters
79+
} // namespace app
80+
} // namespace chip

0 commit comments

Comments
 (0)