I am quite new to AF SDK Development, so maybe this is a silly question...
I am creating a DataReference (derive from AFDataReference).
This DataReference should (according to the configuration) select one AFValue. It can be configured to return a configured (by Attribute Name) value, but it should also be able to select an AFValue depending on an Annotation.
Please consider the following code:
public override AFValue GetValue(object context, object timeContext, AFAttributeList inputAttributes, AFValues inputValues)
if (inputValues.Count == 1 && SelectorMode == StreamSelectorMode.Single)
else if (inputValues.Count > 1 && SelectorMode == StreamSelectorMode.Single)
AFValue val1 = inputValues;
AFValue val2 = inputValues;
return double.Parse(val1.Value.ToString()) > double.Parse(val2.Value.ToString()) ? val1 : val2;
At this point, it just selects the highest value (if 2 values are present). This should be a selection based on an Annotation. The AFValue object does contain an 'Annotated' bool, but I am unable to find out how to obtain the actual annotation.
The help file references to an example, but I cannot find this example.
Can anyone point me to the right direction/example?