Description
The factory creates event interval
lists.
Object Model
Public Methods
Create |
Create and register an
interval list using specified name, description, and type. |
CreateEventIntervalListCondition |
Create an interval list
containing intervals during which specified condition is
satisfied. |
CreateEventIntervalListFile |
Create an interval list
based on specified interval file. |
CreateEventIntervalListFiltered |
Create an interval list by
filtering intervals from original interval list using specified
filtering method. |
CreateEventIntervalListFixed |
Interval list defined by
time ordered non-overlapping intervals each explicitly specified by
its start and stop times. Stop date/time is required to be at or
after start for each interval. |
CreateEventIntervalListFromFile |
This method is deprecated.
Use CreateEventIntervalListFile instead. Create an interval list
loaded from specified interval file. |
CreateEventIntervalListMerged |
Create an interval list by
merging two constituent interval lists using specified logical
operation. |
CreateEventIntervalListScaled |
Create an interval list
defined by scaling every interval in original interval list using
either absolute or relative scale. |
CreateEventIntervalListSignaled |
Create an interval list
recorded at the target clock location by performing signal
transmission of original interval list between base and target
clock locations. |
CreateEventIntervalListTimeOffset |
Create an interval list
defined by shifting the specified reference interval list by a
fixed time offset. |
IsTypeSupported |
Returns whether the
specified type is supported. |
Example
Create and configure
filtered event interval list.
[C#] |
Copy Code
|
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFiltered("MyIntervalListFiltered", "MyDescription");
IAgCrdnEventIntervalListFiltered listFiltered = intervalList as IAgCrdnEventIntervalListFiltered;
listFiltered.OriginalIntervals = provider.EventIntervalLists["AttitudeIntervals"];
IAgCrdnFirstIntervalsFilter firstIntervals = listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterFirstIntervals) as IAgCrdnFirstIntervalsFilter;
firstIntervals.MaximumNumberOfIntervals = 3;
IAgCrdnSatisfactionConditionFilter asSatisfactionCondition = listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterSatisfactionIntervals) as IAgCrdnSatisfactionConditionFilter;
asSatisfactionCondition.Condition = provider.Conditions["BeforeStop"];
asSatisfactionCondition.DurationKind = AgECrdnIntervalDurationKind.eCrdnIntervalDurationKindAtLeast;
asSatisfactionCondition.IntervalDuration = 30;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure
time offset event interval list.
[C#] |
Copy Code
|
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListTimeOffset("MyIntervalListFixedTimeOffset", "MyDescription");
IAgCrdnEventIntervalListTimeOffset asTimeOffset = intervalList as IAgCrdnEventIntervalListTimeOffset;
asTimeOffset.ReferenceIntervals = provider.EventIntervalLists["AfterStart.SatisfactionIntervals"];
asTimeOffset.TimeOffset = 300;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure
event interval list from file.
[C#] |
Copy Code
|
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFile("MyIntervalListFromFile", "MyDescription", intervalFile);
IAgCrdnEventIntervalListFile asListFile = intervalList as IAgCrdnEventIntervalListFile;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure
merged event interval list.
[C#] |
Copy Code
|
IAgCrdnProvider satelliteVgtProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt;
IAgCrdnProvider aircraftVgtProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt;
IAgCrdnEventIntervalList intervalList = satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListMerged("MyIntervalListMerged", "MyDescription");
IAgCrdnEventIntervalListMerged asListMerged = intervalList as IAgCrdnEventIntervalListMerged;
asListMerged.SetIntervalListA(satelliteVgtProvider.EventIntervalLists["AvailabilityIntervals"]);
asListMerged.SetIntervalListB(aircraftVgtProvider.EventIntervalLists["AvailabilityIntervals"]);
asListMerged.MergeOperation = AgECrdnEventListMergeOperation.eCrdnEventListMergeOperationMINUS;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure
list condition event interval.
[C#] |
Copy Code
|
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListCondition("MyIntervalListSatisfaction", "MyDescription");
IAgCrdnEventIntervalListCondition asListCondition = intervalList as IAgCrdnEventIntervalListCondition;
asListCondition.Condition = provider.Conditions["AfterStart"];
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure
scaled event interval list.
[C#] |
Copy Code
|
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListScaled("MyIntervalListScaled", "MyDescription");
IAgCrdnEventIntervalListScaled asListScaled = intervalList as IAgCrdnEventIntervalListScaled;
asListScaled.AbsoluteIncrement = 40;
asListScaled.UseAbsoluteIncrement = false;
asListScaled.RelativeIncrement = 20;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Create and configure
signaled event interval list.
[C#] |
Copy Code
|
IAgCrdnProvider satelliteVgtProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt;
IAgCrdnProvider aircraftVgtProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt;
IAgCrdnEventIntervalList intervalList = satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListSignaled("MyIntervalListSignaled", "MyDescription");
IAgCrdnEventIntervalListSignaled asListSingled = intervalList as IAgCrdnEventIntervalListSignaled;
asListSingled.OriginalIntervals = aircraftVgtProvider.EventIntervalLists["BeforeStop.SatisfactionIntervals"];
asListSingled.BaseClockLocation = satelliteVgtProvider.Points["Center"];
asListSingled.TargetClockLocation = aircraftVgtProvider.Points["Center"];
asListSingled.SignalSense = AgECrdnSignalSense.eCrdnSignalSenseTransmit;
IAgCrdnSignalDelayBasic basicSignalDelay = asListSingled.SignalDelay as IAgCrdnSignalDelayBasic;
basicSignalDelay.SpeedOption = AgECrdnSpeedOptions.eCrdnCustomTransmissionSpeed;
basicSignalDelay.TimeDelayConvergence = 0.002;
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals();
if (intervals.IsValid)
{
foreach (IAgCrdnInterval interval in intervals.Intervals)
{
Console.WriteLine("Start: " + interval.Start);
Console.WriteLine("Stop: " + interval.Stop);
}
}
|
|
Determine if the
specified event interval list type is supported.
[C#] |
Copy Code
|
if (provider.EventIntervalLists.Factory.IsTypeSupported(eventIntervalListType))
{
IAgCrdnEventIntervalList eventIntervalList = provider.EventIntervalLists.Factory.Create(
"MyEventIntervalList", string.Empty,
eventIntervalListType);
}
|
|
Create and configure
filtered event interval list.
[Visual Basic .NET] |
Copy Code
|
Dim intervalList As
IAgCrdnEventIntervalList =
provider.EventIntervalLists.Factory.CreateEventIntervalListFiltered("MyIntervalListFiltered",
"MyDescription")
Dim listFiltered As IAgCrdnEventIntervalListFiltered =
TryCast(intervalList, IAgCrdnEventIntervalListFiltered)
listFiltered.OriginalIntervals =
provider.EventIntervalLists("AttitudeIntervals")
Dim firstIntervals As IAgCrdnFirstIntervalsFilter =
TryCast(listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterFirstIntervals),
IAgCrdnFirstIntervalsFilter)
firstIntervals.MaximumNumberOfIntervals = 3
Dim asSatisfactionCondition
As IAgCrdnSatisfactionConditionFilter
=
TryCast(listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterSatisfactionIntervals),
IAgCrdnSatisfactionConditionFilter)
asSatisfactionCondition.Condition =
provider.Conditions("BeforeStop")
asSatisfactionCondition.DurationKind =
AgECrdnIntervalDurationKind.eCrdnIntervalDurationKindAtLeast
asSatisfactionCondition.IntervalDuration = 30
Dim intervals As IAgCrdnIntervalListResult =
intervalList.FindIntervals()
If intervals.IsValid Then
For
Each interval As IAgCrdnInterval In
intervals.Intervals
Console.WriteLine("Start:
" + interval.Start)
Console.WriteLine("Stop:
" + interval.[Stop])
Next
End If
|
|
Create and configure
time offset event interval list.
[Visual Basic .NET] |
Copy Code
|
Dim intervalList As
IAgCrdnEventIntervalList =
provider.EventIntervalLists.Factory.CreateEventIntervalListTimeOffset("MyIntervalListFixedTimeOffset",
"MyDescription")
Dim asTimeOffset As IAgCrdnEventIntervalListTimeOffset =
TryCast(intervalList, IAgCrdnEventIntervalListTimeOffset)
asTimeOffset.ReferenceIntervals =
provider.EventIntervalLists("AfterStart.SatisfactionIntervals")
asTimeOffset.TimeOffset = 300
Dim intervals As IAgCrdnIntervalListResult =
intervalList.FindIntervals()
If intervals.IsValid Then
For
Each interval As IAgCrdnInterval In
intervals.Intervals
Console.WriteLine("Start:
" + interval.Start)
Console.WriteLine("Stop:
" + interval.[Stop])
Next
End If
|
|
Create and configure
event interval list from file.
[Visual Basic .NET] |
Copy Code
|
Dim intervalList As IAgCrdnEventIntervalList =
provider.EventIntervalLists.Factory.CreateEventIntervalListFile("MyIntervalListFromFile",
"MyDescription", intervalFile)
Dim asListFile As IAgCrdnEventIntervalListFile =
TryCast(intervalList, IAgCrdnEventIntervalListFile)
Dim intervals As IAgCrdnIntervalListResult =
intervalList.FindIntervals()
If intervals.IsValid Then
For
Each interval As IAgCrdnInterval In
intervals.Intervals
Console.WriteLine("Start:
" + interval.Start)
Console.WriteLine("Stop:
" + interval.[Stop])
Next
End If
|
|
Create and configure
merged event interval list.
[Visual Basic .NET] |
Copy Code
|
Dim satelliteVgtProvider As IAgCrdnProvider =
stkRoot.GetObjectFromPath("Satellite/LEO").Vgt
Dim aircraftVgtProvider As IAgCrdnProvider =
stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt
Dim intervalList As IAgCrdnEventIntervalList =
satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListMerged("MyIntervalListMerged",
"MyDescription")
Dim asListMerged As IAgCrdnEventIntervalListMerged =
TryCast(intervalList, IAgCrdnEventIntervalListMerged)
asListMerged.SetIntervalListA(satelliteVgtProvider.EventIntervalLists("AvailabilityIntervals"))
asListMerged.SetIntervalListB(aircraftVgtProvider.EventIntervalLists("AvailabilityIntervals"))
asListMerged.MergeOperation =
AgECrdnEventListMergeOperation.eCrdnEventListMergeOperationMINUS
Dim intervals As IAgCrdnIntervalListResult =
intervalList.FindIntervals()
If intervals.IsValid Then
For
Each interval As IAgCrdnInterval In
intervals.Intervals
Console.WriteLine("Start:
" + interval.Start)
Console.WriteLine("Stop:
" + interval.[Stop])
Next
End If
|
|
Create and configure
list condition event interval.
[Visual Basic .NET] |
Copy Code
|
Dim intervalList As
IAgCrdnEventIntervalList =
provider.EventIntervalLists.Factory.CreateEventIntervalListCondition("MyIntervalListSatisfaction",
"MyDescription")
Dim asListCondition As IAgCrdnEventIntervalListCondition =
TryCast(intervalList, IAgCrdnEventIntervalListCondition)
asListCondition.Condition = provider.Conditions("AfterStart")
Dim intervals As IAgCrdnIntervalListResult =
intervalList.FindIntervals()
If intervals.IsValid Then
For
Each interval As IAgCrdnInterval In
intervals.Intervals
Console.WriteLine("Start:
" + interval.Start)
Console.WriteLine("Stop:
" + interval.[Stop])
Next
End If
|
|
Create and configure
scaled event interval list.
[Visual Basic .NET] |
Copy Code
|
Dim intervalList As
IAgCrdnEventIntervalList =
provider.EventIntervalLists.Factory.CreateEventIntervalListScaled("MyIntervalListScaled",
"MyDescription")
Dim asListScaled As IAgCrdnEventIntervalListScaled =
TryCast(intervalList, IAgCrdnEventIntervalListScaled)
asListScaled.AbsoluteIncrement = 40
asListScaled.UseAbsoluteIncrement = False
asListScaled.RelativeIncrement = 20
Dim intervals As IAgCrdnIntervalListResult =
intervalList.FindIntervals()
If intervals.IsValid Then
For
Each interval As IAgCrdnInterval In
intervals.Intervals
Console.WriteLine("Start:
" + interval.Start)
Console.WriteLine("Stop:
" + interval.[Stop])
Next
End If
|
|
Create and configure
signaled event interval list.
[Visual Basic .NET] |
Copy Code
|
Dim satelliteVgtProvider As IAgCrdnProvider =
stkRoot.GetObjectFromPath("Satellite/LEO").Vgt
Dim aircraftVgtProvider As IAgCrdnProvider =
stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt
Dim intervalList As IAgCrdnEventIntervalList =
satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListSignaled("MyIntervalListSignaled",
"MyDescription")
Dim asListSingled As IAgCrdnEventIntervalListSignaled =
TryCast(intervalList, IAgCrdnEventIntervalListSignaled)
asListSingled.OriginalIntervals =
aircraftVgtProvider.EventIntervalLists("BeforeStop.SatisfactionIntervals")
asListSingled.BaseClockLocation =
satelliteVgtProvider.Points("Center")
asListSingled.TargetClockLocation =
aircraftVgtProvider.Points("Center")
asListSingled.SignalSense =
AgECrdnSignalSense.eCrdnSignalSenseTransmit
Dim basicSignalDelay As IAgCrdnSignalDelayBasic =
TryCast(asListSingled.SignalDelay, IAgCrdnSignalDelayBasic)
basicSignalDelay.SpeedOption =
AgECrdnSpeedOptions.eCrdnCustomTransmissionSpeed
basicSignalDelay.TimeDelayConvergence = 0.002
Dim intervals As IAgCrdnIntervalListResult =
intervalList.FindIntervals()
If intervals.IsValid Then
For
Each interval As IAgCrdnInterval In
intervals.Intervals
Console.WriteLine("Start:
" + interval.Start)
Console.WriteLine("Stop:
" + interval.[Stop])
Next
End If
|
|
Determine if the
specified event interval list type is supported.
[Visual Basic .NET] |
Copy Code
|
If
provider.EventIntervalLists.Factory.IsTypeSupported(eventIntervalListType)
Then
Dim
eventIntervalList As
IAgCrdnEventIntervalList =
provider.EventIntervalLists.Factory.Create("MyEventIntervalList", String.Empty, eventIntervalListType)
End If
|
|