Skip to content

Commit 60e60c4

Browse files
committed
Merge remote-tracking branch 'upstream/master' into granbery/electrical_measurement-AddElectricalPowerMeasurement_to_EnergyManagementApp
2 parents 9a9db14 + af29ce6 commit 60e60c4

File tree

83 files changed

+2671
-80014
lines changed

Some content is hidden

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

83 files changed

+2671
-80014
lines changed

examples/all-clusters-app/nxp/mw320/main.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -1152,12 +1152,10 @@ void task_test_main(void * param)
11521152
PRINTF("--> update CurrentPosition [%d] \r\n", value);
11531153
Clusters::Switch::Attributes::CurrentPosition::Set(1, value);
11541154
#ifdef SUPPORT_MANUAL_CTRL
1155-
#error \
1156-
"This code thinks it's setting the OnOff attribute, but it's actually setting the NumberOfPositions attribute! And passing the wrong size for either case. Figure out what it's trying to do."
1157-
// sync-up the Light attribute (for test event, OO.M.ManuallyControlled)
1158-
PRINTF("--> update [Clusters::Switch::Id]: OnOff::Id [%d] \r\n", value);
1159-
emAfWriteAttribute(1, Clusters::Switch::Id, Clusters::OnOff::Attributes::OnOff::Id, (uint8_t *) &value, sizeof(value),
1160-
true, false);
1155+
#error "Not implemented"
1156+
// TODO: previous code was trying to write a OnOff cluster attribute id to a switch attribute, generally
1157+
// not working. Determine if this should maybe be
1158+
// OnOff::Attributes::OnOff::Set(1, is_on) or similar
11611159
#endif // SUPPORT_MANUAL_CTRL
11621160

11631161
need2sync_sw_attr = false;

examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.h

+1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ CHIP_ERROR LogAttributeAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNum
3131
CHIP_ERROR LogCommandAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, id result);
3232
CHIP_ERROR LogAttributeErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * attributeId, NSError * error);
3333
CHIP_ERROR LogCommandErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NSNumber * commandId, NSError * error);
34+
CHIP_ERROR LogGetCommissionerNodeId(NSNumber * nodeId);
3435
void SetDelegate(RemoteDataModelLoggerDelegate * delegate);
3536
}; // namespace RemoteDataModelLogger

examples/darwin-framework-tool/commands/common/RemoteDataModelLogger.mm

+13
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
constexpr char kErrorIdKey[] = "error";
3535
constexpr char kClusterErrorIdKey[] = "clusterError";
3636
constexpr char kValueKey[] = "value";
37+
constexpr char kNodeIdKey[] = "nodeId";
3738

3839
constexpr char kBase64Header[] = "base64:";
3940

@@ -191,5 +192,17 @@ CHIP_ERROR LogCommandErrorAsJSON(NSNumber * endpointId, NSNumber * clusterId, NS
191192
return LogError(value, status);
192193
}
193194

195+
CHIP_ERROR LogGetCommissionerNodeId(NSNumber * value)
196+
{
197+
VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR);
198+
199+
Json::Value rootValue;
200+
rootValue[kValueKey] = Json::Value();
201+
rootValue[kValueKey][kNodeIdKey] = [value unsignedLongLongValue];
202+
203+
auto valueStr = JsonToString(rootValue);
204+
return gDelegate->LogJSON(valueStr.c_str());
205+
}
206+
194207
void SetDelegate(RemoteDataModelLoggerDelegate * delegate) { gDelegate = delegate; }
195208
}; // namespace RemoteDataModelLogger

examples/darwin-framework-tool/commands/pairing/GetCommissionerNodeIdCommand.mm

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@
1919
#import <Matter/Matter.h>
2020

2121
#include "GetCommissionerNodeIdCommand.h"
22+
#include "RemoteDataModelLogger.h"
2223

2324
CHIP_ERROR GetCommissionerNodeIdCommand::RunCommand()
2425
{
2526
auto * controller = CurrentCommissioner();
2627
VerifyOrReturnError(nil != controller, CHIP_ERROR_INCORRECT_STATE);
2728

28-
ChipLogProgress(
29-
chipTool, "Commissioner Node Id 0x" ChipLogFormatX64, ChipLogValueX64(controller.controllerNodeId.unsignedLongLongValue));
29+
auto controllerNodeId = controller.controllerNodeId;
30+
ChipLogProgress(chipTool, "Commissioner Node Id 0x" ChipLogFormatX64, ChipLogValueX64(controllerNodeId.unsignedLongLongValue));
3031

32+
ReturnErrorOnFailure(RemoteDataModelLogger::LogGetCommissionerNodeId(controllerNodeId));
3133
SetCommandExitStatus(CHIP_NO_ERROR);
3234
return CHIP_NO_ERROR;
3335
}

