Welcome Guest, you are in: Login

EventIDE Wiki

RSSRSS

Navigation




Search the wiki


PoweredBy

Page History: Events

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2013/10/31 17:06


 Events
Info
Category: Design AddIn:
Creator: Scope:
Owns Snippets: Usage: Runtime Screen,Snippets


Description

Events are timeline units that describe an experiment scenario in EventIDE. A typical scenario consists of a sequence of events, which are activated one by one, in accordance with a flow logic. In many cases events are associated with visual screens containing some graphics content, like slides in Microsoft PowerPoint. However, events can be tied to the non-visual logic as well- for example, an event can be created that sends data via a serial port, while keeping the visual scene unchanged.

Event Layers

Events are organized in the event layers which can contain any number of events. At runtime, only one event can be active in time on the event layer. Thus, events in the event layer are activated one by one according to the predefined event flow, which can be controlled either by timing or/and logical conditions. Multiple event layers can be presented in an experiment, arranged in a hierarchical fashion.

Order of events

Presentation of events always starts with the first event on the event layer. Then, the presentation order is defined by flow routes that you create in accordance with the experiment logic. When there are no outgoing flow routes defined, the current event stays active. A single event can be reactivated many times, if a flow logic demands it.

Content of events

The functional role of the event is often defined by elements that belong to event's own element list. Each event works as a container where you put multiple elements of different types. After adding an element you can set and adjust element's properties. For example, if you add the Text Element into an event and set element's property Text to "Hello, World!" then, when you run an experiment and get the event activated, you will see this global greeting on your screen.

Event as a working scope

Event also represents a working scope for its elements. For example, you can add the Button element into an Event, which becomes a parent event for the created element. The button element will be able to detect a pressing of the particular button only while the parent Event is active. As soon as the experiment flow switches to another event all button presses will be ignored.

In certain scenarios you may want to be able to detect a button press during several consecutive events that, for example, provide a transformation of the visual stimulus. To solve it, you can create several button elements for each of the visual events but there is an easier solution: any Event can be expanded with its own layer of children events (event sublayer). For the discussed button scenario you should simply: 1) select a single parent event, 2) add an event sublayer on it, 3) create on the sublayer several children events that are responsible for stimulus transformation and, 4) add a Button element into the Parent event. After doing it, a button press will be detected anytime while a stimulus transformation is performed. The hierarchy of events and events layers in EventIDE offers a very powerful and flexible tool for creating custom experiment scenarios. Events represent main building blocks for any experiment scenario in EventIDE. A typical scenario consists of a sequence of events which are activated one by one, according to a logic predefined by the event flow. In the simplest case, events can be associated with visual scenes containing their own graphics content, like slides in Microsoft PowerPoint. Then, the whole experiment will appear as a sequence of visual scenes. However, events can be tied to the non-visual actions as well- for example, with initiation a serial port communication at the certain time, while keeping visual output on the screen unchanged.

Snapshots

Snapshot 1

Snapshot 1

Snapshot 2

Snapshot 2


Practical Use

Once you create a new blank experiment, it contains a root event layer with a single event. You can add new events via the Event ribbon tab. New events appear in the Event panel, where you can reorder them by dragging. To manage event layers press the right-most button in the event panel.
Image


Figure 1: Hovering with the mouse on the gray border of an existing event means that a plus icon will appear and a new event can be added.

Three relevant event windows are depicted in the first view below: Event Representation (panel), Event, description (the central one) and Event's elements (the left central panel) (Figure 2).

Image

Figure 2: First screen presented to the user when you open a new experiment in EventIDE.

The Event representation window allows control over an event by determining whether the event is activated by time or by a particular condition (the clock/pen icon on the bottom left) and how many milliseconds the event will be active for (the number (ms) in the center).

Activating an event by time (the clock icon) means that it will automatically be activated when the previous event in the sequence (as defined by the Event Flow Chart) is completed.

Activating an event by condition (the pen icon) means that the event will only be activated upon the resolution of a logical condition, the code for which can be inserted in the code snippets section at the bottom of the window (in box Condition). For example feedback might be given to a participant at the end of each trial, in which case the event will be activated upon a button press.

