Esempio n. 1
0
        /// <summary>
        /// Reads single device.
        /// </summary>
        /// <param name="uuid"></param>
        /// <returns></returns>
        public async Task <(DeviceInfo Data, DataStatus Status)> DataReadDeviceAsync(Guid uuid)
        {
            var(device, status) = await ReadDeviceAsync(uuid, DeviceFlags.ALL);

            if (status.IsGood)
            {
                Data.UpdateDevices(device);
            }
            else
            {
                _logger?.LogError($"Error code {status.Code} in reading device: {status.Explanation}.");
            }

            Data.Status = status;
            return(device, Data.Status);
        }