예제 #1
0
        /// <summary>
        /// Reads single attribute.
        /// </summary>
        /// <param name="uuid"></param>
        /// <returns></returns>
        public async Task <(AttributeInfo Data, DataStatus Status)> DataReadAttributeAsync(Guid uuid)
        {
            var(attribute, status) = await ReadAttributeAsync(uuid, AttributeFlags.ALL);

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

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