OTX Reference  
OpenTestSystem.Otx.Extensions.EventHandling.Actions.CloseEventSource Class Reference

Stop of EventHandling More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.EventHandling.Actions.CloseEventSource:
Inheritance graph

Public Attributes

EventSourceVariable[] source
 One or more sources that can generate events. More...
 
- Public Attributes inherited from OpenTestSystem.Otx.Core.Actions.ActionRealisation
OtxLink validFor
 Validity of ActionRealisation. More...
 

Detailed Description

Stop of EventHandling

The CloseEventSource Activity stops the EventHandling of all specified Event-Sources.

Closed event sources will no more queue any events. Once closed, an event source can not be reopened. Using a closed event source e.g. in a WaitForEvent action is an error and will cause an otx:InvalidReferenceException (through the EventSourceValue term).
In case that CloseEventSource is applied to an event source which is already closed, the action will perform nothing (NOP).

Note
CAUTION — In Parallel execution, situations may occur where an event source gets closed by a CloseEventSource action while being used in a WaitForEvent action (in another parallel lane). If the WaitForEvent action has no other event sources registered, this will cause a deadlock situation. OTX authors need to avoid such situations by careful test sequence design and the usage of the MutexGroup node.
Syntax
EventHandling.CloseEventSource({EventSourceVariable[ ] source});
EventSourceVariable[] source
One or more sources that can generate events.
Definition: EventHandling.cs:382
Examples
// Local Declarations
Integer Variable1 = 0;
EventHandling.Event Event1;
EventHandling.EventSource EventSource1;
// Flow
EventSource1 = EventHandling.MonitorChangeEventSource(Variable1);
Variable1 = Variable1 + 1;
EventHandling.WaitForEvent({EventSource1}, Event1);
EventHandling.CloseEventSource({EventSource1});

Member Data Documentation

◆ source

EventSourceVariable [] OpenTestSystem.Otx.Extensions.EventHandling.Actions.CloseEventSource.source

One or more sources that can generate events.