Events and Markers
Overview
Every sample type in Polybench can be tagged with an Event, of which the visible representation is called a Marker. An Event is added to a signal by special operators, and those events are used or filtered by other special operators, listed in the designer toolbox under "Events".How Events are specified in properties of objects
Operators that can add, change or read event markers use the property EventCode to specify the event they use. The EventCode is just a value, word, or sentence that is the technical name of the marker. All subsequent components that should read or detect it use that same EventCode to refer to this event.Details
An Event is a code or a word or a sentence that is linked to a moment in time of one signal. Events can be put to a signal by an explicitly programmed measurement configuration (e.g. that lets the end-user press a button to generate an event), or by the Polybench internal system, in which case the event code starts with an underscore character ('_').Events visible in viewers as Markers
Events can be either hidden signal control features, or openly visible signal markers. The Events can be made visible using a number of objects. Y-T Viewers show event markers that are listed in the "Prepare Markers" operator immediately before the viewer. The "Marker Viewer" shows markers in a table. A Prepare Markers operator specifies which markers to list. The "Marker Button Panel" enables the end-user to drag markers into a Y-T Reviewer, so that events can be added or modified to a stored signal.Events with captured values
Events may contain values that have been captured on the moment the event was created. Read more about that in the documentation for the "Event Data Trigger" operator. The "Event Information" operator allows to read captured values from an event, and convert them back into signal values.Timing of Events
An Event is tagged to one sample in a running signal. Therefore, in a running measurement configuration, the timing of events is precise in relation to the signal. If an event occurs in between two samples in a signal, then the event gets the time-stamp of the next signal sample. One sample may carry multiple events, that all have the same time stamp.If Events are stored to disk, it becomes clear that their timing may be less precise than the signal that carried them. This is because events use their own time line, which has a resolution of 1 millisecond. This means that if the original signal that carried the event had a frequency of 10000 Hz, and if that signal is replayed, that the event may be shifted 5 samples onward or backward in time (0.5 ms more or less).
Events vs. Actions
Events and Actions are both important, but totally different concepts in Polybench. An Event is just a marker on a specific time in a signal. An Action (see "Actions - Overview") is a control feature that changes something in an application.One important difference between the two is their timing: an event marker is exactly timed in relation to a signal (although the maximal time resolution for events is 1 ms). An Action may be performed with a small delay, which is not related to any signals that are processed. The reason for that is that Actions may take some time to be executed, and that they should not interfere with real-time signal processing. Therefore, most Actions are performed asynchronously (note that some Actions are performed synchronously with data processing in some circumstances. Which Action is synchronous is written in the documentation for each Action).
Although both concepts are unrelated, it is possible to generate an Action whenever an Event is detected in a signal using the "Event to Action" operator. The other way around is also possible using an "Action To One Shot" operator connected to an "Event Trigger" operator, but note that the timing of the generated event often cannot be precisely predicted.
Examples of Events in a specific use situation
Mark Button 1
You may construct a measurement configuration that contains a button, and if you press the button, an event is put to the signal called Mark Button 1. In a Y-T viewer, the Mark Button 1 event can be made visible as a vertical line through the signal, stating the text Mark Button 1. Also, if the signal would be stored to disk, the Mark Button 1 marker may be stored together with the signal data. If you would then review the data, the Mark Button 1 button presses would be visible in the reviewed sample data.
QRS
You may construct a QRS detector that detects the onset of a QRS-complex in an ECG signal, and that automatically puts an event called QRS to the ECG signal every time a QRS onset is detected. You can then view the ECG signal in a signal viewer and let the QRS onsets be marked by vertical lines of a specific color.
_extend
If a signal contains an event called _extend, this is an event generated by the system, because its EventCode starts with an underscore character (_).