Adding box as per developer documentation

Post Reply
karthiks
Posts: 78
Joined: Thu Sep 02, 2010 2:43 pm
Location: Université Libre de Bruxelles

Adding box as per developer documentation

Post by karthiks »

Hey,

I tried to use the code in the developer documentation to learn how to build a new algorithm and box. But I get the following error -

Code: Select all

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[100%] Built target OpenViBE-plugins-classification-dynamic

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[100%] Built target OpenViBE-plugins-classification-dynamic
Install the project...
-- Install configuration: "Release"
-- Up-to-date: E:/Openvibe/openvibe-plugins/classification/trunc/lib/OpenViBE-plugins-classification-dynamic.lib
-- Up-to-date: E:/Openvibe/openvibe-plugins/classification/trunc/bin/OpenViBE-plugins-classification-dynamic.dll

_______________________________________________________________________________

Configuring and building openvibe-plugins\classification-gpl\trunc ...

--   Found OpenViBE...
--     [  OK  ] lib E:/Openvibe/openvibe/trunc/lib/OpenViBE-dynamic.lib
--   Found OpenViBE-toolkit...
--     [  OK  ] lib E:/Openvibe/openvibe-toolkit/trunc/lib/OpenViBE-toolkit-dynamic.lib
--   Found OpenViBE module EBML...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/ebml/trunc/lib/OpenViBE-module-EBML-dynamic.lib
--   Found OpenViBE module XML...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/xml/trunc/lib/OpenViBE-module-XML-dynamic.lib
--   Found OpenViBE module System...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/system/trunc/lib/OpenViBE-module-System-dynamic.lib
--   Found OpenViBE plugins global defines...
--   Found it++...
--     [  OK  ] Third party lib E:/Openvibe/dependencies/itpp/lib/libblas.a.lib
--     [  OK  ] Third party lib E:/Openvibe/dependencies/itpp/lib/libfftw3-3.lib

--     [  OK  ] Third party lib E:/Openvibe/dependencies/itpp/lib/liblapack.a.lib
--     [  OK  ] Third party lib E:/Openvibe/dependencies/itpp/lib/libgcc.a.lib
--     [  OK  ] Third party lib E:/Openvibe/dependencies/itpp/lib/libg2c.a.lib
--     [  OK  ] Third party lib E:/Openvibe/dependencies/itpp/lib/itpp.lib
-- Configuring done
-- Generating done
-- Build files have been written to: E:/Openvibe/local-tmp/openvibe-plugins/classification-gpl/trunc

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[100%] Built target OpenViBE-plugins-classification-gpl-dynamic

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[100%] Built target OpenViBE-plugins-classification-gpl-dynamic
Install the project...
-- Install configuration: "Release"
-- Up-to-date: E:/Openvibe/openvibe-plugins/classification-gpl/trunc/lib/OpenViBE-plugins-classification-gpl-dynamic.lib
-- Up-to-date: E:/Openvibe/openvibe-plugins/classification-gpl/trunc/bin/OpenViBE-plugins-classification-gpl-dynamic.dll

_______________________________________________________________________________

Configuring and building openvibe-plugins\feature-extraction\trunc ...

--   Found OpenViBE...
--     [  OK  ] lib E:/Openvibe/openvibe/trunc/lib/OpenViBE-dynamic.lib
--   Found OpenViBE-toolkit...
--     [  OK  ] lib E:/Openvibe/openvibe-toolkit/trunc/lib/OpenViBE-toolkit-dynamic.lib
--   Found OpenViBE module EBML...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/ebml/trunc/lib/OpenViBE-module-EBML-dynamic.lib
--   Found OpenViBE module System...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/system/trunc/lib/OpenViBE-module-System-dynamic.lib
-- Configuring done
-- Generating done
-- Build files have been written to: E:/Openvibe/local-tmp/openvibe-plugins/feature-extraction/trunc

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[100%] Built target OpenViBE-plugins-feature-extraction-dynamic

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[100%] Built target OpenViBE-plugins-feature-extraction-dynamic
Install the project...
-- Install configuration: "Release"
-- Up-to-date: E:/Openvibe/openvibe-plugins/feature-extraction/trunc/lib/OpenViBE-plugins-feature-extraction-dynamic.lib
-- Up-to-date: E:/Openvibe/openvibe-plugins/feature-extraction/trunc/bin/OpenViBE-plugins-feature-extraction-dynamic.dll

_______________________________________________________________________________

Configuring and building openvibe-plugins\file-io\trunc ...

