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_StimulationListener.rst 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. .. _Doc_BoxAlgorithm_StimulationListener:
  2. Stimulation listener
  3. ====================
  4. .. container:: attribution
  5. :Author:
  6. Yann Renard
  7. :Company:
  8. INRIA/IRISA
  9. .. image:: images/Doc_BoxAlgorithm_StimulationListener.png
  10. Prints each received stimulationto the log using the log level specified in the box config.
  11. The stimulation listener is a debugging purpose box, with
  12. the same idea as the :ref:`Doc_BoxAlgorithm_EBMLStreamSpy` box
  13. but dedicated to stimulation streams. The idea is to dramatically
  14. reduce the log verbosity so the output may be followed realtime
  15. if necessary.
  16. Inputs
  17. ------
  18. .. csv-table::
  19. :header: "Input Name", "Stream Type"
  20. "Stimulation stream 1", "Stimulations"
  21. This box can receive as many input as necessary. All the inputs
  22. will be of type :ref:`Doc_Streams_Stimulation` in order to
  23. be parsed by this the reader.
  24. Stimulation stream 1
  25. ~~~~~~~~~~~~~~~~~~~~
  26. This is the default input of this box.
  27. .. _Doc_BoxAlgorithm_StimulationListener_Settings:
  28. Settings
  29. --------
  30. .. csv-table::
  31. :header: "Setting Name", "Type", "Default Value"
  32. "Log level to use", "Log level", "Information"
  33. Log level to use
  34. ~~~~~~~~~~~~~~~~
  35. This setting indicates what log level will be used to
  36. print the the received stimulations.
  37. .. _Doc_BoxAlgorithm_StimulationListener_Examples:
  38. Examples
  39. --------
  40. As an example, we could connect a clock stimulator to a
  41. stimulation listener. Leave the default settings of the
  42. clock stimulator, so it sends an \e OVTK_StimulationId_Label_00
  43. stimulation every second. Now chose an appropriate log level
  44. for the stimulation listener and press 'start'. If you're
  45. familiar to what :ref:`Doc_BoxAlgorithm_EBMLStreamSpy` produces,
  46. you may feel more confortable with what is produced here for
  47. stimulations.
  48. The output should look like this :
  49. .. code::
  50. ...
  51. [ INF ] <Box algorithm::Stimulation listener> For input 0 (0x0) with name Stimulation stream 1 got stimulation 33024 (0x8100)[OVTK_StimulationId_Label_00] at date 4294967296 (0x100000000) and duration 0 (0x0)
  52. [ INF ] <Box algorithm::Stimulation listener> For input 0 (0x0) with name Stimulation stream 1 got stimulation 33024 (0x8100)[OVTK_StimulationId_Label_00] at date 8589934592 (0x200000000) and duration 0 (0x0)
  53. [ INF ] <Box algorithm::Stimulation listener> For input 0 (0x0) with name Stimulation stream 1 got stimulation 33024 (0x8100)[OVTK_StimulationId_Label_00] at date 12884901888 (0x300000000) and duration 0 (0x0)
  54. [ INF ] <Box algorithm::Stimulation listener> For input 0 (0x0) with name Stimulation stream 1 got stimulation 33024 (0x8100)[OVTK_StimulationId_Label_00] at date 17179869184 (0x400000000) and duration 0 (0x0)
  55. ...
  56. Now let's try to understand what is produced. Each line represents
  57. received stimulation. The input index which received the stimulation
  58. is printed. Then follow the stimulation code, its date and its duration.
  59. The stimulation name is retrieved from the type manager when correctly
  60. registered. Here, you can see that an \e OVTK_StimulationId_Label_00 is
  61. received every second.
  62. More tests could be done with another clock stimulator with different
  63. timings and stimulation codes. You will want to add inputs to the stimulation
  64. listener box in order to get proper results. For example with one more box
  65. sending \e OVTK_StimulationId_Label_01 every half second, the output would
  66. look like this :
  67. .. code::
  68. ...
  69. [ INF ] <Box algorithm::Stimulation listener> For input 1 (0x1) with name Stimulation stream 2 got stimulation 33025 (0x8101)[OVTK_StimulationId_Label_01] at date 2147483648 (0x80000000) and duration 0 (0x0)
  70. [ INF ] <Box algorithm::Stimulation listener> For input 0 (0x0) with name Stimulation stream 1 got stimulation 33024 (0x8100)[OVTK_StimulationId_Label_00] at date 4294967296 (0x100000000) and duration 0 (0x0)
  71. [ INF ] <Box algorithm::Stimulation listener> For input 1 (0x1) with name Stimulation stream 2 got stimulation 33025 (0x8101)[OVTK_StimulationId_Label_01] at date 4294967296 (0x100000000) and duration 0 (0x0)
  72. [ INF ] <Box algorithm::Stimulation listener> For input 1 (0x1) with name Stimulation stream 2 got stimulation 33025 (0x8101)[OVTK_StimulationId_Label_01] at date 6442450944 (0x180000000) and duration 0 (0x0)
  73. [ INF ] <Box algorithm::Stimulation listener> For input 0 (0x0) with name Stimulation stream 1 got stimulation 33024 (0x8100)[OVTK_StimulationId_Label_00] at date 8589934592 (0x200000000) and duration 0 (0x0)
  74. [ INF ] <Box algorithm::Stimulation listener> For input 1 (0x1) with name Stimulation stream 2 got stimulation 33025 (0x8101)[OVTK_StimulationId_Label_01] at date 8589934592 (0x200000000) and duration 0 (0x0)
  75. [ INF ] <Box algorithm::Stimulation listener> For input 1 (0x1) with name Stimulation stream 2 got stimulation 33025 (0x8101)[OVTK_StimulationId_Label_01] at date 10737418240 (0x280000000) and duration 0 (0x0)
  76. [ INF ] <Box algorithm::Stimulation listener> For input 0 (0x0) with name Stimulation stream 1 got stimulation 33024 (0x8100)[OVTK_StimulationId_Label_00] at date 12884901888 (0x300000000) and duration 0 (0x0)
  77. [ INF ] <Box algorithm::Stimulation listener> For input 1 (0x1) with name Stimulation stream 2 got stimulation 33025 (0x8101)[OVTK_StimulationId_Label_01] at date 12884901888 (0x300000000) and duration 0 (0x0)
  78. [ INF ] <Box algorithm::Stimulation listener> For input 1 (0x1) with name Stimulation stream 2 got stimulation 33025 (0x8101)[OVTK_StimulationId_Label_01] at date 15032385536 (0x380000000) and duration 0 (0x0)
  79. [ INF ] <Box algorithm::Stimulation listener> For input 0 (0x0) with name Stimulation stream 1 got stimulation 33024 (0x8100)[OVTK_StimulationId_Label_00] at date 17179869184 (0x400000000) and duration 0 (0x0)
  80. [ INF ] <Box algorithm::Stimulation listener> For input 1 (0x1) with name Stimulation stream 2 got stimulation 33025 (0x8101)[OVTK_StimulationId_Label_01] at date 17179869184 (0x400000000) and duration 0 (0x0)
  81. ...