public virtual object GetAttributeValue(
FilterContext context,
NodeId typeDefinitionId,
IList<QualifiedName> relativePath,
uint attributeId,
NumericRange indexRange)
{
// check the type definition.
if (!NodeId.IsNull(typeDefinitionId) && typeDefinitionId != ObjectTypes.BaseEventType)
{
if (!context.TypeTree.IsTypeOf(TypeDefinitionId, typeDefinitionId))
{
return null;
}
}
// read the child attribute.
DataValue dataValue = new DataValue();
ServiceResult result = ReadChildAttribute(
null,
relativePath,
0,
attributeId,
dataValue);
if (ServiceResult.IsBad(result))
{
return null;
}
// apply any index range.
object value = dataValue.Value;
if (value != null)
{
result = indexRange.ApplyRange(ref value);
if (ServiceResult.IsBad(result))
{
return null;
}
}
// return the result.
return value;
}
#endregion