22
22
23
23
#include < app/util/config.h>
24
24
25
- #include " app/server/Server.h"
26
25
#include < app-common/zap-generated/attributes/Accessors.h>
27
26
#include < app-common/zap-generated/cluster-objects.h>
28
27
#include < app-common/zap-generated/ids/Attributes.h>
34
33
#include < app/CommandHandlerInterfaceRegistry.h>
35
34
#include < app/EventLogging.h>
36
35
#include < app/reporting/reporting.h>
36
+ #include < app/server/Server.h>
37
37
#include < app/util/attribute-storage.h>
38
38
#include < lib/support/ScopedBuffer.h>
39
39
#include < platform/ConnectivityManager.h>
@@ -112,13 +112,13 @@ TestEventTriggerDelegate * GetTriggerDelegateOnMatchingKey(ByteSpan enableKey)
112
112
return triggerDelegate;
113
113
}
114
114
115
- class GeneralDiagosticsGlobalInstance : public AttributeAccessInterface ,
116
- public CommandHandlerInterface,
117
- public DeviceLayer::ConnectivityManagerDelegate
115
+ class GeneralDiagnosticsGlobalInstance : public AttributeAccessInterface ,
116
+ public CommandHandlerInterface,
117
+ public DeviceLayer::ConnectivityManagerDelegate
118
118
{
119
119
public:
120
120
// Register for the GeneralDiagnostics cluster on all endpoints.
121
- GeneralDiagosticsGlobalInstance () :
121
+ GeneralDiagnosticsGlobalInstance () :
122
122
AttributeAccessInterface (Optional<EndpointId>::Missing(), GeneralDiagnostics::Id),
123
123
CommandHandlerInterface (Optional<EndpointId>::Missing(), GeneralDiagnostics::Id)
124
124
{}
@@ -151,7 +151,7 @@ class GeneralDiagosticsGlobalInstance : public AttributeAccessInterface,
151
151
}
152
152
};
153
153
154
- CHIP_ERROR GeneralDiagosticsGlobalInstance ::Read (const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder)
154
+ CHIP_ERROR GeneralDiagnosticsGlobalInstance ::Read (const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder)
155
155
{
156
156
if (aPath.mClusterId != GeneralDiagnostics::Id)
157
157
{
@@ -210,7 +210,7 @@ CHIP_ERROR GeneralDiagosticsGlobalInstance::Read(const ConcreteReadAttributePath
210
210
return CHIP_NO_ERROR;
211
211
}
212
212
213
- void GeneralDiagosticsGlobalInstance ::InvokeCommand (HandlerContext & handlerContext)
213
+ void GeneralDiagnosticsGlobalInstance ::InvokeCommand (HandlerContext & handlerContext)
214
214
{
215
215
switch (handlerContext.mRequestPath .mCommandId )
216
216
{
@@ -234,8 +234,8 @@ void GeneralDiagosticsGlobalInstance::InvokeCommand(HandlerContext & handlerCont
234
234
}
235
235
236
236
template <typename T>
237
- CHIP_ERROR GeneralDiagosticsGlobalInstance ::ReadIfSupported (CHIP_ERROR (DiagnosticDataProvider::*getter)(T &),
238
- AttributeValueEncoder & aEncoder)
237
+ CHIP_ERROR GeneralDiagnosticsGlobalInstance ::ReadIfSupported (CHIP_ERROR (DiagnosticDataProvider::*getter)(T &),
238
+ AttributeValueEncoder & aEncoder)
239
239
{
240
240
T data;
241
241
CHIP_ERROR err = (GetDiagnosticDataProvider ().*getter)(data);
@@ -252,8 +252,8 @@ CHIP_ERROR GeneralDiagosticsGlobalInstance::ReadIfSupported(CHIP_ERROR (Diagnost
252
252
}
253
253
254
254
template <typename T>
255
- CHIP_ERROR GeneralDiagosticsGlobalInstance ::ReadListIfSupported (CHIP_ERROR (DiagnosticDataProvider::*getter)(T &),
256
- AttributeValueEncoder & aEncoder)
255
+ CHIP_ERROR GeneralDiagnosticsGlobalInstance ::ReadListIfSupported (CHIP_ERROR (DiagnosticDataProvider::*getter)(T &),
256
+ AttributeValueEncoder & aEncoder)
257
257
{
258
258
CHIP_ERROR err = CHIP_NO_ERROR;
259
259
T faultList;
@@ -277,7 +277,7 @@ CHIP_ERROR GeneralDiagosticsGlobalInstance::ReadListIfSupported(CHIP_ERROR (Diag
277
277
return err;
278
278
}
279
279
280
- CHIP_ERROR GeneralDiagosticsGlobalInstance ::ReadNetworkInterfaces (AttributeValueEncoder & aEncoder)
280
+ CHIP_ERROR GeneralDiagnosticsGlobalInstance ::ReadNetworkInterfaces (AttributeValueEncoder & aEncoder)
281
281
{
282
282
CHIP_ERROR err = CHIP_NO_ERROR;
283
283
DeviceLayer::NetworkInterface * netifs;
@@ -303,8 +303,8 @@ CHIP_ERROR GeneralDiagosticsGlobalInstance::ReadNetworkInterfaces(AttributeValue
303
303
return err;
304
304
}
305
305
306
- void GeneralDiagosticsGlobalInstance ::HandleTestEventTrigger (HandlerContext & ctx,
307
- const Commands::TestEventTrigger::DecodableType & commandData)
306
+ void GeneralDiagnosticsGlobalInstance ::HandleTestEventTrigger (HandlerContext & ctx,
307
+ const Commands::TestEventTrigger::DecodableType & commandData)
308
308
{
309
309
auto * triggerDelegate = GetTriggerDelegateOnMatchingKey (commandData.enableKey );
310
310
if (triggerDelegate == nullptr )
@@ -320,8 +320,8 @@ void GeneralDiagosticsGlobalInstance::HandleTestEventTrigger(HandlerContext & ct
320
320
(handleEventTriggerResult != CHIP_NO_ERROR) ? Status::InvalidCommand : Status::Success);
321
321
}
322
322
323
- void GeneralDiagosticsGlobalInstance ::HandleTimeSnapshot (HandlerContext & ctx,
324
- const Commands::TimeSnapshot::DecodableType & commandData)
323
+ void GeneralDiagnosticsGlobalInstance ::HandleTimeSnapshot (HandlerContext & ctx,
324
+ const Commands::TimeSnapshot::DecodableType & commandData)
325
325
{
326
326
ChipLogError (Zcl, " Received TimeSnapshot command!" );
327
327
@@ -353,8 +353,8 @@ void GeneralDiagosticsGlobalInstance::HandleTimeSnapshot(HandlerContext & ctx,
353
353
}
354
354
355
355
#ifdef GENERAL_DIAGNOSTICS_ENABLE_PAYLOAD_TEST_REQUEST_CMD
356
- void GeneralDiagosticsGlobalInstance ::HandlePayloadTestRequest (HandlerContext & ctx,
357
- const Commands::PayloadTestRequest::DecodableType & commandData)
356
+ void GeneralDiagnosticsGlobalInstance ::HandlePayloadTestRequest (HandlerContext & ctx,
357
+ const Commands::PayloadTestRequest::DecodableType & commandData)
358
358
{
359
359
// Max allowed is 2048.
360
360
if (commandData.count > 2048 )
@@ -389,7 +389,7 @@ void GeneralDiagosticsGlobalInstance::HandlePayloadTestRequest(HandlerContext &
389
389
}
390
390
#endif // GENERAL_DIAGNOSTICS_ENABLE_PAYLOAD_TEST_REQUEST_CMD
391
391
392
- GeneralDiagosticsGlobalInstance gGeneralDiagosticsInstance ;
392
+ GeneralDiagnosticsGlobalInstance gGeneralDiagnosticsInstance ;
393
393
394
394
} // anonymous namespace
395
395
@@ -517,10 +517,10 @@ void MatterGeneralDiagnosticsPluginServerInitCallback()
517
517
{
518
518
BootReasonEnum bootReason;
519
519
520
- AttributeAccessInterfaceRegistry::Instance ().Register (&gGeneralDiagosticsInstance );
521
- CommandHandlerInterfaceRegistry::Instance ().RegisterCommandHandler (&gGeneralDiagosticsInstance );
520
+ AttributeAccessInterfaceRegistry::Instance ().Register (&gGeneralDiagnosticsInstance );
521
+ CommandHandlerInterfaceRegistry::Instance ().RegisterCommandHandler (&gGeneralDiagnosticsInstance );
522
522
523
- ConnectivityMgr ().SetDelegate (&gGeneralDiagosticsInstance );
523
+ ConnectivityMgr ().SetDelegate (&gGeneralDiagnosticsInstance );
524
524
525
525
if (GetDiagnosticDataProvider ().GetBootReason (bootReason) == CHIP_NO_ERROR)
526
526
{
0 commit comments