OTX Reference  
OpenTestSystem.Otx.Extensions.EventHandling.Terms.CompositeEventSource Class Reference

An event:EventSourceTerm that collects events from a list of event sources. More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.EventHandling.Terms.CompositeEventSource:
Inheritance graph

Public Attributes

ListTerm eventSources
 Cardinality [1]
The list of eventsources that the term combines. If the List is empty this term will never return an Event. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Terms.Term
MetaData metaData
 Cardinality [0..1]
The MetaData type allows tools to store additional, mainly tool-specific data. More...
 

Detailed Description

An event:EventSourceTerm that collects events from a list of event sources.

CompositeEventSource is an event:EventSourceTerm that collects events from a list of event sources. When used in an event:WaitForEvent action it will return the first event generated by any of its sources.

CompositeEventSource allows a dynamically-created list of sources to be used with event:WaitForEvent. Events returned from this source will contain the event:EventSource that originally generated the event, and not the CompositeEventSource itself.

Important: If the list of sources is changed while executing event:WaitForEvent then the behaviour is undefined.

Syntax
CompositeEventSource EventHandling.CompositeEventSource(ListTerm eventSources);
Examples
// Local Declarations
EventHandling.EventSource EventSource1;
List<EventHandling.EventSource> List1;
Integer Variable1;
EventHandling.Event Event1;
Boolean Boolean1;
// Flow
List1 = ListCreate(EventHandling.EventSource, { EventHandling.MonitorChangeEventSource(Variable1), EventHandling.TimerExpiredEventSource(10000)});
EventSource1 = EventHandling.CompositeEventSource(List1);
parallel
{
lane
{
EventHandling.WaitForEvent({EventSource1}, Event1);
Boolean1 = EventHandling.IsMonitorChangeEvent(Event1);
}
lane
{
EventHandling.Sleep(3000);
Variable1 = 100;
}
}

Member Data Documentation

◆ eventSources

ListTerm OpenTestSystem.Otx.Extensions.EventHandling.Terms.CompositeEventSource.eventSources

Cardinality [1]
The list of eventsources that the term combines. If the List is empty this term will never return an Event.

OpenTestSystem.Otx.Extensions.EventHandling.Terms.CompositeEventSource.eventSources
ListTerm eventSources
Cardinality [1] The list of eventsources that the term combines. If the List is empty this term will ...
Definition: EventHandling.cs:1531