Stream Switch

Summary

Doc_BoxAlgorithm_StreamSwitch.png
  • Plugin name : Stream Switch
  • Version : 1.1
  • Author : Laurent Bonnet
  • Company : INRIA
  • Short description : Redirect its input on a particular output
  • Documentation template generation date : Dec 30 2016

Description

This box act as a switch between N possible outputs for its Streamed Matrix input. N Stimulation settings trigger the switch.

The Stream Switch box redirects a Streamed Matrix input to one particular output according to stimulation received. Each output is triggered by a specific stimulation, detailed in the box settings.

Note 1: if the same stimulation is used by 2 or more outputs, only the first output will be activated when receiving the stimulation. Note 2: at startup, none of the outputs is activated, unless 'Default to output 1' has been set to true in the box configuration.

Inputs

1. Triggers

Stimulations to switch from one output to another.

  • Type identifier : Stimulations (0x6f752dd0, 0x082a321e)

2. Matrix

The stream to redirect. It can be any Streamed Matrix subtype.

  • Type identifier : Streamed matrix (0x544a003e, 0x6dcba5f6)

Outputs

The box can have 2 or more outputs, all have the same type as the input stream.

1. Output

The first possible output.

  • Type identifier : Streamed matrix (0x544a003e, 0x6dcba5f6)

2. Output

The second possible output.

  • Type identifier : Streamed matrix (0x544a003e, 0x6dcba5f6)

Settings

The box has a stimulation setting for each of its outputs. Each such setting dictates the stimulation that activates the corresponding output.

1. Default to output 1

If this flag is set to true, the box will output to the first channel by default without requiring a stimulus first.

  • Type identifier : Boolean (0x2cdb2f0b, 0x12f231ea)
  • Default value : [ false ]

2. Switch stim for output 1

The first possible switch trigger.

  • Type identifier : Stimulation (0x2c132d6e, 0x44ab0d97)
  • Default value : [ OVTK_StimulationId_Label_00 ]

3. Switch stim for output 2

The second possible switch trigger.

  • Type identifier : Stimulation (0x2c132d6e, 0x44ab0d97)
  • Default value : [ OVTK_StimulationId_Label_01 ]

Examples

The scenario stream-switch.xml in share/openvibe/scenarios/box-tutorials is a simple, commented example.

The Stream Switch can be used in more complex situations as well, for example in an online classifier comparison scenario. The scenario motor-imagery-5-classifier-comparison.xml in share/openvibe/scenarios/bci-examples/motor-imagery is a commented example of such a situation.

Miscellaneous