Opc.Ua.BaseVariableTypeState.Update C# (CSharp) Method

Update() public method

Updates the specified context.
public Update ( ISystemContext context, BinaryDecoder decoder, AttributesToSave attibutesToLoad ) : void
context ISystemContext The context.
decoder BinaryDecoder The decoder.
attibutesToLoad AttributesToSave The attributes to load.
return void
        public override void Update(ISystemContext context, BinaryDecoder decoder, AttributesToSave attibutesToLoad)
        {
            base.Update(context, decoder, attibutesToLoad);

            if ((attibutesToLoad & AttributesToSave.Value) != 0)
            {
                WrappedValue = decoder.ReadVariant(null);
            }

            if ((attibutesToLoad & AttributesToSave.DataType) != 0)
            {
                m_dataType = decoder.ReadNodeId(null);
            }

            if ((attibutesToLoad & AttributesToSave.ValueRank) != 0)
            {
                m_valueRank = decoder.ReadInt32(null);
            }

            if ((attibutesToLoad & AttributesToSave.ArrayDimensions) != 0)
            {
                UInt32Collection arrayDimensions = decoder.ReadUInt32Array(null);

                if (arrayDimensions != null && arrayDimensions.Count > 0)
                {
                    m_arrayDimensions = new ReadOnlyList<uint>(arrayDimensions);
                }
                else
                {
                    m_arrayDimensions = null;
                }
            }
        }
        #endregion

Same methods

BaseVariableTypeState::Update ( ISystemContext context, XmlDecoder decoder ) : void