Opc.Ua.Node.Read C# (CSharp) Method

Read() public method

Reads the value of a attribute.
public Read ( IOperationContext context, uint attributeId, Opc.Ua.DataValue value ) : ServiceResult
context IOperationContext The context.
attributeId uint The attribute id.
value Opc.Ua.DataValue The value.
return ServiceResult
        public ServiceResult Read(IOperationContext context, uint attributeId, DataValue value)
        {
            if (!SupportsAttribute(attributeId))
            {
                return StatusCodes.BadAttributeIdInvalid;
            }

            value.Value      = Read(attributeId);
            value.StatusCode = StatusCodes.Good;

            if (attributeId == Attributes.Value)
            {
                value.SourceTimestamp = DateTime.UtcNow;
            }

            return ServiceResult.Good;
        }

Same methods

Node::Read ( uint attributeId ) : object