Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ private set
/// <returns>Returns true if the read operation is successful; otherwise, false.</returns>
private async Task<bool> ReadTagsFromPlc(string group)
{
var tagsToRead = tagsInGroups[group];
if (tagsToRead != null)
if (tagsInGroups.ContainsKey(group))
{
await _root.GetConnector().ReadBatchAsync(tagsToRead);
return true;
}
else
{
return false;
var tagsToRead = tagsInGroups[group];
if (tagsToRead != null)
{
await _root.GetConnector().ReadBatchAsync(tagsToRead);
return true;
}
}
return false;
}

/// <summary>
Expand Down Expand Up @@ -148,6 +148,8 @@ private void AddTagsFromRecordToWrittenList(List<ITwinPrimitive> tagsToWrite, Pe
/// <returns>Returns true if the update operation is successful; otherwise, false.</returns>
public async Task<bool> UpdatePersistentGroupFromPlcToRepository(string persistentGroupName)
{
if (!tagsInGroups.ContainsKey(persistentGroupName)) return false; // group not exist

await ReadTagsFromPlc(persistentGroupName);

return UpdateReadedTagsToRepository(persistentGroupName);
Expand Down
Loading