Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFTimeRule Class

  • Last UpdatedNov 18, 2025
  • 9 minute read
AFTimeRule Class
The AFTimeRule provides a way to create case time periods based on user supplied logic and configuration.

Inheritance Hierarchy

SystemObject
  OSIsoft.AFAFObject
    OSIsoft.AF.TimeAFTimeRule

Namespace:  OSIsoft.AF.Time
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

[SerializableAttribute]
public abstract class AFTimeRule : AFObject, 
	IComparable<AFTimeRule>, IAFTrace
<SerializableAttribute>
Public MustInherit Class AFTimeRule
	Inherits AFObject
	Implements IComparable(Of AFTimeRule), IAFTrace

Dim instance As AFTimeRule
[SerializableAttribute]
public ref class AFTimeRule abstract : public AFObject, 
	IComparable<AFTimeRule^>, IAFTrace
[<AbstractClassAttribute>]
[<SerializableAttribute>]
type AFTimeRule =  
    class
        inherit AFObject
        interface IComparable<AFTimeRule>
        interface IAFTrace
    end

The AFTimeRule type exposes the following members.

Properties

  NameDescription
Public property
AdditionalInfo
This property represents the additional information associated with the event.
Public property
Analysis
This property returns the analysis that owns this object.
Public property
AnalysisTemplate
This property returns the analysis template that owns this object.
Public property
ConfigString
This property represents the current configuration of the Time Rule as a string suitable for displaying to an end-user and/or setting its configuration.
Public property
ConfigStringStored
Returns the currently stored configuration string.
Public property
Database
This read-only property returns the AFDatabase where this object is defined.
Public property
Description
Read-only property that provides more detailed description of the object.
Public property
DisplayString
Returns the configuration of the AFTimeRule for display purposes.
Public property
EditorType
This method returns the Type of the editor that is used to configure this time rule.
Public property
HasChildren Obsolete.
This read-only property returns if the time rule has child time rules.
Public property
ID
Read-only property that provides a unique identifier for the object to be used for quick access that is not dependent upon the index.
(Inherited from AFObject.)
Public property
Identity
This read-only property contains identity of the object.
(Inherited from AFObject.)
Public property
IsConfigured
This method returns if the time rule instance is properly configured.
Public property
IsDeleted
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.)
Public property
IsInitializing
Indicates that the AFTimeRule is in the process of being initialized.
Public property
MergeDuplicatedItems
When the same event is generated by multiple time rules, should we merge them? An event is considered the same if its start and end times are the same.
Public property
Name
Read-only property that identifies the name of the object.
Public property
Parent Obsolete.
Returns the parent time rule which owns this time rule.
Public property
PISystem
This read-only property allows access to the PISystem associated with this object.
(Inherited from AFObject.)
Public property
PlugIn
This read-only property returns the AFPlugIn used to create this instance of the plugin.
Public property
SimplifiedConfigString
This property presents a simplified view of the current configuration of the Time Rule that is easier for users to edit and that does not contain redundant information (e.g. IDs for resolution).
Public property
TimeRules Obsolete.
This read-only property returns the child time rules.
Public property
UniqueID
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.)

Methods

  NameDescription
Public method
CompareTo(Object)
Compares this instance with a specified Object.
(Inherited from AFObject.)
Public method
CompareTo(AFObject)
Compares this instance with a specified AFObject.
(Inherited from AFObject.)
Public method
DefaultSaveConfigChanges
Called by the protected SaveConfigChanges method to perform the default actions to save the configuration changes.
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.)
Public method
Equals(AFObject)
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.)
Public method
ErrorToLocalizedString
Translates error code to a localized string.
Public methodStatic member
FindTimeRule(AFAnalysis, Guid)
Retrieves the AFTimeRule object from the AFAnalysis with the specified unique identifier.
Public methodStatic member
FindTimeRule(AFAnalysisTemplate, Guid)
Retrieves the AFTimeRule object from the AFAnalysisTemplate with the specified unique identifier.
Public method
GetEditorT
Returns an instance of an editor of the specified type.
Public method
GetEvents
Returns all pending AFTimeRuleEvent objects.
Public method
GetEvents(AFTimeRange)
Returns all AFTimeRuleEvent objects for a given time range.
Public method
GetHashCode
Gets the hash code for this instance of the object which is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from AFObject.)
Public method
GetNextEvent
Returns the next AFTimeRuleEvent that occurs relative to Now or the previous event.
Public method
GetNextEvent(AFTime)
Returns the next AFTimeRuleEvent that occurs at the specified time start time.
Public method
GetNextEvent(AFTimeRuleEvent)
Returns the next AFTimeRuleEvent that occurs after the previously specified event.
Public method
GetPath
Returns the full path to the object, using just the names.
(Inherited from AFObject.)
Public method
GetPath(AFObject)
Returns the path to the object relative from another object.
(Inherited from AFObject.)
Public method
GetPath(AFEncodeType, AFObject)
Returns the path to the object relative from another object, using the name and/or id as specified by encodeType.
(Inherited from AFObject.)
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
IsTraced
Indicates if a specified level is being traced.
Public method
Pause
Pause the time rule until it is started again.
Public method
Pause(TimeSpan)
Pause the time rule for a specified amount of time.
Public method
Persist
This method returns the persistence string for the object.
(Inherited from AFObject.)
Public method
RefreshConfiguration
Refresh the configuration of the AFTimeRule.
Public method
Reset
Clear the previous time rule event.
Public method
SetSaveConfigChangesHandler
Set the handler used for saving ConfigString changes.
Public method
Start
Start the time rule
Public method
Stop
Stop the time rule; the previous rule event is cleared.
Public methodStatic member
SupportsChildTimeRule Obsolete.
Determines if the specified AFPlugIn supports adding child time rules.
Public method
ToString
Returns a String that represents the current object.
(Overrides AFObjectToString.)
Public method
TraceData
Output a data trace event.
Public method
TraceDetail
Output a detail trace event.
Public method
TraceError
Output an error trace event.
Public method
TraceEvent(AFTraceSwitchLevel, String)
Output a trace event with a message.
Public method
TraceEvent(AFTraceSwitchLevel, String, Int32)
Output a trace event with a message and a duration.
Public method
TraceEvent(AFTraceSwitchLevel, String, Object)
Output a trace event as a formatted message with a variable number of arguments.
Public method
TraceInformation
Output an information trace event.
Public method
TraceSummary
Output a summary trace event.
Public method
TraceWarning
Output a warning trace event.

Events

  NameDescription
Public event
EventsGenerated
Event is raised when events are generated by the time rule.

Remarks

The time rules are defined and implemented by AFPlugIns which inherit from this abstract class. The AFTimeRule PlugIns are used to provide the next start and end time of a case, given the previous case, time, or time range.

Version Information

AFSDK


See Also

TitleResults for “How to create a CRG?”Also Available in