You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Doc_BoxAlgorithm_StreamSwitch.dox-part 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * \page BoxAlgorithm_StreamSwitch Stream Switch
  3. __________________________________________________________________
  4. Detailed description
  5. __________________________________________________________________
  6. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Description|
  7. 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.
  8. Warning: The Stream Switch box operates at chunk granularity. This means that the timing accuracy of this box depends on the chunk size you use (sample count per sent block, also changed by epoching). When the box receives a stimulation that is recognized as a switch trigger, the box will redirect the future chunks that start later than the stimulation timestamp to the desired output. The box will never switch the output stream in the middle of a chunk. For example, if your sampling rate is 512 and your chunk size is 32, then the first sample redirected can be one which is at most 32/512 = 0.0625s = 62.5ms later than the time requested by the stimulation timestamp. With low sampling rates and high chunk sizes, this delay before the box changes the stream output can be even seconds. Hence, we do not recommend using stream switch with its current implementation for use-cases where the first sample needs to be strictly immediately after or at the stimulation timestamp. For such usage, consider using the Stimulation Based Epoching box.
  9. <b>Note 1:</b> if the same stimulation is used by 2 or more outputs, only the first output will be activated when receiving the stimulation.
  10. <b>Note 2:</b> at startup, none of the outputs is activated, unless 'Default to output 1' has been set to true in the box configuration.
  11. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Description|
  12. __________________________________________________________________
  13. Inputs description
  14. __________________________________________________________________
  15. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Inputs|
  16. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Inputs|
  17. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Input1|
  18. Stimulations to switch from one output to another.
  19. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Input1|
  20. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Input2|
  21. The stream to redirect. It can be any Streamed Matrix subtype.
  22. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Input2|
  23. __________________________________________________________________
  24. Outputs description
  25. __________________________________________________________________
  26. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Outputs|
  27. The box can have 2 or more outputs, all have the same type as the input stream.
  28. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Outputs|
  29. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Output1|
  30. The first possible output.
  31. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Output1|
  32. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Output2|
  33. The second possible output.
  34. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Output2|
  35. __________________________________________________________________
  36. Settings description
  37. __________________________________________________________________
  38. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Settings|
  39. The box has a stimulation setting for each of its outputs. Each such setting dictates the stimulation that activates the corresponding output.
  40. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Settings|
  41. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Setting1|
  42. If this flag is set to true, the box will output to the first channel by default without requiring a stimulus first.
  43. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Setting1|
  44. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Setting2|
  45. The first possible switch trigger.
  46. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Setting2|
  47. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Setting3|
  48. The second possible switch trigger.
  49. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Setting3|
  50. __________________________________________________________________
  51. Examples description
  52. __________________________________________________________________
  53. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Examples|
  54. The scenario <i>stream-switch.xml</i> in <i>share/openvibe/scenarios/box-tutorials</i> is a simple, commented example.
  55. The Stream Switch can be used in more complex situations as well, for example in an online classifier comparison scenario. The scenario <i>motor-imagery-5-classifier-comparison.xml</i> in <i>share/openvibe/scenarios/bci-examples/motor-imagery</i> is a commented example of such a situation.
  56. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Examples|
  57. __________________________________________________________________
  58. Miscellaneous description
  59. __________________________________________________________________
  60. * |OVP_DocBegin_BoxAlgorithm_StreamSwitch_Miscellaneous|
  61. * |OVP_DocEnd_BoxAlgorithm_StreamSwitch_Miscellaneous|
  62. */