--   Found OpenViBE...
--     [  OK  ] lib E:/Openvibe/openvibe/trunc/lib/OpenViBE-dynamic.lib
--   Found OpenViBE-toolkit...
--     [  OK  ] lib E:/Openvibe/openvibe-toolkit/trunc/lib/OpenViBE-toolkit-dynamic.lib
--   Found OpenViBE module EBML...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/ebml/trunc/lib/OpenViBE-module-EBML-dynamic.lib
--   Found OpenViBE module System...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/system/trunc/lib/OpenViBE-module-System-dynamic.lib
--   Found OpenViBE module XML...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/xml/trunc/lib/OpenViBE-module-XML-dynamic.lib
--   Found OpenViBE plugins global defines...
-- Configuring done
-- Generating done
-- Build files have been written to: E:/Openvibe/local-tmp/openvibe-plugins/file-io/trunc

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[100%] Built target OpenViBE-plugins-file-io-dynamic

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[100%] Built target OpenViBE-plugins-file-io-dynamic
Install the project...
-- Install configuration: "Release"
-- Up-to-date: E:/Openvibe/openvibe-plugins/file-io/trunc/lib/OpenViBE-plugins-file-io-dynamic.lib
-- Up-to-date: E:/Openvibe/openvibe-plugins/file-io/trunc/bin/OpenViBE-plugins-file-io-dynamic.dll

_______________________________________________________________________________

Configuring and building openvibe-plugins\samples\trunc ...

--   Found OpenViBE...
--     [  OK  ] lib E:/Openvibe/openvibe/trunc/lib/OpenViBE-dynamic.lib
--   Found OpenViBE-toolkit...
--     [  OK  ] lib E:/Openvibe/openvibe-toolkit/trunc/lib/OpenViBE-toolkit-dynamic.lib
--   Found OpenViBE module EBML...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/ebml/trunc/lib/OpenViBE-module-EBML-dynamic.lib
--   Found OpenViBE module System...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/system/trunc/lib/OpenViBE-module-System-dynamic.lib
--   Found OpenViBE module XML...
--     [  OK  ] lib E:/Openvibe/openvibe-modules/xml/trunc/lib/OpenViBE-module-XML-dynamic.lib
--   Found OpenViBE plugins global defines...
-- Configuring done
-- Generating done
-- Build files have been written to: E:/Openvibe/local-tmp/openvibe-plugins/samples/trunc

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[  5%] Building CXX object CMakeFiles/OpenViBE-plugins-samples-dynamic.dir/src/ovpCAlgorithmSignalProcessingAlgorithm.obj
ovpCAlgorithmSignalProcessingAlgorithm.cpp
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgorithm.h(8) : warning C4005: 'OVP_ClassId_Algorithm_SignalProcessingAlgorithm' :
macro redefinition
        e:\openvibe\openvibe-plugins\samples\trunc\src\ovp_defines.h(10) : see p
revious definition of 'OVP_ClassId_Algorithm_SignalProcessingAlgorithm'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(9) : warning C4005: 'OVP_ClassId_Algorithm_SignalProcessingAlgorithmDesc
' : macro redefinition
        e:\openvibe\openvibe-plugins\samples\trunc\src\ovp_defines.h(11) : see p
revious definition of 'OVP_ClassId_Algorithm_SignalProcessingAlgorithmDesc'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(11) : warning C4005: 'OVP_Algorithm_SignalProcessingAlgorithm_InputParam
eterId_Matrix' : macro redefinition
        e:\openvibe\openvibe-plugins\samples\trunc\src\ovp_defines.h(13) : see p
revious definition of 'OVP_Algorithm_SignalProcessingAlgorithm_InputParameterId_
Matrix'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(12) : warning C4005: 'OVP_Algorithm_SignalProcessingAlgorithm_OutputPara
meterId_Matrix' : macro redefinition
        e:\openvibe\openvibe-plugins\samples\trunc\src\ovp_defines.h(14) : see p
revious definition of 'OVP_Algorithm_SignalProcessingAlgorithm_OutputParameterId
_Matrix'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(14) : warning C4005: 'OVP_Algorithm_SignalProcessingAlgorithm_InputTrigg
erId_Initialize' : macro redefinition
        e:\openvibe\openvibe-plugins\samples\trunc\src\ovp_defines.h(15) : see p
