Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,053 changes: 859 additions & 194 deletions examples/jf-admin-app/linux/JFADatastoreSync.cpp

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions examples/jf-admin-app/linux/include/JFADatastoreSync.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,33 @@ class JFADatastoreSync : public app::JointFabricDatastore::Delegate
CHIP_ERROR
SyncNode(NodeId nodeId,
const app::Clusters::JointFabricDatastore::Structs::DatastoreEndpointGroupIDEntryStruct::Type & endpointGroupIDEntry,
std::function<void()> onSuccess) override;
std::function<void(CHIP_ERROR)> onSuccess) override;
CHIP_ERROR
SyncNode(NodeId nodeId,
const app::Clusters::JointFabricDatastore::Structs::DatastoreNodeKeySetEntryStruct::Type & nodeKeySetEntry,
std::function<void()> onSuccess) override;
std::function<void(CHIP_ERROR)> onSuccess) override;
CHIP_ERROR
SyncNode(NodeId nodeId,
const app::Clusters::JointFabricDatastore::Structs::DatastoreEndpointBindingEntryStruct::Type & bindingEntry,
std::function<void()> onSuccess) override;
std::function<void(CHIP_ERROR)> onSuccess) override;
CHIP_ERROR
SyncNode(NodeId nodeId, EndpointId endpointId,
std::vector<app::Clusters::JointFabricDatastore::Structs::DatastoreEndpointBindingEntryStruct::Type> & bindingEntries,
std::function<void(CHIP_ERROR)> onSuccess) override;
CHIP_ERROR
SyncNode(NodeId nodeId,
std::vector<app::Clusters::JointFabricDatastore::Structs::DatastoreEndpointBindingEntryStruct::Type> & bindingEntries,
std::function<void()> onSuccess) override;
CHIP_ERROR SyncNode(NodeId nodeId, const app::Clusters::JointFabricDatastore::Structs::DatastoreACLEntryStruct::Type & aclEntry,
std::function<void()> onSuccess) override;
std::function<void(CHIP_ERROR)> onSuccess) override;
CHIP_ERROR SyncNode(
NodeId nodeId, const app::Clusters::JointFabricDatastore::Structs::DatastoreACLEntryStruct::Type & aclEntry,
const std::optional<app::Clusters::JointFabricDatastore::Structs::DatastoreAccessControlEntryStruct::Type> & superseded,
std::function<void(CHIP_ERROR)> onSuccess) override;
CHIP_ERROR SyncNode(NodeId nodeId,
const std::vector<app::Clusters::JointFabricDatastore::Structs::DatastoreACLEntryStruct::Type> & aclEntries,
std::function<void()> onSuccess) override;
std::function<void(CHIP_ERROR)> onSuccess) override;
CHIP_ERROR SyncNode(NodeId nodeId,
const app::Clusters::JointFabricDatastore::Structs::DatastoreGroupKeySetStruct::Type & groupKeySet,
std::function<void()> onSuccess) override;
std::function<void(CHIP_ERROR)> onSuccess) override;
CHIP_ERROR FetchEndpointList(
NodeId nodeId,
std::function<void(CHIP_ERROR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ CHIP_ERROR JointFabricDatastoreAttrAccess::ReadEndpointGroupIDList(AttributeValu

for (auto & entry : entries)
{
ReturnErrorOnFailure(encoder.Encode(entry));
// Only the cluster's fields: the datastore's own state is not on the wire.
ReturnErrorOnFailure(encoder.Encode(
static_cast<const Clusters::JointFabricDatastore::Structs::DatastoreEndpointGroupIDEntryStruct::Type &>(entry)));
}
return CHIP_NO_ERROR;
});
Expand All @@ -228,7 +230,9 @@ CHIP_ERROR JointFabricDatastoreAttrAccess::ReadEndpointBindingList(AttributeValu

for (auto & entry : entries)
{
ReturnErrorOnFailure(encoder.Encode(entry));
// Only the cluster's fields: the datastore's own state is not on the wire.
ReturnErrorOnFailure(encoder.Encode(
static_cast<const Clusters::JointFabricDatastore::Structs::DatastoreEndpointBindingEntryStruct::Type &>(entry)));
}
return CHIP_NO_ERROR;
});
Expand All @@ -241,7 +245,9 @@ CHIP_ERROR JointFabricDatastoreAttrAccess::ReadNodeKeySetList(AttributeValueEnco

for (auto & entry : entries)
{
ReturnErrorOnFailure(encoder.Encode(entry));
// Only the cluster's fields: the datastore's own state is not on the wire.
ReturnErrorOnFailure(encoder.Encode(
static_cast<const Clusters::JointFabricDatastore::Structs::DatastoreNodeKeySetEntryStruct::Type &>(entry)));
}
return CHIP_NO_ERROR;
});
Expand Down
Loading
Loading