This commit is contained in:
2021-10-14 13:47:35 +02:00
commit 6625a8dfaa
4026 changed files with 844291 additions and 0 deletions
@@ -0,0 +1,33 @@
PROJECT(openvibe-plugins-examples)
SET(PROJECT_VERSION_MAJOR ${OV_GLOBAL_VERSION_MAJOR})
SET(PROJECT_VERSION ${OV_GLOBAL_VERSION_STRING})
FILE(GLOB_RECURSE SRC_FILES src/*.cpp src/*.h src/*.inl)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRC_FILES})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
FOLDER ${PLUGINS_FOLDER}
COMPILE_FLAGS "-DOVP_Exports -DOVP_Shared")
# ---------------------------------
INCLUDE("FindOpenViBE")
INCLUDE("FindOpenViBECommon")
INCLUDE("FindOpenViBEToolkit")
INCLUDE("FindOpenViBEModuleEBML")
INCLUDE("FindOpenViBEModuleXML")
INCLUDE("FindThirdPartyGTK")
INCLUDE("FindOpenViBEVisualizationToolkit")
# -----------------------------
# Install files
# -----------------------------
INSTALL(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${DIST_BINDIR}
LIBRARY DESTINATION ${DIST_LIBDIR}
ARCHIVE DESTINATION ${DIST_LIBDIR})
INSTALL(DIRECTORY box-tutorials DESTINATION ${DIST_DATADIR}/openvibe/scenarios/)
INSTALL(DIRECTORY metaboxes DESTINATION ${DIST_DATADIR}/openvibe/)
@@ -0,0 +1,423 @@
<OpenViBE-Scenario>
<FormatVersion>1</FormatVersion>
<Creator>openvibe</Creator>
<CreatorVersion>2.0</CreatorVersion>
<Boxes>
<Box>
<Identifier>(0x00003edf, 0x00007efb)</Identifier>
<Name>Signal display</Name>
<AlgorithmClassIdentifier>(0x0055be5f, 0x087bdd12)</AlgorithmClassIdentifier>
<Inputs>
<Input>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Data</Name>
</Input>
<Input>
<TypeIdentifier>(0x6f752dd0, 0x082a321e)</TypeIdentifier>
<Name>Stimulations</Name>
</Input>
<Input>
<TypeIdentifier>(0x6ab26b81, 0x0f8c02f3)</TypeIdentifier>
<Name>Channel Units</Name>
</Input>
</Inputs>
<Settings>
<Setting>
<TypeIdentifier>(0x5de046a6, 0x086340aa)</TypeIdentifier>
<Name>Display Mode</Name>
<DefaultValue>Scan</DefaultValue>
<Value>Scan</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x33a30739, 0x00d5299b)</TypeIdentifier>
<Name>Auto vertical scale</Name>
<DefaultValue>Per channel</DefaultValue>
<Value>Per channel</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Scale refresh interval (secs)</Name>
<DefaultValue>5</DefaultValue>
<Value>5</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Vertical Scale</Name>
<DefaultValue>100</DefaultValue>
<Value>100</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Vertical Offset</Name>
<DefaultValue>0</DefaultValue>
<Value>0</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Time Scale</Name>
<DefaultValue>10</DefaultValue>
<Value>10</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x2cdb2f0b, 0x12f231ea)</TypeIdentifier>
<Name>Horizontal ruler</Name>
<DefaultValue>true</DefaultValue>
<Value>true</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x2cdb2f0b, 0x12f231ea)</TypeIdentifier>
<Name>Vertical ruler</Name>
<DefaultValue>false</DefaultValue>
<Value>false</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x2cdb2f0b, 0x12f231ea)</TypeIdentifier>
<Name>Multiview</Name>
<DefaultValue>false</DefaultValue>
<Value>false</Value>
<Modifiability>false</Modifiability>
</Setting>
</Settings>
<Attributes>
<Attribute>
<Identifier>(0x1fa7a38f, 0x54edbe0b)</Identifier>
<Value>192.000000</Value>
</Attribute>
<Attribute>
<Identifier>(0x1fa963f5, 0x1a638cd4)</Identifier>
<Value>38</Value>
</Attribute>
<Attribute>
<Identifier>(0x207c9054, 0x3c841b63)</Identifier>
<Value>384.000000</Value>
</Attribute>
<Attribute>
<Identifier>(0x4e7b798a, 0x183beafb)</Identifier>
<Value>(0x92c056a7, 0x2dc71aff)</Value>
</Attribute>
<Attribute>
<Identifier>(0x527ad68d, 0x16d746a0)</Identifier>
<Value></Value>
</Attribute>
<Attribute>
<Identifier>(0xad100179, 0xa3c984ab)</Identifier>
<Value>113</Value>
</Attribute>
<Attribute>
<Identifier>(0xc67a01dc, 0x28ce06c1)</Identifier>
<Value></Value>
</Attribute>
<Attribute>
<Identifier>(0xc73e83ec, 0xf855c5bc)</Identifier>
<Value>false</Value>
</Attribute>
<Attribute>
<Identifier>(0xce18836a, 0x9c0eb403)</Identifier>
<Value>9</Value>
</Attribute>
<Attribute>
<Identifier>(0xcfad85b0, 0x7c6d841c)</Identifier>
<Value>3</Value>
</Attribute>
</Attributes>
</Box>
<Box>
<Identifier>(0x00005115, 0x00004c40)</Identifier>
<Name>Modifiable Temporal filter</Name>
<AlgorithmClassIdentifier>(0xbf49d042, 0x9d79fe52)</AlgorithmClassIdentifier>
<Inputs>
<Input>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Input signal</Name>
</Input>
</Inputs>
<Outputs>
<Output>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Filtered signal</Name>
</Output>
</Outputs>
<Settings>
<Setting>
<TypeIdentifier>(0x2f2c606c, 0x8512ed68)</TypeIdentifier>
<Name>Filter method</Name>
<DefaultValue>Butterworth</DefaultValue>
<Value>Butterworth</Value>
<Modifiability>true</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0xfa20178e, 0x4cba62e9)</TypeIdentifier>
<Name>Filter type</Name>
<DefaultValue>Band pass</DefaultValue>
<Value>Band pass</Value>
<Modifiability>true</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>Filter order</Name>
<DefaultValue>4</DefaultValue>
<Value>4</Value>
<Modifiability>true</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Low cut frequency (Hz)</Name>
<DefaultValue>29</DefaultValue>
<Value>29</Value>
<Modifiability>true</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>High cut frequency (Hz)</Name>
<DefaultValue>40</DefaultValue>
<Value>40</Value>
<Modifiability>true</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Pass band ripple (dB)</Name>
<DefaultValue>0.5</DefaultValue>
<Value>0.5</Value>
<Modifiability>true</Modifiability>
</Setting>
</Settings>
<Attributes>
<Attribute>
<Identifier>(0x1fa7a38f, 0x54edbe0b)</Identifier>
<Value>112</Value>
</Attribute>
<Attribute>
<Identifier>(0x1fa963f5, 0x1a638cd4)</Identifier>
<Value>38</Value>
</Attribute>
<Attribute>
<Identifier>(0x207c9054, 0x3c841b63)</Identifier>
<Value>384</Value>
</Attribute>
<Attribute>
<Identifier>(0x4e7b798a, 0x183beafb)</Identifier>
<Value>(0x27a4ceec, 0x876d6384)</Value>
</Attribute>
<Attribute>
<Identifier>(0xad100179, 0xa3c984ab)</Identifier>
<Value>202</Value>
</Attribute>
<Attribute>
<Identifier>(0xc46b3d00, 0x3e0454e1)</Identifier>
<Value>(0x00000000, 0x0041dd1f)</Value>
</Attribute>
<Attribute>
<Identifier>(0xc73e83ec, 0xf855c5bc)</Identifier>
<Value>false</Value>
</Attribute>
<Attribute>
<Identifier>(0xc80ce8af, 0xf699f813)</Identifier>
<Value>1</Value>
</Attribute>
<Attribute>
<Identifier>(0xce18836a, 0x9c0eb403)</Identifier>
<Value>6</Value>
</Attribute>
<Attribute>
<Identifier>(0xcfad85b0, 0x7c6d841c)</Identifier>
<Value>1</Value>
</Attribute>
</Attributes>
</Box>
<Box>
<Identifier>(0x00006b9e, 0x000045d8)</Identifier>
<Name>Sinus oscillator</Name>
<AlgorithmClassIdentifier>(0x7e33bdb8, 0x68194a4a)</AlgorithmClassIdentifier>
<Outputs>
<Output>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Generated signal</Name>
</Output>
</Outputs>
<Settings>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>Channel count</Name>
<DefaultValue>4</DefaultValue>
<Value>4</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>Sampling frequency</Name>
<DefaultValue>512</DefaultValue>
<Value>512</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>Generated epoch sample count</Name>
<DefaultValue>32</DefaultValue>
<Value>32</Value>
<Modifiability>false</Modifiability>
</Setting>
</Settings>
<Attributes>
<Attribute>
<Identifier>(0x1fa7a38f, 0x54edbe0b)</Identifier>
<Value>48</Value>
</Attribute>
<Attribute>
<Identifier>(0x1fa963f5, 0x1a638cd4)</Identifier>
<Value>25</Value>
</Attribute>
<Attribute>
<Identifier>(0x207c9054, 0x3c841b63)</Identifier>
<Value>384</Value>
</Attribute>
<Attribute>
<Identifier>(0x4e7b798a, 0x183beafb)</Identifier>
<Value>(0x0b214ed8, 0x1f9ad83a)</Value>
</Attribute>
<Attribute>
<Identifier>(0xad100179, 0xa3c984ab)</Identifier>
<Value>121</Value>
</Attribute>
<Attribute>
<Identifier>(0xc46b3d00, 0x3e0454e1)</Identifier>
<Value>(0x00000000, 0x00666ed2)</Value>
</Attribute>
<Attribute>
<Identifier>(0xc73e83ec, 0xf855c5bc)</Identifier>
<Value>false</Value>
</Attribute>
<Attribute>
<Identifier>(0xc80ce8af, 0xf699f813)</Identifier>
<Value>1</Value>
</Attribute>
<Attribute>
<Identifier>(0xce18836a, 0x9c0eb403)</Identifier>
<Value>3</Value>
</Attribute>
</Attributes>
</Box>
</Boxes>
<Links>
<Link>
<Identifier>(0x00003c25, 0x00000d89)</Identifier>
<Source>
<BoxIdentifier>(0x00005115, 0x00004c40)</BoxIdentifier>
<BoxOutputIndex>0</BoxOutputIndex>
</Source>
<Target>
<BoxIdentifier>(0x00003edf, 0x00007efb)</BoxIdentifier>
<BoxInputIndex>0</BoxInputIndex>
</Target>
<Attributes>
<Attribute>
<Identifier>(0x1b32c44c, 0x1905e0e9)</Identifier>
<Value>137</Value>
</Attribute>
<Attribute>
<Identifier>(0x358ae8b5, 0x0f8bacd1)</Identifier>
<Value>384</Value>
</Attribute>
<Attribute>
<Identifier>(0x3f0a3b27, 0x570913d2)</Identifier>
<Value>168</Value>
</Attribute>
<Attribute>
<Identifier>(0x6267b5c5, 0x676e3e42)</Identifier>
<Value>369</Value>
</Attribute>
</Attributes>
</Link>
<Link>
<Identifier>(0x00004886, 0x00003416)</Identifier>
<Source>
<BoxIdentifier>(0x00006b9e, 0x000045d8)</BoxIdentifier>
<BoxOutputIndex>0</BoxOutputIndex>
</Source>
<Target>
<BoxIdentifier>(0x00005115, 0x00004c40)</BoxIdentifier>
<BoxInputIndex>0</BoxInputIndex>
</Target>
<Attributes>
<Attribute>
<Identifier>(0x1b32c44c, 0x1905e0e9)</Identifier>
<Value>67</Value>
</Attribute>
<Attribute>
<Identifier>(0x358ae8b5, 0x0f8bacd1)</Identifier>
<Value>384</Value>
</Attribute>
<Attribute>
<Identifier>(0x3f0a3b27, 0x570913d2)</Identifier>
<Value>88</Value>
</Attribute>
<Attribute>
<Identifier>(0x6267b5c5, 0x676e3e42)</Identifier>
<Value>384</Value>
</Attribute>
</Attributes>
</Link>
</Links>
<Comments>
<Comment>
<Identifier>(0x00000d5b, 0x000076b6)</Identifier>
<Text>The modifiable temporal filter box is a duplicate
of the original temporal filter box with all settings
marked as modifiables.
It means that during run, a widget will appear where
you can modify the value of these settings. As
you do that, you will notice that the signal will
change accordingly.</Text>
<Attributes>
<Attribute>
<Identifier>(0x473d9a43, 0x97fc0a97)</Identifier>
<Value>112</Value>
</Attribute>
<Attribute>
<Identifier>(0x7234b86b, 0x2b8651a5)</Identifier>
<Value>112</Value>
</Attribute>
</Attributes>
</Comment>
</Comments>
<Metadata>
<Entry>
<Identifier>(0x0000775c, 0x000078ff)</Identifier>
<Type>(0x3bcce5d2, 0x43f2d968)</Type>
<Data>[{"boxIdentifier":"(0x00003edf, 0x00007efb)","childCount":0,"identifier":"(0x00002ce4, 0x00000c63)","index":0,"parentIdentifier":"(0xffffffff, 0xffffffff)","type":3},{"boxIdentifier":"(0xffffffff, 0xffffffff)","childCount":2,"height":320,"identifier":"(0x00003820, 0x000008c9)","index":0,"name":"Default window","parentIdentifier":"(0xffffffff, 0xffffffff)","type":1,"width":480},{"boxIdentifier":"(0xffffffff, 0xffffffff)","childCount":1,"identifier":"(0x00005d8b, 0x000029a4)","index":0,"name":"Default tab","parentIdentifier":"(0x00003820, 0x000008c9)","type":2},{"boxIdentifier":"(0xffffffff, 0xffffffff)","childCount":1,"identifier":"(0x00002efb, 0x00003d85)","index":1,"name":"config","parentIdentifier":"(0x00003820, 0x000008c9)","type":2},{"boxIdentifier":"(0xffffffff, 0xffffffff)","childCount":0,"identifier":"(0x000063e7, 0x000031ad)","index":0,"name":"Empty","parentIdentifier":"(0x00005d8b, 0x000029a4)","type":0},{"boxIdentifier":"(0x00005115, 0x00004c40)","childCount":0,"identifier":"(0x000020c4, 0x000038b5)","index":0,"parentIdentifier":"(0x00002efb, 0x00003d85)","type":3}]</Data>
</Entry>
</Metadata>
<Attributes>
<Attribute>
<Identifier>(0x790d75b8, 0x3bb90c33)</Identifier>
<Value>Loic Mahe</Value>
</Attribute>
<Attribute>
<Identifier>(0x8c1fc55b, 0x7b433dc2)</Identifier>
<Value>1.0</Value>
</Attribute>
<Attribute>
<Identifier>(0x9f5c4075, 0x4a0d3666)</Identifier>
<Value>Modifiable Temporal filter example</Value>
</Attribute>
<Attribute>
<Identifier>(0xf36a1567, 0xd13c53da)</Identifier>
<Value>http://openvibe.inria.fr/modifiable-box-settings/</Value>
</Attribute>
<Attribute>
<Identifier>(0xf6b2e3fa, 0x7bd43926)</Identifier>
<Value>box-tutorials</Value>
</Attribute>
<Attribute>
<Identifier>(0xf8034a49, 0x8b3f37cc)</Identifier>
<Value>Inria</Value>
</Attribute>
</Attributes>
</OpenViBE-Scenario>
@@ -0,0 +1,310 @@
<OpenViBE-Scenario>
<FormatVersion>1</FormatVersion>
<Creator>Designer</Creator>
<CreatorVersion>2.0.0</CreatorVersion>
<Settings>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>LowCutFrequency</Name>
<DefaultValue>1</DefaultValue>
<Value>1</Value>
</Setting>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>HighCutFrequency</Name>
<DefaultValue>100</DefaultValue>
<Value>100</Value>
</Setting>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>NotchLowFrequency</Name>
<DefaultValue>48</DefaultValue>
<Value>48</Value>
</Setting>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>NotchHighFrequency</Name>
<DefaultValue>52</DefaultValue>
<Value>52</Value>
</Setting>
</Settings>
<Inputs>
<Input>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Input Signal</Name>
<LinkedBoxIdentifier>(0x0d17e04a, 0x1c8eee27)</LinkedBoxIdentifier>
<LinkedBoxInputIndex>0</LinkedBoxInputIndex>
</Input>
</Inputs>
<Outputs>
<Output>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Filtered Signal</Name>
<LinkedBoxIdentifier>(0x7ebeb131, 0x19f98c70)</LinkedBoxIdentifier>
<LinkedBoxOutputIndex>0</LinkedBoxOutputIndex>
</Output>
</Outputs>
<Boxes>
<Box>
<Identifier>(0x0d17e04a, 0x1c8eee27)</Identifier>
<Name>Notch Filter</Name>
<AlgorithmClassIdentifier>(0xb4f9d042, 0x9d79f2e5)</AlgorithmClassIdentifier>
<Inputs>
<Input>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Input signal</Name>
</Input>
</Inputs>
<Outputs>
<Output>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Output signal</Name>
</Output>
</Outputs>
<Settings>
<Setting>
<TypeIdentifier>(0x2f2c606c, 0x8512ed68)</TypeIdentifier>
<Name>Filter Method</Name>
<DefaultValue>Butterworth</DefaultValue>
<Value>Butterworth</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0xfa20178e, 0x4cba62e9)</TypeIdentifier>
<Name>Filter Type</Name>
<DefaultValue>Band Pass</DefaultValue>
<Value>Band Stop</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>Filter Order</Name>
<DefaultValue>4</DefaultValue>
<Value>4</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Low Cut-off Frequency (Hz)</Name>
<DefaultValue>1</DefaultValue>
<Value>$var{NotchLowFrequency}</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>High Cut-off Frequency (Hz)</Name>
<DefaultValue>40</DefaultValue>
<Value>$var{NotchHighFrequency}</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Band Pass Ripple (dB)</Name>
<DefaultValue>0.5</DefaultValue>
<Value>0.5</Value>
<Modifiability>false</Modifiability>
</Setting>
</Settings>
<Attributes>
<Attribute>
<Identifier>(0x1fa7a38f, 0x54edbe0b)</Identifier>
<Value>256</Value>
</Attribute>
<Attribute>
<Identifier>(0x207c9054, 0x3c841b63)</Identifier>
<Value>288</Value>
</Attribute>
<Attribute>
<Identifier>(0x4e7b798a, 0x183beafb)</Identifier>
<Value>(0x27a4ceec, 0x876d6384)</Value>
</Attribute>
<Attribute>
<Identifier>(0xc80ce8af, 0xf699f813)</Identifier>
<Value>1</Value>
</Attribute>
<Attribute>
<Identifier>(0xce18836a, 0x9c0eb403)</Identifier>
<Value>6</Value>
</Attribute>
<Attribute>
<Identifier>(0xcfad85b0, 0x7c6d841c)</Identifier>
<Value>1</Value>
</Attribute>
</Attributes>
</Box>
<Box>
<Identifier>(0x7ebeb131, 0x19f98c70)</Identifier>
<Name>Band Pass</Name>
<AlgorithmClassIdentifier>(0xb4f9d042, 0x9d79f2e5)</AlgorithmClassIdentifier>
<Inputs>
<Input>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Input signal</Name>
</Input>
</Inputs>
<Outputs>
<Output>
<TypeIdentifier>(0x5ba36127, 0x195feae1)</TypeIdentifier>
<Name>Output signal</Name>
</Output>
</Outputs>
<Settings>
<Setting>
<TypeIdentifier>(0x2f2c606c, 0x8512ed68)</TypeIdentifier>
<Name>Filter Method</Name>
<DefaultValue>Butterworth</DefaultValue>
<Value>Butterworth</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0xfa20178e, 0x4cba62e9)</TypeIdentifier>
<Name>Filter Type</Name>
<DefaultValue>Band Pass</DefaultValue>
<Value>Band Pass</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x007deef9, 0x2f3e95c6)</TypeIdentifier>
<Name>Filter Order</Name>
<DefaultValue>4</DefaultValue>
<Value>4</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Low Cut-off Frequency (Hz)</Name>
<DefaultValue>1</DefaultValue>
<Value>$var{LowCutFrequency}</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>High Cut-off Frequency (Hz)</Name>
<DefaultValue>40</DefaultValue>
<Value>$var{HighCutFrequency}</Value>
<Modifiability>false</Modifiability>
</Setting>
<Setting>
<TypeIdentifier>(0x512a166f, 0x5c3ef83f)</TypeIdentifier>
<Name>Band Pass Ripple (dB)</Name>
<DefaultValue>0.5</DefaultValue>
<Value>0.5</Value>
<Modifiability>false</Modifiability>
</Setting>
</Settings>
<Attributes>
<Attribute>
<Identifier>(0x1fa7a38f, 0x54edbe0b)</Identifier>
<Value>320</Value>
</Attribute>
<Attribute>
<Identifier>(0x207c9054, 0x3c841b63)</Identifier>
<Value>288</Value>
</Attribute>
<Attribute>
<Identifier>(0x4e7b798a, 0x183beafb)</Identifier>
<Value>(0x27a4ceec, 0x876d6384)</Value>
</Attribute>
<Attribute>
<Identifier>(0xc80ce8af, 0xf699f813)</Identifier>
<Value>1</Value>
</Attribute>
<Attribute>
<Identifier>(0xce18836a, 0x9c0eb403)</Identifier>
<Value>6</Value>
</Attribute>
<Attribute>
<Identifier>(0xcfad85b0, 0x7c6d841c)</Identifier>
<Value>1</Value>
</Attribute>
</Attributes>
</Box>
</Boxes>
<Links>
<Link>
<Identifier>(0x47f3989a, 0x16eca6a5)</Identifier>
<Source>
<BoxIdentifier>(0x0d17e04a, 0x1c8eee27)</BoxIdentifier>
<BoxOutputIndex>0</BoxOutputIndex>
</Source>
<Target>
<BoxIdentifier>(0x7ebeb131, 0x19f98c70)</BoxIdentifier>
<BoxInputIndex>0</BoxInputIndex>
</Target>
</Link>
</Links>
<Comments>
<Comment>
<Identifier>(0x1785e47c, 0x56b8227f)</Identifier>
<Text>This is an &lt;u&gt;example of metabox&lt;/u&gt; used in the metabox
tutorial at &lt;i&gt;http://openvibe.inria.fr/designer-tutorial-5-metaboxes#Creating+metaboxes&lt;/i&gt;</Text>
<Attributes>
<Attribute>
<Identifier>(0x473d9a43, 0x97fc0a97)</Identifier>
<Value>320</Value>
</Attribute>
<Attribute>
<Identifier>(0x7234b86b, 0x2b8651a5)</Identifier>
<Value>96</Value>
</Attribute>
</Attributes>
</Comment>
</Comments>
<Metadata>
<Entry>
<Identifier>(0x260f2f8f, 0x2018a17e)</Identifier>
<Type>(0x3bcce5d2, 0x43f2d968)</Type>
<Data>[{"boxIdentifier":"(0xffffffff, 0xffffffff)","childCount":1,"height":1,"identifier":"(0x2493e905, 0x578f4d26)","name":"Default window","parentIdentifier":"(0xffffffff, 0xffffffff)","type":1,"width":1},{"boxIdentifier":"(0xffffffff, 0xffffffff)","childCount":1,"identifier":"(0x3e591476, 0x11ecc87e)","index":0,"name":"Default tab","parentIdentifier":"(0x2493e905, 0x578f4d26)","type":2},{"boxIdentifier":"(0xffffffff, 0xffffffff)","childCount":0,"identifier":"(0x1b569e6e, 0x77c50f4a)","index":0,"name":"Empty","parentIdentifier":"(0x3e591476, 0x11ecc87e)","type":0}]</Data>
</Entry>
</Metadata>
<Attributes>
<Attribute>
<Identifier>(0x079d1f09, 0x667c7871)</Identifier>
<Value></Value>
</Attribute>
<Attribute>
<Identifier>(0x198dd621, 0xab7f153f)</Identifier>
<Value>(0x40c92d63, 0xac62524f)</Value>
</Attribute>
<Attribute>
<Identifier>(0x20c6d158, 0xfe90aadd)</Identifier>
<Value>(0xc5ff4187, 0xffc5f432)</Value>
</Attribute>
<Attribute>
<Identifier>(0x60bc58ab, 0x7a1b4d83)</Identifier>
<Value></Value>
</Attribute>
<Attribute>
<Identifier>(0x790d75b8, 0x3bb90c33)</Identifier>
<Value></Value>
</Attribute>
<Attribute>
<Identifier>(0x7a3a1558, 0xf12c63c2)</Identifier>
<Value>Please open the metabox .mxb in Designer to see how it works</Value>
</Attribute>
<Attribute>
<Identifier>(0x84009d7c, 0x3c4e763b)</Identifier>
<Value>Combines a bandstop and a bandpass filter</Value>
</Attribute>
<Attribute>
<Identifier>(0x8c1fc55b, 0x7b433dc2)</Identifier>
<Value>1.0</Value>
</Attribute>
<Attribute>
<Identifier>(0x9f5c4075, 0x4a0d3666)</Identifier>
<Value>Signal Cleanup</Value>
</Attribute>
<Attribute>
<Identifier>(0xf36a1567, 0xd13c53da)</Identifier>
<Value></Value>
</Attribute>
<Attribute>
<Identifier>(0xf6b2e3fa, 0x7bd43926)</Identifier>
<Value>Examples/Metabox</Value>
</Attribute>
<Attribute>
<Identifier>(0xf8034a49, 0x8b3f37cc)</Identifier>
<Value></Value>
</Attribute>
</Attributes>
</OpenViBE-Scenario>
@@ -0,0 +1,39 @@
#include "ovpCBoxAlgorithmClock.h"
namespace OpenViBE {
namespace Plugins {
namespace Examples {
uint64_t CBoxAlgorithmClock::getClockFrequency()
{
getLogManager() << m_logLevel << "Clock frequency requested at time " << CTime(getPlayerContext().getCurrentTime()) << "\n";
return m_clockFrequency << 32;
}
bool CBoxAlgorithmClock::initialize()
{
m_clockFrequency = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 0);
const CString value = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 1);
m_logLevel = Kernel::ELogLevel(getBoxAlgorithmContext()->getPlayerContext()->getTypeManager().getEnumerationEntryValueFromName(OV_TypeId_LogLevel, value));
getLogManager() << m_logLevel << "Clock frequency tuned to " << m_clockFrequency << "\n";
return true;
}
bool CBoxAlgorithmClock::processClock(Kernel::CMessageClock& /*msg*/)
{
getLogManager() << m_logLevel << "Received clock message at time " << CTime(getPlayerContext().getCurrentTime()) << "\n";
getBoxAlgorithmContext()->markAlgorithmAsReadyToProcess();
return true;
}
bool CBoxAlgorithmClock::process()
{
getLogManager() << m_logLevel << "Process function activated at " << getPlayerContext().getCurrentTime() << "\n";
return true;
}
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,60 @@
#pragma once
#include "../ovp_defines.h"
#include <openvibe/ov_all.h>
#include <toolkit/ovtk_all.h>
namespace OpenViBE {
namespace Plugins {
namespace Examples {
class CBoxAlgorithmClock final : public Toolkit::TBoxAlgorithm<IBoxAlgorithm>
{
public:
void release() override { delete this; }
uint64_t getClockFrequency() override;
bool initialize() override;
bool uninitialize() override { return true; }
bool processClock(Kernel::CMessageClock& msg) override;
bool process() override;
_IsDerivedFromClass_Final_(Toolkit::TBoxAlgorithm<IBoxAlgorithm>, OVP_ClassId_BoxAlgorithm_Clock)
protected:
uint64_t m_clockFrequency = 0;
Kernel::ELogLevel m_logLevel = Kernel::LogLevel_None;
};
class CBoxAlgorithmClockDesc final : public IBoxAlgorithmDesc
{
public:
void release() override { }
CString getName() const override { return CString("Clock"); }
CString getAuthorName() const override { return CString("Yann Renard"); }
CString getAuthorCompanyName() const override { return CString("INRIA/IRISA"); }
CString getShortDescription() const override { return CString("Simply prints clock activation times"); }
CString getDetailedDescription() const override { return CString(""); }
CString getCategory() const override { return CString("Examples/Basic"); }
CString getVersion() const override { return CString("1.0"); }
CString getStockItemName() const override { return CString("gtk-info"); }
CIdentifier getCreatedClass() const override { return OVP_ClassId_BoxAlgorithm_Clock; }
IPluginObject* create() override { return new CBoxAlgorithmClock; }
bool getBoxPrototype(Kernel::IBoxProto& prototype) const override
{
prototype.addSetting("Clock frequency (Hz)", OV_TypeId_Integer, "60");
prototype.addSetting("Log level to use", OV_TypeId_LogLevel, "Information");
return true;
}
_IsDerivedFromClass_Final_(IBoxAlgorithmDesc, OVP_ClassId_BoxAlgorithm_ClockDesc)
};
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,12 @@
#include "ovpCBoxAlgorithmNothing.h"
namespace OpenViBE {
namespace Plugins {
namespace Examples {
bool CBoxAlgorithmNothing::initialize() { return true; }
bool CBoxAlgorithmNothing::uninitialize() { return true; }
bool CBoxAlgorithmNothing::process() { return true; }
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,50 @@
#pragma once
#include <openvibe/ov_all.h>
#include <toolkit/ovtk_all.h>
#define OVP_ClassId_BoxAlgorithm_Nothing OpenViBE::CIdentifier(0x273960C0, 0x485C407C)
#define OVP_ClassId_BoxAlgorithm_NothingDesc OpenViBE::CIdentifier(0x7A6167D9, 0x79070E22)
namespace OpenViBE {
namespace Plugins {
namespace Examples {
class CBoxAlgorithmNothing final : public Toolkit::TBoxAlgorithm<IBoxAlgorithm>
{
public:
void release() override { delete this; }
bool initialize() override;
bool uninitialize() override;
bool process() override;
_IsDerivedFromClass_Final_(Toolkit::TBoxAlgorithm<IBoxAlgorithm>, OVP_ClassId_BoxAlgorithm_Nothing)
};
class CBoxAlgorithmNothingDesc final : public IBoxAlgorithmDesc
{
public:
void release() override { }
CString getName() const override { return CString("Nothing"); }
CString getAuthorName() const override { return CString("Yann Renard"); }
CString getAuthorCompanyName() const override { return CString("INRIA/IRISA"); }
CString getShortDescription() const override { return CString("This box does nothing"); }
CString getDetailedDescription() const override { return CString(""); }
CString getCategory() const override { return CString("Examples/Basic"); }
CString getVersion() const override { return CString("1.0"); }
CString getStockItemName() const override { return CString("gtk-about"); }
CIdentifier getCreatedClass() const override { return OVP_ClassId_BoxAlgorithm_Nothing; }
IPluginObject* create() override { return new CBoxAlgorithmNothing; }
bool getBoxPrototype(Kernel::IBoxProto& /*prototype*/) const override { return true; }
_IsDerivedFromClass_Final_(IBoxAlgorithmDesc, OVP_ClassId_BoxAlgorithm_NothingDesc)
};
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,23 @@
/*
* Prints user-specified greeting to the log with given frequency
*/
#include "ovpCHelloWorld.h"
#include <openvibe/CTime.hpp>
namespace OpenViBE {
namespace Plugins {
namespace Examples {
uint64_t CHelloWorld::getClockFrequency() { return CTime(double(FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 0))).time(); }
bool CHelloWorld::processClock(Kernel::CMessageClock& /*msg*/)
{
const CString myGreeting = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 1);
getLogManager() << Kernel::LogLevel_Info << ": " << myGreeting << "\n";
return true;
}
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,65 @@
#pragma once
#include "../ovp_defines.h"
#include <toolkit/ovtk_all.h>
namespace OpenViBE {
namespace Plugins {
namespace Examples {
class CHelloWorld final : public Toolkit::TBoxAlgorithm<IBoxAlgorithm>
{
public:
void release() override { delete this; }
uint64_t getClockFrequency() override;
bool processClock(Kernel::CMessageClock& /*msg*/) override;
bool process() override { return true; }
_IsDerivedFromClass_Final_(IBoxAlgorithm, OVP_ClassId_HelloWorld)
};
class CHelloWorldListener final : public Toolkit::TBoxListener<IBoxListener>
{
public:
_IsDerivedFromClass_Final_(Toolkit::TBoxListener<IBoxListener>, CIdentifier::undefined())
};
class CHelloWorldDesc final : public IBoxAlgorithmDesc
{
public:
void release() override { }
CString getName() const override { return CString("HelloWorld"); }
CString getAuthorName() const override { return CString(""); }
CString getAuthorCompanyName() const override { return CString("INRIA"); }
CString getShortDescription() const override { return CString("Prints \"Hello World!\" to the log with a user-specified frequency"); }
CString getDetailedDescription() const override
{
return CString("Using several copies of this friendly box (with different names) can be used to e.g. examine box execution order");
}
CString getCategory() const override { return CString("Examples/Basic"); }
CString getVersion() const override { return CString("1.0"); }
CString getStockItemName() const override { return CString("gtk-copy"); }
CIdentifier getCreatedClass() const override { return OVP_ClassId_HelloWorld; }
IPluginObject* create() override { return new CHelloWorld(); }
IBoxListener* createBoxListener() const override { return new CHelloWorldListener; }
void releaseBoxListener(IBoxListener* listener) const override { delete listener; }
bool getBoxPrototype(Kernel::IBoxProto& prototype) const override
{
prototype.addSetting("Frequency (Hz)", OV_TypeId_Float, "1.0");
prototype.addSetting("My greeting", OV_TypeId_String, "Hello World!");
return true;
}
_IsDerivedFromClass_Final_(IBoxAlgorithmDesc, OVP_ClassId_HelloWorldDesc)
};
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,43 @@
/*
* Prints user-specified greeting to the log every time process() is called. Passes the signal through.
*/
#include "ovpCHelloWorldWithInput.h"
namespace OpenViBE {
namespace Plugins {
namespace Examples {
bool CHelloWorldWithInput::processInput(const size_t /*index*/)
{
getBoxAlgorithmContext()->markAlgorithmAsReadyToProcess();
return true;
}
bool CHelloWorldWithInput::process()
{
Kernel::IBoxIO* boxContext = getBoxAlgorithmContext()->getDynamicBoxContext();
const size_t nInput = getBoxAlgorithmContext()->getStaticBoxContext()->getInputCount();
uint64_t start = 0;
uint64_t end = 0;
size_t chunkSize = 0;
const uint8_t* buffer = nullptr;
for (size_t i = 0; i < nInput; ++i)
{
for (size_t j = 0; j < boxContext->getInputChunkCount(i); ++j)
{
boxContext->getInputChunk(i, j, start, end, chunkSize, buffer);
boxContext->appendOutputChunkData(i, buffer, chunkSize);
boxContext->markOutputAsReadyToSend(i, start, end);
boxContext->markInputAsDeprecated(i, j);
}
}
const CString myGreeting = FSettingValueAutoCast(*this->getBoxAlgorithmContext(), 0);
getLogManager() << Kernel::LogLevel_Info << ": " << myGreeting << "\n";
return true;
}
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,95 @@
#pragma once
#include "../ovp_defines.h"
#include <toolkit/ovtk_all.h>
namespace OpenViBE {
namespace Plugins {
namespace Examples {
class CHelloWorldWithInput final : public Toolkit::TBoxAlgorithm<IBoxAlgorithm>
{
public:
void release() override { delete this; }
bool processInput(const size_t index) override;
bool process() override;
_IsDerivedFromClass_Final_(IBoxAlgorithm, OVP_ClassId_HelloWorldWithInput)
};
class CHelloWorldWithInputListener final : public Toolkit::TBoxListener<IBoxListener>
{
public:
// The purposes of the following functions is to make the output correspond to the input
bool onInputNameChanged(Kernel::IBox& box, const size_t index) override
{
CString inputName;
box.getInputName(index, inputName);
box.setOutputName(index, CString("Copy of '") + inputName + CString("'"));
return true;
}
bool onInputAdded(Kernel::IBox& box, const size_t /*index*/) override
{
// Duplicate input as new output
box.addOutput("Temporary name", OV_TypeId_EBMLStream);
return true;
}
bool onInputRemoved(Kernel::IBox& box, const size_t index) override
{
box.removeOutput(index);
return true;
}
bool onInputTypeChanged(Kernel::IBox& box, const size_t index) override
{
// Keep input and output types identical
CIdentifier typeID = CIdentifier::undefined();
box.getInputType(index, typeID);
box.setOutputType(index, typeID);
return true;
}
_IsDerivedFromClass_Final_(Toolkit::TBoxListener<IBoxListener>, CIdentifier::undefined())
};
class CHelloWorldWithInputDesc final : public IBoxAlgorithmDesc
{
public:
void release() override { }
CString getName() const override { return CString("HelloWorldWithInput"); }
CString getAuthorName() const override { return CString(""); }
CString getAuthorCompanyName() const override { return CString("INRIA"); }
CString getShortDescription() const override { return CString("Duplicates input to output and prints a message to the log for each input block"); }
CString getDetailedDescription() const override { return CString(""); }
CString getCategory() const override { return CString("Examples/Basic"); }
CString getVersion() const override { return CString("1.0"); }
CString getStockItemName() const override { return CString("gtk-copy"); }
CIdentifier getCreatedClass() const override { return OVP_ClassId_HelloWorldWithInput; }
IPluginObject* create() override { return new CHelloWorldWithInput(); }
IBoxListener* createBoxListener() const override { return new CHelloWorldWithInputListener; }
void releaseBoxListener(IBoxListener* listener) const override { delete listener; }
bool getBoxPrototype(Kernel::IBoxProto& prototype) const override
{
prototype.addSetting("Message", OV_TypeId_String, "Hello!"); // setting 0
prototype.addInput("Input 0", OV_TypeId_Signal);
prototype.addOutput("Copy of 'Input 0'", OV_TypeId_Signal);
prototype.addFlag(Kernel::BoxFlag_CanAddInput);
prototype.addFlag(Kernel::BoxFlag_CanModifyInput);
return true;
}
_IsDerivedFromClass_Final_(IBoxAlgorithmDesc, OVP_ClassId_HelloWorldWithInputDesc)
};
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,46 @@
#include "ovpCLog.h"
namespace OpenViBE {
namespace Plugins {
namespace Examples {
bool CLog::initialize()
{
getBoxAlgorithmContext()->getPlayerContext()->getLogManager() << Kernel::LogLevel_Info << "initialize\n";
return true;
}
bool CLog::uninitialize()
{
getBoxAlgorithmContext()->getPlayerContext()->getLogManager() << Kernel::LogLevel_Info << "uninitialize\n";
return true;
}
bool CLog::processClock(Kernel::CMessageClock& /*msg*/)
{
getBoxAlgorithmContext()->getPlayerContext()->getLogManager() << Kernel::LogLevel_Info << "processClock\n";
getBoxAlgorithmContext()->markAlgorithmAsReadyToProcess();
return true;
}
bool CLog::processInput(const size_t /*index*/)
{
getBoxAlgorithmContext()->getPlayerContext()->getLogManager() << Kernel::LogLevel_Info << "processInput\n";
getBoxAlgorithmContext()->markAlgorithmAsReadyToProcess();
return true;
}
bool CLog::process()
{
getBoxAlgorithmContext()->getPlayerContext()->getLogManager() << Kernel::LogLevel_Info << "process\n";
Kernel::IBoxIO* boxContext = getBoxAlgorithmContext()->getDynamicBoxContext();
const size_t nInput = getBoxAlgorithmContext()->getStaticBoxContext()->getInputCount();
for (size_t i = 0; i < nInput; ++i) { for (size_t j = 0; j < boxContext->getInputChunkCount(i); ++j) { boxContext->markInputAsDeprecated(i, j); } }
return true;
}
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,241 @@
#pragma once
#include "../ovp_defines.h"
#include <toolkit/ovtk_all.h>
namespace OpenViBE {
namespace Plugins {
namespace Examples {
class CLog final : public Toolkit::TBoxAlgorithm<IBoxAlgorithm>
{
public:
void release() override { delete this; }
uint64_t getClockFrequency() override { return 1LL << 32; }
bool initialize() override;
bool uninitialize() override;
bool processClock(Kernel::CMessageClock& msg) override;
bool processInput(const size_t index) override;
bool process() override;
_IsDerivedFromClass_Final_(IBoxAlgorithm, OVP_ClassId_Log)
};
class CLogListener final : public Toolkit::TBoxListener<IBoxListener>
{
public:
CLogListener() {}
bool initialize() override
{
this->getLogManager() << m_logLevel << "initialize\n";
return true;
}
bool uninitialize() override
{
this->getLogManager() << m_logLevel << "uninitialize\n";
return true;
}
bool onInitialized(Kernel::IBox& /*box*/) override
{
this->getLogManager() << m_logLevel << "onInitialized\n";
return true;
}
bool onNameChanged(Kernel::IBox& /*box*/) override
{
this->getLogManager() << m_logLevel << "onNameChanged\n";
return true;
}
bool onIdentifierChanged(Kernel::IBox& /*box*/) override
{
this->getLogManager() << m_logLevel << "onIdentifierChanged\n";
return true;
}
bool onAlgorithmClassIdentifierChanged(Kernel::IBox& /*box*/) override
{
this->getLogManager() << m_logLevel << "onAlgorithmClassIdentifierChanged\n";
return true;
}
bool onProcessingUnitChangedon(Kernel::IBox& /*box*/) const
{
this->getLogManager() << m_logLevel << "onProcessingUnitChangedon\n";
return true;
}
bool onInputConnected(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onInputConnected\n";
return true;
}
bool onInputDisconnected(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onInputDisconnected\n";
return true;
}
bool onInputAdded(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onInputAdded\n";
return true;
}
bool onInputRemoved(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onInputRemoved\n";
return true;
}
bool onInputTypeChanged(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onInputTypeChanged\n";
return true;
}
bool onInputNameChanged(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onInputNameChanged\n";
return true;
}
bool onOutputConnected(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onOutputConnected\n";
return true;
}
bool onOutputDisconnected(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onOutputDisconnected\n";
return true;
}
bool onOutputAdded(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onOutputAdded\n";
return true;
}
bool onOutputRemoved(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onOutputRemoved\n";
return true;
}
bool onOutputTypeChanged(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onOutputTypeChanged\n";
return true;
}
bool onOutputNameChanged(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onOutputNameChanged\n";
return true;
}
bool onSettingAdded(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onSettingAdded\n";
return true;
}
bool onSettingRemoved(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onSettingRemoved\n";
return true;
}
bool onSettingTypeChanged(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onSettingTypeChanged\n";
return true;
}
bool onSettingNameChanged(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onSettingNameChanged\n";
return true;
}
bool onSettingDefaultValueChanged(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onSettingDefaultValueChanged\n";
return true;
}
bool onSettingValueChanged(Kernel::IBox& /*box*/, const size_t /*index*/) override
{
this->getLogManager() << m_logLevel << "onSettingValueChanged\n";
return true;
}
_IsDerivedFromClass_Final_(Toolkit::TBoxListener<IBoxListener>, CIdentifier::undefined())
protected:
Kernel::ELogLevel m_logLevel = Kernel::LogLevel_Info;
};
class CLogDesc final : public IBoxAlgorithmDesc
{
public:
void release() override { }
CString getName() const override { return CString("Log"); }
CString getAuthorName() const override { return CString("Yann Renard"); }
CString getAuthorCompanyName() const override { return CString("INRIA/IRISA"); }
CString getShortDescription() const override { return CString("Logs stuffs (init, uninit, input, clock, process)"); }
CString getDetailedDescription() const override
{
return CString(
"This sample box shows how stuffs could be logged in the log manager. Note that the different inputs, outputs and parameters have no effect, they only exist to test the logging when there are modifications.");
}
CString getCategory() const override { return CString("Examples/Basic"); }
CString getVersion() const override { return CString("1.0"); }
CIdentifier getCreatedClass() const override { return OVP_ClassId_Log; }
IPluginObject* create() override { return new CLog(); }
bool getBoxPrototype(Kernel::IBoxProto& prototype) const override
{
// Adds box inputs
prototype.addInput("Input stream", OV_TypeId_Signal);
// Adds box outputs
prototype.addOutput("Output stream", OV_TypeId_Signal);
// Adds box settings
prototype.addSetting("Integer setting", OV_TypeId_Integer, "0");
prototype.addSetting("String setting", OV_TypeId_String, "");
prototype.addFlag(Kernel::BoxFlag_CanAddInput);
prototype.addFlag(Kernel::BoxFlag_CanModifyInput);
prototype.addFlag(Kernel::BoxFlag_CanAddOutput);
prototype.addFlag(Kernel::BoxFlag_CanModifyOutput);
prototype.addFlag(Kernel::BoxFlag_CanAddSetting);
prototype.addFlag(Kernel::BoxFlag_CanModifySetting);
return true;
}
CString getStockItemName() const override { return CString("gtk-edit"); }
IBoxListener* createBoxListener() const override { return new CLogListener; }
virtual void releaseBoxListener(IBoxListener* listener) { delete listener; }
_IsDerivedFromClass_Final_(IBoxAlgorithmDesc, OVP_ClassId_LogDesc)
};
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE
@@ -0,0 +1,21 @@
#pragma once
// Boxes
//---------------------------------------------------------------------------------------------------
#define OVP_ClassId_BoxAlgorithm_Clock OpenViBE::CIdentifier(0x14CB4CFC, 0x6D064CB3)
#define OVP_ClassId_BoxAlgorithm_ClockDesc OpenViBE::CIdentifier(0x754C233D, 0x37DF04A3)
#define OVP_ClassId_Log OpenViBE::CIdentifier(0x00BE3E25, 0x274F2075)
#define OVP_ClassId_LogDesc OpenViBE::CIdentifier(0x00780136, 0x57633D46)
#define OVP_ClassId_HelloWorldDesc OpenViBE::CIdentifier(0x62B739D3, 0x040A3F74)
#define OVP_ClassId_HelloWorldWithInputDesc OpenViBE::CIdentifier(0x6E067319, 0x775675F0)
#define OVP_ClassId_HelloWorld OpenViBE::CIdentifier(0x189445E8, 0x57C55950)
#define OVP_ClassId_HelloWorldWithInput OpenViBE::CIdentifier(0x657D5545, 0x1CE92FB8)
// Global defines
//---------------------------------------------------------------------------------------------------
#ifdef TARGET_HAS_ThirdPartyOpenViBEPluginsGlobalDefines
#include "ovp_global_defines.h"
#endif // TARGET_HAS_ThirdPartyOpenViBEPluginsGlobalDefines
#define OV_AttributeId_Box_FlagIsUnstable OpenViBE::CIdentifier(0x666FFFFF, 0x666FFFFF)
@@ -0,0 +1,29 @@
#include "ovp_defines.h"
#include "box-algorithms/ovpCHelloWorld.h"
#include "box-algorithms/ovpCHelloWorldWithInput.h"
#include "box-algorithms/ovpCLog.h"
#include "box-algorithms/ovpCBoxAlgorithmNothing.h"
#include "box-algorithms/ovpCBoxAlgorithmClock.h"
namespace OpenViBE {
namespace Plugins {
namespace Examples {
OVP_Declare_Begin()
context.getTypeManager().registerEnumerationEntry(OV_TypeId_BoxAlgorithmFlag, OV_AttributeId_Box_FlagIsUnstable.toString(),
OV_AttributeId_Box_FlagIsUnstable.id());
OVP_Declare_New(CHelloWorldDesc);
OVP_Declare_New(CHelloWorldWithInputDesc);
OVP_Declare_New(CLogDesc);
OVP_Declare_New(CBoxAlgorithmNothingDesc);
OVP_Declare_New(CBoxAlgorithmClockDesc);
OVP_Declare_End()
} // namespace Examples
} // namespace Plugins
} // namespace OpenViBE