public async Task<Dictionary<int, string>> GetChangedRegistersAsync()
{
var result = new Dictionary<int, string>();
await SafelyExecuteCommand(async () =>
{
var changedIndexes = (await new DataListChangedRegistersCommand().Execute(this)).Value;
if (changedIndexes != null)
{
var registerValues = (await new DataListRegisterValuesCommand(changedIndexes).Execute(this)).Value;
foreach (var regVal in registerValues)
{
result.Add(regVal.Item1, regVal.Item2);
}
}
});
return result;
}