examples/tv-app/android/BUILD.gn

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ shared_library("jni") {
3333
"include/audio-output/AudioOutputManager.cpp",
3434
"include/audio-output/AudioOutputManager.h",
3535
"include/cluster-init.cpp",
36-
"include/content-app-observer/ContentAppObserver.cpp",
37-
"include/content-app-observer/ContentAppObserver.h",
3836
"include/content-control/ContentController.cpp",
3937
"include/content-control/ContentController.h",
4038
"include/content-launcher/AppContentLauncherManager.cpp",
@@ -118,6 +116,8 @@ android_library("java") {
118116
"java/src/com/matter/tv/server/tvapp/ChannelLineupInfo.java",
119117
"java/src/com/matter/tv/server/tvapp/ChannelManager.java",
120118
"java/src/com/matter/tv/server/tvapp/ChannelManagerStub.java",
119+
"java/src/com/matter/tv/server/tvapp/ChannelProgramInfo.java",
120+
"java/src/com/matter/tv/server/tvapp/ChannelProgramResponse.java",
121121
"java/src/com/matter/tv/server/tvapp/Clusters.java",
122122
"java/src/com/matter/tv/server/tvapp/ContentAppEndpointManager.java",
123123
"java/src/com/matter/tv/server/tvapp/ContentLaunchBrandingInformation.java",
@@ -142,6 +142,7 @@ android_library("java") {
142142
"java/src/com/matter/tv/server/tvapp/MediaPlaybackManager.java",
143143
"java/src/com/matter/tv/server/tvapp/MediaPlaybackManagerStub.java",
144144
"java/src/com/matter/tv/server/tvapp/MediaPlaybackPosition.java",
145+
"java/src/com/matter/tv/server/tvapp/MediaTrack.java",
145146
"java/src/com/matter/tv/server/tvapp/OnOffManager.java",
146147
"java/src/com/matter/tv/server/tvapp/OnOffManagerStub.java",
147148
"java/src/com/matter/tv/server/tvapp/TvApp.java",

examples/tv-app/android/java/AppImpl.h

-9
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "../include/account-login/AccountLoginManager.h"
3636
#include "../include/application-basic/ApplicationBasicManager.h"
3737
#include "../include/application-launcher/ApplicationLauncherManager.h"
38-
#include "../include/content-app-observer/ContentAppObserver.h"
3938
#include "../include/content-control/ContentController.h"
4039
#include "../include/content-launcher/AppContentLauncherManager.h"
4140
#include "../include/media-playback/AppMediaPlaybackManager.h"
@@ -49,7 +48,6 @@
4948
#include <app/clusters/application-basic-server/application-basic-delegate.h>
5049
#include <app/clusters/application-launcher-server/application-launcher-delegate.h>
5150
#include <app/clusters/channel-server/channel-delegate.h>
52-
#include <app/clusters/content-app-observer/content-app-observer-delegate.h>
5351
#include <app/clusters/content-control-server/content-control-delegate.h>
5452
#include <app/clusters/content-launch-server/content-launch-delegate.h>
5553
#include <app/clusters/keypad-input-server/keypad-input-delegate.h>
@@ -76,7 +74,6 @@ using ApplicationBasicDelegate = app::Clusters::ApplicationBasic::Delegate;
7674
using ApplicationLauncherDelegate = app::Clusters::ApplicationLauncher::Delegate;
7775
using ChannelDelegate = app::Clusters::Channel::Delegate;
7876
using ContentLauncherDelegate = app::Clusters::ContentLauncher::Delegate;
79-
using ContentAppObserverDelegate = app::Clusters::ContentAppObserver::Delegate;
8077
using ContentControlDelegate = app::Clusters::ContentControl::Delegate;
8178
using KeypadInputDelegate = app::Clusters::KeypadInput::Delegate;
8279
using MediaPlaybackDelegate = app::Clusters::MediaPlayback::Delegate;
@@ -118,11 +115,6 @@ class DLL_EXPORT ContentAppImpl : public ContentApp
118115
mContentLauncherDelegate.SetEndpointId(GetEndpointId());
119116
return &mContentLauncherDelegate;
120117
};
121-
ContentAppObserverDelegate * GetContentAppObserverDelegate() override
122-
{
123-
mContentAppObserverDelegate.SetEndpointId(GetEndpointId());
124-
return &mContentAppObserverDelegate;
125-
};
126118
ContentControlDelegate * GetContentControlDelegate() override
127119
{
128120
mContentControlDelegate.SetEndpointId(GetEndpointId());
@@ -146,7 +138,6 @@ class DLL_EXPORT ContentAppImpl : public ContentApp
146138
ApplicationLauncherManager mApplicationLauncherDelegate;
147139
ChannelManager mChannelDelegate;
148140
ContentController mContentControlDelegate;
149-
ContentAppObserver mContentAppObserverDelegate;
150141
AppContentLauncherManager mContentLauncherDelegate;
151142
KeypadInputManager mKeypadInputDelegate;
152143
AppMediaPlaybackManager mMediaPlaybackDelegate;

0 commit comments

Comments
 (0)