Polybench® for biosignals / reference 1.34.1
Filters event markers from the data bus and generates an Action if the specified event is found. Also used to remove events.

Event to Action

Overview

Use this operator to translate an Event Marker ("Events and Markers") into an Action ("Actions - Overview").

You may also use this operator to remove event markers from a signal (with or without sending an Action).

Operator ports

Input Any: Any sample type. The connection is not limited to one type of signal.

Output Any: Any sample type. The connection is not limited to one type of signal.

Properties

Find more information about changing properties here: "Properties Viewer"

EventCode
type: See description
The event code that is this operator will filter out of the data stream and convert to an Action. You may use '*' to filter all events that pass by.

Please note that you cannot use a wildcard ('*') as part of the event code; a wildcard is only allowed to indicate that all events should be filtered.

RemoveEvent
type: True or False
Set to True, if the filtered event should be removed from the signal.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


Action
type: Select from the list
The action code that is sent to the system. Select from the list.
Select one of those presets:


Value
type: See description
Fill in a parameter value, if one is needed for the Action or to set a value in Address. The value may contain variables, and the special variable $IN[n]$.

Read more about variables here: "Variable Parameters". Please note that variables are not always updated synchronously with data processing. This means that in some cases a variable may not yet contain the value that you expect it to have, at the time you trigger an event.

You may use the local variable $IN[n]$, where n is the channel number (1..N), meaning the value of the nth channel of the regular input signal at the moment of triggering. If you specify a channel that does not exist, or you don't have a floating point signal connected to the input (but another kind of signal), then $IN[n]$ will be substituted by xxxxx.
If you make an error in the syntax of the variable, you will see ?????. Please note that n must be a value, and cannot be a variable itself.

Address
type: Address, starts with '$' sign (see "Address - how to address objects and variable parameters")
Fill in the address of the object that the Action targets. The address should start with '$'.

You may type or paste the address, or you may press the small button on the right to open the Address Constructor ("Address Constructor")

Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.', '$' nor '@' characters.

For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".

Documentation
type: See description
Optional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: "Variable Parameters"

EventCode
type: See description
The event code that is this operator will filter out of the data stream and convert to an Action. You may use '*' to filter all events that pass by.


Value
type: See description
Reads or changes the value, if one is needed for the Action or to set a value in Address.

Details

General information

An event marker is a kind of flag that has been put to one sample by, for example, the Event Trigger ("Event Trigger"). An event marker has an Event Code that identifies the type of the event.

If an Event to Action operator is inserted in a channel bus where at some points in time event markers will pass, then the Event to Action can filter out the events with the Event Code that is specified in the EventCode property.

The Event to Action works for all types of signals.

Performing Actions

Whenever the Event to Action encounters an event with the correct code, it can optionally perform an Action. Read more about Actions in "Actions - Overview".

Please note that although the Action is generated immediately when an event marker is detected, the action itself is probably performed a small time later, as the signal frequency often is much higher than the rate in which actions can be handled.

Capturing a signal value

It is possible to copy a signal value to the Value property of the Action. This way, it is possible to copy a signal value into a variable (using the SET_PARAMETER action).

You may use the local variable $IN[n]$, where n is the channel number (1..N), meaning the value of the nth channel of the input signal at the moment of the filtered event marker. If you specify a channel that does not exist, or you don't have a floating point signal connected to the input (but another kind of signal), then $IN[n]$ will be substituted by xxxxx.
If you make an error in the syntax of the variable, you will see ?????. Please note that n must be a value, and cannot be a variable itself.

You may use the SET_PARAMETER action to copy a signal value directly to a variable parameter, or a global variable ("Free Global and Namespace Variables"). You may also use the ACTIONSEQUENCE action to call an Action Sequence Start operator ("Action Sequence Start"), where the Action Sequence Start also offers the option to copy the value to a variable.

This feature was not available in Polybench 1.30.0 and lower versions.

Removing event markers from a signal

If you only want to filter and remove an event marker from a signal, then set the Action to None and the property RemoveEvent to True. Removing event markers from a signal is sometimes necessary to prevent multiple copies of the same event marker to become part of the signal.