protected override object Read(uint attributeId)
{
switch (attributeId)
{
case Attributes.DataType: return m_dataType;
case Attributes.ValueRank: return m_valueRank;
// values are copied when the are written so then can be safely returned.
case Attributes.Value:
{
return m_value.Value;
}
case Attributes.ArrayDimensions:
{
if (m_arrayDimensions == null || m_arrayDimensions.Count == 0)
{
return StatusCodes.BadAttributeIdInvalid;
}
return m_arrayDimensions.ToArray();
}
}
return base.Read(attributeId);
}