File tree 2 files changed +14
-10
lines changed
src/app/server-cluster/testing
2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -35,34 +35,36 @@ CHIP_ERROR EmptyProvider::Endpoints(ListBuilder<app::DataModel::EndpointEntry> &
35
35
36
36
CHIP_ERROR EmptyProvider::SemanticTags (EndpointId endpointId, ListBuilder<SemanticTag> & builder)
37
37
{
38
- return CHIP_NO_ERROR ;
38
+ return CHIP_IM_GLOBAL_STATUS (UnsupportedEndpoint) ;
39
39
}
40
40
CHIP_ERROR EmptyProvider::DeviceTypes (EndpointId endpointId, ListBuilder<app::DataModel::DeviceTypeEntry> & builder)
41
41
{
42
- return CHIP_NO_ERROR ;
42
+ return CHIP_IM_GLOBAL_STATUS (UnsupportedEndpoint) ;
43
43
}
44
44
45
45
CHIP_ERROR EmptyProvider::ClientClusters (EndpointId endpointId, ListBuilder<ClusterId> & builder)
46
46
{
47
- return CHIP_NO_ERROR ;
47
+ return CHIP_IM_GLOBAL_STATUS (UnsupportedEndpoint) ;
48
48
}
49
49
CHIP_ERROR EmptyProvider::ServerClusters (EndpointId endpointId, ListBuilder<app::DataModel::ServerClusterEntry> & builder)
50
50
{
51
- return CHIP_NO_ERROR ;
51
+ return CHIP_IM_GLOBAL_STATUS (UnsupportedEndpoint) ;
52
52
}
53
53
54
54
CHIP_ERROR EmptyProvider::Attributes (const app::ConcreteClusterPath & path, ListBuilder<app::DataModel::AttributeEntry> & builder)
55
55
{
56
- return CHIP_NO_ERROR ;
56
+ return CHIP_IM_GLOBAL_STATUS (UnsupportedEndpoint) ;
57
57
}
58
+
58
59
CHIP_ERROR EmptyProvider::GeneratedCommands (const app::ConcreteClusterPath & path, ListBuilder<CommandId> & builder)
59
60
{
60
- return CHIP_NO_ERROR ;
61
+ return CHIP_IM_GLOBAL_STATUS (UnsupportedEndpoint) ;
61
62
}
63
+
62
64
CHIP_ERROR EmptyProvider::AcceptedCommands (const app::ConcreteClusterPath & path,
63
65
ListBuilder<app::DataModel::AcceptedCommandEntry> & builder)
64
66
{
65
- return CHIP_NO_ERROR ;
67
+ return CHIP_IM_GLOBAL_STATUS (UnsupportedEndpoint) ;
66
68
}
67
69
68
70
void EmptyProvider::Temporary_ReportAttributeChanged (const app::AttributePathParams & path) {}
Original file line number Diff line number Diff line change 22
22
namespace chip {
23
23
namespace Test {
24
24
25
- // / A provider that is emtpy - everything returns null
25
+ // / A provider that is emtpy - it contains no endpoints and most
26
+ // / calls fail with `Unsupported Endpoint`
26
27
// /
27
- // / Over time this should be replaced with some code-generated/controllable provider
28
- // / to allow for better testing.
28
+ // / This is a bare minimum implentation to have somethign that claims to be a `Provider`
29
+ // / however it has no real implementation that is useful. Over time this should be replaced
30
+ // / with some code-generated/controllable provider to allow for better testing.
29
31
class EmptyProvider : public app ::DataModel::Provider
30
32
{
31
33
public:
You can’t perform that action at this time.
0 commit comments