3 of 3 people found this helpful
Wow you tackled a huge one for practice. Data references may be categorized into 2 general categories: (1) Calculation data reference and (2) System-of-Record data reference. We tend to discourage System-of-Record DR's due to their complexity.
The PI Point DR is considered a complex System-of-Record data reference. Let's ignore the case when a relative attribute is input because that case ultimately means the relative attribute itself uses the PI Point DR. For a getting data from a tag, the GetInputs() returns a null AFAttributeList. Without input attributes, there are no input values, nor would there be an easy way to decide what all the events would be. That means there is a lot of stuff the PI Point DR must do that is not within the typical overrides needed for a Calculation DR. I would suggest that for a practice application you may consider a Calculation DR instead.
There is no naming convention for the ConfigString. That is all left up to a developer. I personally favor name=value pairs delimited by semicolons like you have shown. If you examine the ConfigString of PI Point DR, you will note its first parameter is not name=value, rather its the path of the PI Point or relative attribute, but subsequent parameters do follow name=value. If you look at the Formula DR, there is additional delimiters for brackets ( '[' and ']' ) in addition to the semicolon and equal sign. It is not really AF that reads the configuration - rather it is your data reference that reads it. So everything about the ConfigString is left up to you: the choice of delimiters, the names of parameters, the values of parameters, which parameters are required versus which are optional. All AF does is either reads a string from the ConfigString getter, or else passes in a string to the ConfigString setter. What happens within the getter and setter is up to you. That is to say, composing the string in the getter, or decomposing (parsing) in the setter is up to you.
Hi Rick ,
Many Thanks for your suggestion. That will be the next thing i look at. I would like to stick with this til i can get it working.