AGI STK VGT 11 Send comments on this topic.
IAgCrdnEventSmartEpoch Interface
Windows






Windows & Linux

Description

A smart epoch.

Object Model


Public Methods

Public Method SetExplicitTimeSets explicit time instant and the smart epoch's state to Explicit.
Public Method SetImplicitTimeSets the reference event and the smart epoch's state to Implicit.

Public Properties

Public Property ReferenceEventA reference event object used to compute time instant if the state is set to implicit.
Public Property StateState of the event.
Public Property TimeInstantRepresents the time instant if the state is set to explicit.

Example

Create and configure explicit smart epoch event.
[C#]Copy Code
IAgCrdnEventSmartEpoch smartEpoch = provider.Events.Factory.CreateSmartEpochFromTime("1 May 2016 04:00:00.000"); 
 
// Smart epochs can be set explicitly (Uses current DateTime unit preference, this code snippet assumes UTCG) 
smartEpoch.SetExplicitTime("1 May 2015 01:00:00.000"); 
 
Console.WriteLine("Event occurred at: " + smartEpoch.TimeInstant); 
 

Create and configure implicit smart epoch event.
[C#]Copy Code
IAgCrdnEvent referencedEvent = provider.Events["AvailabilityStartTime"]; 
IAgCrdnEventSmartEpoch smartEpoch = provider.Events.Factory.CreateSmartEpochFromEvent(referencedEvent); 
 
// Smart epochs can be set implicitly using the another epoch. 
IAgCrdnEvent anotherEvent = provider.Events["AvailabilityStopTime"]; 
smartEpoch.SetImplicitTime(anotherEvent); 
 
Console.WriteLine("Event occurred at: " + smartEpoch.TimeInstant); 
 

Create and configure explicit smart epoch event.
[Visual Basic .NET]Copy Code
Dim smartEpoch As IAgCrdnEventSmartEpoch = provider.Events.Factory.CreateSmartEpochFromTime("1 May 2016 04:00:00.000")

' Smart epochs can be set explicitly (Uses current DateTime unit preference, this code snippet assumes UTCG)
smartEpoch.SetExplicitTime("1 May 2015 01:00:00.000")

Console.WriteLine("Event occurred at: " + smartEpoch.TimeInstant)

Create and configure implicit smart epoch event.
[Visual Basic .NET]Copy Code
Dim referencedEvent As IAgCrdnEvent = provider.Events("AvailabilityStartTime")
Dim smartEpoch As IAgCrdnEventSmartEpoch = provider.Events.Factory.CreateSmartEpochFromEvent(referencedEvent)

' Smart epochs can be set implicitly using the another epoch.
Dim anotherEvent As IAgCrdnEvent = provider.Events("AvailabilityStopTime")
smartEpoch.SetImplicitTime(anotherEvent)

Console.WriteLine("Event occurred at: " + smartEpoch.TimeInstant)

CoClasses that Implement IAgCrdnEventSmartEpoch

© 2018 Analytical Graphics, Inc. All Rights Reserved.