Difference between revisions of "Programming Howto:Create a custom Signal Processing Module"

From BCI2000 Wiki
Jump to: navigation, search
(Created page with "Execute the NewBCI2000Module binary from the BCI2000 build directory File:new_module_1.png Enter "VeryNiceSignalProcessing" when prompted for the new module's name Fi...")
 
(Next step)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Execute the NewBCI2000Module binary from the BCI2000 build directory
+
==Back==
 +
To [[Programming Howto:Building and Customizing BCI2000|this howto's overview page]].
  
[[File:new_module_1.png]]
+
==Create module files from templates==
 +
Execute the NewBCI2000Module binary from the BCI2000 build directory.
  
Enter "VeryNiceSignalProcessing" when prompted for the new module's name
+
[[File:new_module_1.png|center]]
  
[[File:new_module_2.png]]
+
Enter "VeryNiceSignalProcessing" when prompted for the new module's name.
 +
 
 +
[[File:new_module_2.png|center]]
  
 
You will get a list of files that have been created for you ...
 
You will get a list of files that have been created for you ...
  
[[File:new_module_3.png]]
+
[[File:new_module_3.png|center]]
 +
 
 +
... which you may verify using a Windows explorer window. Note that a filter source file has been created automatically, with its name derived from the module's name.
 +
 
 +
[[File:new_module_4.png|center]]
 +
 
 +
==Create a module project using CMake==
 +
Double-click the configure script from the BCI2000 build directory to open the CMake GUI.
 +
 
 +
[[File:new_module_5.png|center]]
 +
 
 +
In the CMake GUI, click "Generate" to re-create project files.
 +
 
 +
[[File:new_module_6.png|center]]
  
... which you may verify using a windows explorer window
+
A project called "VeryNiceSignalProcessing" will have been added at the end.
  
[[File:new_module_4.png]]
+
[[File:new_module_7.png|center]]
  
Double-click the configure script from the BCI2000 build directory to open the CMake GUI
+
==Edit the module's code in the IDE==
 +
Switch to VisualStudio, and click "Reload" when prompted what to do.
  
[[File:new_module_5.png]]
+
[[File:deploy_module_3.png|center]]
  
In the CMake GUI, click "generate" to re-create project files
+
Locate the "VeryNiceSignalProcessing" project in the list of projects.
  
[[File:new_module_6.png]]
+
[[File:new_module_9.png|center]]
  
A project called "VeryNiceSignalProcessing" will have been added at the end
+
Define a default location for the new filter in its <tt>RegisterFilter()</tt> statement, and deactivate the <tt>#error</tt> statement above that.
  
[[File:new_module_7.png]]
+
[[File:new_module_10.png|center]]
  
Open the VisualStudio solution file from the BCI2000 build directory
+
Define the actual location for the new filter in the <tt>PipeDefinition</tt> source file, and deactivate the <tt>#error</tt> statement below that.
  
[[File:new_module_8.png]]
+
[[File:new_module_11.png|center]]
  
Locate the "VeryNiceSignalProcessing" project in the list of projects
+
==Build the new module==
 +
Right-click the project, and choose "Build" from the context menu.
  
[[File:new_module_9.png]]
+
[[File:new_module_12.png|center]]
  
Define a default location for the new filter in its RegisterFilter() statement, and deactivate the #error statement above that
+
A "VeryNiceSignalProcessing" executable will have been created in the BCI2000 "prog" directory.
  
[[File:new_module_10.png]]
+
[[File:new_module_13.png|center]]
  
Define the actual location for the new filter in the PipeDefinition source file, and deactivate the #error statement below that
+
==Next step==
 +
As a next step, learn how to [[Programming Howto:Attach the Debugger to a BCI2000 Module|attach the debugger to a BCI2000 module]].
  
[[File:new_module_11.png]]
+
==See also==
 +
[[Programming Howto:Building and Customizing BCI2000]]
  
Right-click the project, and choose "Build" from the context menu
+
[[Programming Tutorial:Implementing a Data Acquisition Module]]
  
[[File:new_module_12.png]]
+
[[Programming Tutorial:Implementing a Signal Processing Filter]]
  
A "VeryNiceSignalProcessing" executable has been created in the BCI2000 prog directory
+
[[Category:Howto]]

Latest revision as of 15:02, 16 August 2018

Back

To this howto's overview page.

Create module files from templates

Execute the NewBCI2000Module binary from the BCI2000 build directory.

New module 1.png

Enter "VeryNiceSignalProcessing" when prompted for the new module's name.

New module 2.png

You will get a list of files that have been created for you ...

New module 3.png

... which you may verify using a Windows explorer window. Note that a filter source file has been created automatically, with its name derived from the module's name.

New module 4.png

Create a module project using CMake

Double-click the configure script from the BCI2000 build directory to open the CMake GUI.

New module 5.png

In the CMake GUI, click "Generate" to re-create project files.

New module 6.png

A project called "VeryNiceSignalProcessing" will have been added at the end.

New module 7.png

Edit the module's code in the IDE

Switch to VisualStudio, and click "Reload" when prompted what to do.

Deploy module 3.png

Locate the "VeryNiceSignalProcessing" project in the list of projects.

New module 9.png

Define a default location for the new filter in its RegisterFilter() statement, and deactivate the #error statement above that.

New module 10.png

Define the actual location for the new filter in the PipeDefinition source file, and deactivate the #error statement below that.

New module 11.png

Build the new module

Right-click the project, and choose "Build" from the context menu.

New module 12.png

A "VeryNiceSignalProcessing" executable will have been created in the BCI2000 "prog" directory.

New module 13.png

Next step

As a next step, learn how to attach the debugger to a BCI2000 module.

See also

Programming Howto:Building and Customizing BCI2000

Programming Tutorial:Implementing a Data Acquisition Module

Programming Tutorial:Implementing a Signal Processing Filter