revious definition of 'OVP_Algorithm_SignalProcessingAlgorithm_InputTriggerId_In
itialize'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(15) : warning C4005: 'OVP_Algorithm_SignalProcessingAlgorithm_InputTrigg
erId_Process' : macro redefinition
        e:\openvibe\openvibe-plugins\samples\trunc\src\ovp_defines.h(16) : see p
revious definition of 'OVP_Algorithm_SignalProcessingAlgorithm_InputTriggerId_Pr
ocess'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(33) : error C2059: syntax error : '='
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(33) : error C2059: syntax error : '='
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(56) : error C2059: syntax error : '='
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(62) : error C2143: syntax error : missing ')' before '='
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(62) : error C2660: 'OpenViBE::Kernel::IAlgorithmProto::addInputParameter
' : function does not take 0 arguments
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(62) : error C2059: syntax error : ')'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(63) : error C2143: syntax error : missing ')' before '='
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(63) : error C2660: 'OpenViBE::Kernel::IAlgorithmProto::addOutputParamete
r' : function does not take 0 arguments
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(63) : error C2059: syntax error : ')'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(65) : error C2143: syntax error : missing ')' before '='
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(65) : error C2660: 'OpenViBE::Kernel::IAlgorithmProto::addInputTrigger'
: function does not take 0 arguments
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(65) : error C2059: syntax error : ')'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(66) : error C2143: syntax error : missing ')' before '='
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(66) : error C2660: 'OpenViBE::Kernel::IAlgorithmProto::addInputTrigger'
: function does not take 0 arguments
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(66) : error C2059: syntax error : ')'
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(72) : error C2059: syntax error : '='
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.h(72) : error C2059: syntax error : '='
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(12) : error C2143: syntax error : missing ')' before '='
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(12) : error C2660: 'OpenViBEToolkit::TAlgorithm<CAlgorithmParentClass>
::getInputParameter' : function does not take 0 arguments
        with
        [
            CAlgorithmParentClass=OpenViBE::Plugins::IAlgorithm
        ]
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(12) : error C2059: syntax error : ')'
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(13) : error C2143: syntax error : missing ')' before '='
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(13) : error C2660: 'OpenViBEToolkit::TAlgorithm<CAlgorithmParentClass>
::getOutputParameter' : function does not take 0 arguments
        with
        [
            CAlgorithmParentClass=OpenViBE::Plugins::IAlgorithm
        ]
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(13) : error C2059: syntax error : ')'
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(29) : error C2143: syntax error : missing ')' before '='
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(29) : error C2660: 'OpenViBEToolkit::TAlgorithm<CAlgorithmParentClass>
::isInputTriggerActive' : function does not take 0 arguments
        with
        [
            CAlgorithmParentClass=OpenViBE::Plugins::IAlgorithm
        ]
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(29) : error C2059: syntax error : ')'
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(34) : error C2143: syntax error : missing ')' before '='
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(34) : error C2660: 'OpenViBEToolkit::TAlgorithm<CAlgorithmParentClass>
::isInputTriggerActive' : function does not take 0 arguments
        with
        [
            CAlgorithmParentClass=OpenViBE::Plugins::IAlgorithm
        ]
E:\Openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgo
rithm.cpp(34) : error C2059: syntax error : ')'
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\nmake.exe"' : return code '0x2'
Stop.

An error occured during building process

Press any key to continue . . .
I did generate new IDs and also defined them in the ovp_main.cpp. I am unable to understand what I did wrong. Could you please help me?

Thank you.

Regards,

Karthik

PS: In the documentation for the algorithm implementation,

Code: Select all

Similarly, op_pMatrix is the output matrix pointer of this algorithm. The parameter can be retrieved with the getOutputParameter function and given to the handler. Past this point, ip_pMatrix can be used as an IMatrix* pointer using the -> operator. 
should read op_pMatrix can be used... Am I wrong?
Regards,

Karthik

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: Adding box as per developer documentation

Post by lbonnet »

Hello karthiks,

Many thanks for your post... It pointed out a huge mistake I made in the tutorial :oops:
I copy-pasted the wrong code in the tutorial page...

For every ID declaration you have :

Code: Select all

#define OVP_ClassId_BoxAlgorithm_SignalProcessingBoxAlgorithm = OpenViBE::CIdentifier(0x330E3A87, 0x31565BA6)
and it should be :

Code: Select all

#define OVP_ClassId_BoxAlgorithm_SignalProcessingBoxAlgorithm OpenViBE::CIdentifier(0x330E3A87, 0x31565BA6)
... without the "=" !!

When the compiler replaces every ID by its defined value, the "=" is also used, resulting in all the errors you have.

