Working with Events

The Event Editor is used to add and edit event definitions.

Opening the Event Editor

The different ways to open the Event Editor are:

  • From the main toolbar, with a Storyboard Editor open, click the Open Event Editor button.

    event_editor_on_toolbar.png
  • In the Navigator View, double click a .evt file.

    navigator_event_file.png
  • In the Storyboard IO Connector View, in the Saved mode, right click an event > Edit Event.

    connector_view_edit_event.png

Adding an Event Definition

The different ways to add a new event are:

  • From the Event Editor, select the Add Event button or right-click the event list, select the New Event menu item

    event_editor_add_event.png
  • Right-click a model object and select Add > Action menu item to open the New Action dialog, then select the Add Event button.

    new_action_dialog_new_event.png

An event definition is made up of four parts, name, type, description and format.

new_event_wizard.png
  • Name - Must not be blank and must only contain alphanumerical characters, periods and underscores.

  • Type

    • Incoming - Events coming into the user interface from external applications.

    • Outgoing - Events from the user interface into external applications.

    • Self - Events generated from the user interface to itself and are generally used to trigger additional behavior in the UI.

  • Description - This field is used to store information about the event definition. Different users and teams will have their own style of event descriptions. A place to store information such as; conditions for events firing, expected behavior or any other descriptive information.

  • Format - For more information about event format strings, read the section on Serialized Data and the Event Format String. To add elements to the format string, press the Add Event Data Elementadd_event_data_element_button.png button and open the New Storyboard IO Data Element Wizard.

    new_sbio_data_element_wizard.png
    • Name - Must not be blank, must only contain alphanumerical characters or underscores and cannot begin with a number.

    • Format - The size(8,4,2,1 bytes) and type(signed, unsigned, float) of data.

    • Array Size - If this data element is an array, the Array Size will be greater than 1.

Data Element Types

These are the different data element types and their default Min/Max attributes.

data_types.png

Changing Element Array Length

It is possible to change the size of an element array during the creation of the data element or after the event has been created by right-clicking on an event data element in the Event Editor > Change Array Length.

event_editor_array_length.png

The Change Array Size Dialog will be opened. This is a simple dialog that accepts a number which will be used as the array length for the selected data element. The array length must be greater than zero.

change_array_size_dialog.png

Reordering Event Data Elements

The event format can be changed by reording the data elements. This is done using drag and drop operations. There are rules that enforce the order of data elements from the largest data types down to the smallest data types. Data elements that are of common size can be reordered amonst themseleves, regardless of their type(i.e. 4u1, 4s1 and 4f1). To enable/disable the enforcement of sorting rules, toggle the sort_event_data.png button.

Editing Min and Max Attributes

Each event data element has min and max attributes associated with it. It is a good approach to define these values when defining the event. These attribtues are not used by Storyboard Engine, they are only used by Storyboard Designer Storyboard IO Connector. To edit these values, double-click in the cell to activate the editor.

Was this article helpful?
1 out of 1 found this helpful