Difference between revisions of "Extensions.EventHandling.TimerExpiredEventSource"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
+ | /// Local Declarations | ||
EventHandling.EventSource EventSourceVariable; | EventHandling.EventSource EventSourceVariable; | ||
+ | /// Flow | ||
EventSourceVariable = EventHandling.TimerExpiredEventSource(NumericTerm); | EventSourceVariable = EventHandling.TimerExpiredEventSource(NumericTerm); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 24: | Line 26: | ||
== OTL Examples == | == OTL Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
+ | /// Local Declarations | ||
+ | |||
EventHandling.EventSource EventSource1; | EventHandling.EventSource EventSource1; | ||
Integer Variable1; | Integer Variable1; | ||
EventHandling.Event Event1; | EventHandling.Event Event1; | ||
+ | |||
+ | /// Flow | ||
EventSource1 = EventHandling.TimerExpiredEventSource(1000); | EventSource1 = EventHandling.TimerExpiredEventSource(1000); | ||
Line 43: | Line 49: | ||
EventHandling.WaitForEvent({EventSource1}, Event1); | EventHandling.WaitForEvent({EventSource1}, Event1); | ||
− | + | terminateLanes; | |
} | } | ||
} | } | ||
Line 50: | Line 56: | ||
== See also == | == See also == | ||
[[Extensions.EventHandling.ThresholdExceededEventSource|ThresholdExceededEventSource]] <br/> | [[Extensions.EventHandling.ThresholdExceededEventSource|ThresholdExceededEventSource]] <br/> | ||
+ | [[Extensions.EventHandling.MonitorChangeEventSource|MonitorChangeEventSource]] <br/> | ||
[[Extensions.EventHandling.WaitForEvent|WaitForEvent]] | [[Extensions.EventHandling.WaitForEvent|WaitForEvent]] |
Revision as of 11:01, 24 October 2018
Contents
Classification
Name | TimerExpiredEventSource |
Short Description | Create an event source for timing |
Class | Term |
Extension | OTX EventHandling extension |
Group | Event source related terms |
Exceptions | OutOfBoundsException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
/// Local Declarations
EventHandling.EventSource EventSourceVariable;
/// Flow
EventSourceVariable = EventHandling.TimerExpiredEventSource(NumericTerm);
Description
The OTX TimerExpiredEventSource term shall create an event source that produces an event when a specified time expires. If the specified time expires, the timer expiry event is produced and put into the event source's queue. Event queueing shall start immediately once the event source is created.
if the timeout value is negative, the OutOfBoundsException exception will be thrown.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
EventSource | The EventSource, the timing monitors. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
TimeOut | Numeric | Term | - | [1] | This element specifies an Integer value that is interpreted as a time in milli-seconds to wait. Float values shall be truncated. |
OTL Examples
/// Local Declarations
EventHandling.EventSource EventSource1;
Integer Variable1;
EventHandling.Event Event1;
/// Flow
EventSource1 = EventHandling.TimerExpiredEventSource(1000);
parallel
{
lane
{
while (true) : Loop0
{
Variable1 = Variable1 + 1;
}
}
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
terminateLanes;
}
}
See also
ThresholdExceededEventSource
MonitorChangeEventSource
WaitForEvent