Activating an event by either condition or time (the half pen/half clock icon with the orange line) means that either a condition has to be met, or a previous event has to have lapsed before the event is activated. For example feedback might be given to a participant at the end of each trial – this may be conditional upon a button press, or after the stimuli has been shown for a certain period of time (such as 5000 ms).

Activating an event by both condition and time (half pen/half clock icon) means that a logical condition (as defined in the Condition code snippets) and a time condition have to be met before activation of the event (Figure 3)

Image


Figure 3: Icons representing conditions to move to the next event.

Properties

Generic Properties

NameDescriptionAttributesValue Type
Control
DurationDefines the requested duration of the event in ms. Duration is a time that you plan for the event to stay activated before switching to one of the next events as determined by the event layer flow. The property is used only if the time-depended switch is defined in the event flow. The actual duration of the event represented by another property since it may differ from the requested value (for example, if the event switches are synchronized with monitor refreshes) In the property grid, beside of the property value, you can see also the actual predicted duration of the event both in ms and monitors frames (with the current display settings).D,RUInt64
IndexIndicates the index of the given event in its event layer.D,R Read-OnlyInt32
TitleEvent title as it appears everywhere in GUI.DString
Snap ShotDefines if the runtime activation of the event is followed by making a snapshot of the entire screen. The made snapshot can be read by the CurrentScreen property of the experiment and rendered on the Status Screen or saved into a file. The default value is false, if you set it to true, be aware of a possible performance lag immediately after the event appears on the screen.DBoolean
Visual Transforms
Rotation angleSets a global rotational transform applied to the entire visual scene of the event. The value is defined in degrees (0..360) and goes anti-clock wise starting from the right tail of a horizontal axis that crosses the screen center.D,R*float
Positional shiftSets a global positional transform applied to the entire visual scene of the event, separately for the X and Y axis. The default value is (0,0) which means no transformation and can be defined both in pixels and visual degrees.D,R*clPoint
ScaleSets a global scaling transform applied to the entire visual scene of the event, separately for the X and Y axis, relatively to the screen center. The default value is (1,1) which means no transformation. The values less than 1 produce downscaling and values greater than 1 upscaling. The negative values, e.g. -1, flip the scene over the corresponding axis.D,R*clScale
Visual Appearance
Background ColorThe background color of the event visual scene. Default value is transparent. Keep transparency in order to combine the visual content of the given event with visual content of the parent events.D,R*clColor
Mouse CursorDefines whether a mouse cursor is shown while the event is active in runtime.D,RBoolean
Runtime
Child IndexIndex of the active child event on its event layer. Setting this property at the runtime will cause immediate activation of the children event with the corresponded index regardless of the predefined event flow.R*Int32
RadarThe most recent point in screen coordinates that is collected from the current positional input of the event. The property value is updated on every OnRunning cycle. If the current positional input is provided by a mouse, then writing to this property at runtime will causes moving a mouse cursor to the provided position.RclPoint
Radar TailAn array containing all points collected from the current positional input in interval between two recent OnRunning cycles. The last point in this array is always mirrored by the Radar property.R,Read-OnlyclPoint[]
Radar OKIndicates if the coordinates exposed by Radar property are valid in the current context.RBoolean
Statistics
Actual DurationActual duration of the event measured after every activation and deactivation of the event in ms. Check or record this property value in order to assess timing accuracy in experiment.R,Read-OnlyUInt64
Snippets TimesExecution times of all event snippets in ms. Check the values to see how fast are your snippets.R,Read-OnlyUInt64[]
Elapsed TimeThe time passed since last activation of the event in ms. Use this property for custom timing based actions.R,Read-OnlyUInt64
Preparation TimeThe time that the events needs for a single offline preparation of its visual scene.R,Read-Only UInt64
Drawing Time The time that the events needs to send its visual scene to the video memory just before it comes on the screen.R,Read-Only UInt64
Running Interval The measured time interval between two last OnRunning cycles. If there is no work that the event or its elements do while event is active, this time interval is close to zero.R,Read-Only UInt64

ScrewTurn Wiki version 5.2.0.8. Some of the icons created by FamFamFam.