AFDataReference.RecordedValue Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Returns a single recorded AFValue based on the
passed time and mode.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public virtual AFValue RecordedValue( AFTime time, AFRetrievalMode mode, AFAttributeList inputAttributes, AFValues inputValues )
Public Overridable Function RecordedValue ( time As AFTime, mode As AFRetrievalMode, inputAttributes As AFAttributeList, inputValues As AFValues ) As AFValue Dim instance As AFDataReference Dim time As AFTime Dim mode As AFRetrievalMode Dim inputAttributes As AFAttributeList Dim inputValues As AFValues Dim returnValue As AFValue returnValue = instance.RecordedValue(time, mode, inputAttributes, inputValues)
public: virtual AFValue^ RecordedValue( AFTime time, AFRetrievalMode mode, AFAttributeList^ inputAttributes, AFValues^ inputValues )
abstract RecordedValue : time : AFTime * mode : AFRetrievalMode * inputAttributes : AFAttributeList * inputValues : AFValues -> AFValue override RecordedValue : time : AFTime * mode : AFRetrievalMode * inputAttributes : AFAttributeList * inputValues : AFValues -> AFValue
Parameters
- time
- Type: OSIsoft.AF.TimeAFTime
The time at which the value is desired. - mode
- Type: OSIsoft.AF.DataAFRetrievalMode
The mode is used to determine the value to return when a value does not exist at the exact time specified. The value is taken from the AFRetrievalMode enumeration. - inputAttributes
- Type: OSIsoft.AF.AssetAFAttributeList
The input attributes as previously specified by the data reference in the GetInputs(Object) call. The index of the values will match the index of the corresponding attribute previously returned. These values must be converted to the appropriate UOM required by this data reference. - inputValues
- Type: OSIsoft.AF.AssetAFValues
The input values are supplied to the data reference based on the attributes returned in the GetInputs(Object) call. The index of the values will match the index of the corresponding attribute previously returned. These values must be converted to the appropriate UOM required by this data reference.
Return Value
Type: AFValueReturns the AFValue for the attribute. If AFValue.IsGood returned by the data reference is , then the returned value is converted to the proper UOM and Type. The timestamp of the value will indicate the time of the recorded event. In the case of calculation based data references, it will normally indicate the closest input value's recorded value timestamp.
Exceptions
| Exception | Condition |
|---|---|
| NotSupportedException | The data reference does not support this method. |
Remarks
To retrieve recorded values for multiple attributes, use the
AFListData.RecordedValue to achieve better performance.
| This method, property, or class is not available in the legacy .NET 3.5 version of the SDK. |
| You must have ReadData security rights to read a data value. |