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: 2011/07/26 11:30


Element Icon New Element
Info
Category: AddIn: Base Elements
Creator: OkazoLab Team Scope: Parent Event
Owns Snippets: no Usage: Runtime Screen,Snippets


Description

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.

Events are organized in the event layers which can contain any number of events. In the 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 both with timing or/and custom logical conditions.

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 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.

Events are organized in the event layers which can contain any number of events. In the 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 both with timing or/and custom logical conditions.

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 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.

Snapshots

Snapshot 1

Snapshot 1

Snapshot 2

Snapshot 2


Practical Use

When you create a new experiment, a root event layer with one event will be automatically created. You can add new events either by selecting Experiment - Add new Event from the main menu (which will add a new event to the end of the current layer’s sequence of events) or new events can quickly be inserted anywhere in the current layer’s sequence by hovering with the mouse on the border of a current event. A plus icon will appear and clicking on it will create a new event (Figure 1). To add an event as a sub layer (if a new event is needed to occur at the same time as another), navigate to the Root menu and create a new event from the Event Layers diagram (see section Layers).

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.