I correct this right now, sorry.

---------------

Secondly, it seems like their is multiple definition of the IDs used by the box and the algorithm.
If you read the error log, you have at start :

Code: Select all

ovpCAlgorithmSignalProcessingAlgorithm.cpp
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgorithm.h(8) : warning C4005: 'OVP_ClassId_Algorithm_SignalProcessingAlgorithm' :
macro redefinition
        e:\openvibe\openvibe-plugins\samples\trunc\src\ovp_defines.h(10) : see previous definition of 'OVP_ClassId_Algorithm_SignalProcessingAlgorithm'
It means that this ID is already defined in ovp_defines.h, line 10.
In fact the ovp_defines.h file in the SVN forge declares all the IDs used in the tutorial. I'll update that file.
Anyway, it's simple to solve this problem : you have to be sure that the IDs you are using are defined only once, so delete one of the declaration.
This should fix all the warnings you experienced.

Laurent
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: Adding box as per developer documentation

Post by lbonnet »


PS: In the documentation for the algorithm implementation,

Similarly, op_pMatrix is the output matrix pointer of this algorithm. The parameter can be retrieved with the getOutputParameter function and given to the handler. Past this point, ip_pMatrix can be used as an IMatrix* pointer using the -> operator.

should read op_pMatrix can be used... Am I wrong?
Indeed :D
also fixed !

thanks !
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

karthiks
Posts: 78
Joined: Thu Sep 02, 2010 2:43 pm
Location: Université Libre de Bruxelles

Re: Adding box as per developer documentation

Post by karthiks »

lbonnet wrote:Hello karthiks,

Secondly, it seems like their is multiple definition of the IDs used by the box and the algorithm.
If you read the error log, you have at start :

Code: Select all

ovpCAlgorithmSignalProcessingAlgorithm.cpp
e:\openvibe\openvibe-plugins\samples\trunc\src\ovpCAlgorithmSignalProcessingAlgorithm.h(8) : warning C4005: 'OVP_ClassId_Algorithm_SignalProcessingAlgorithm' :
macro redefinition
        e:\openvibe\openvibe-plugins\samples\trunc\src\ovp_defines.h(10) : see previous definition of 'OVP_ClassId_Algorithm_SignalProcessingAlgorithm'
It means that this ID is already defined in ovp_defines.h, line 10.
In fact the ovp_defines.h file in the SVN forge declares all the IDs used in the tutorial. I'll update that file.
Anyway, it's simple to solve this problem : you have to be sure that the IDs you are using are defined only once, so delete one of the declaration.
This should fix all the warnings you experienced.

Laurent
I deleted from both the .h files and kept it in ovp_defines.h
Last edited by karthiks on Wed Jan 26, 2011 4:20 pm, edited 1 time in total.
Regards,

Karthik

karthiks
Posts: 78
Joined: Thu Sep 02, 2010 2:43 pm
Location: Université Libre de Bruxelles

Re: Adding box as per developer documentation

Post by karthiks »

lbonnet wrote:

PS: In the documentation for the algorithm implementation,

Similarly, op_pMatrix is the output matrix pointer of this algorithm. The parameter can be retrieved with the getOutputParameter function and given to the handler. Past this point, ip_pMatrix can be used as an IMatrix* pointer using the -> operator.

should read op_pMatrix can be used... Am I wrong?
Indeed :D
also fixed !

thanks !
Heh, you're welcome. Btw, here - http://openvibe.inria.fr/documentation/ ... ilter.html, the last line should be "This is basically a Surface Laplacian around C4 and C3." instead of "This is basically a Surface Laplacian around C4 and C5."
Last edited by karthiks on Wed Jan 26, 2011 3:57 pm, edited 1 time in total.
Regards,

Karthik

karthiks
Posts: 78
Joined: Thu Sep 02, 2010 2:43 pm
Location: Université Libre de Bruxelles

Re: Adding box as per developer documentation

Post by karthiks »

Everything works fine now. I think you should add two lines at the end of the tutorial saying -

1. Add these two lines to the ovp_main.cpp -

Code: Select all

#include "ovpCAlgorithmSignalProcessingAlgorithm.h"
#include "ovpCBoxAlgorithmSignalProcessingBoxAlgorithm.h"
2. Change the following line in openvibe.conf -

Code: Select all

Designer_ShowUnstable = false
from false to true.

The tutorial was very good and explanatory :) Thank you.
Regards,

Karthik

Post Reply