Programming Reference:BCI2000 Source Code: Difference between revisions
| Line 23: | Line 23: | ||
{|border="1" cellspacing="0" | {|border="1" cellspacing="0" | ||
!batch | !batch | ||
| | |on-line system startup scripts | ||
|- | |- | ||
!data | !data | ||
| Line 29: | Line 29: | ||
|- | |- | ||
!doc | !doc | ||
|information | |information, HTML help files | ||
|- | |- | ||
!parms | !parms | ||
| | |on-line system parameter files | ||
|- | |- | ||
!prog | !prog | ||
| Line 44: | Line 44: | ||
|} | |} | ||
Different from the binary distibution, there is | Different from the binary distibution, there is an additional ''src'' subtree which holds the BCI2000 source code. | ||
Below ''src'', there should be no end-user executables, compiled LaTeX files, or pdf files converted from editable formats. | Below ''src'', there should be no end-user executables, compiled LaTeX files, or pdf files converted from editable formats. | ||
Rather, their source files should go below ''src'', and their end-user versions go into either ''prog,'' ''doc,'' or the appropriate end-user directory below ''tools''. | Rather, their source files should go below ''src'', and their end-user versions go into either ''prog,'' ''doc,'' or the appropriate end-user directory below ''tools''. | ||
In all makefiles or project files that are relevant | In all makefiles or project files that are relevant to the binary distribution, the compiled output is directed into the appropriate executable directory (''prog'' or ''tools/mytool''). | ||
The organization of the ''src'' subtree itself is as follows: | |||
===<tt>src/buildutils</tt>=== | |||
Holds small utility programs that are used for maintenance. | |||
===<tt>src/buildutils/testing</tt>=== | |||
Scripts and data used to test executables during the build phase (<tt>make test</tt>). | |||
===<tt>src/contrib</tt>=== | |||
Source code and project files from the [[Contributions:Contents|Contributions]] section. | |||
Paralleling organization of the <tt>core</tt> directory, there are subdirectories for application, signal processing, and source modules, and for tools. An additional directory, <tt>AppConnector</tt>, contains programs connecting via the [[User Reference:AppConnector|AppConnector]] interface. | |||
Each project from the contrib directory should have its own documentation page accessible through the [[Contributions:Contents]] hierarchy. | |||
By default, contrib projects are excluded from the make process. For information about how to compile and use a piece of software located in the contrib directory, see the[[Programming Howto:Building BCI2000#Building Contributions|Building BCI2000 Howto]] page. | |||
===<tt>src/core</tt>=== | |||
Source code and project files for the BCI2000 core distribution. Below this directory, there are subdirectories for [[User Reference:Core Mocules|core modules]], and tools. | |||
===<tt>src/shared</tt>=== | |||
Core and contrib directories only contain project files (resp. make files), and source code that is unique to the respective piece of software. BCI2000 framework code is contained below the "shared" directory. | |||
Inside the "shared" directory, code is organized into subdirectories as follows: | |||
*accessors | |||
:contains code related to the [[Programming Reference:Environment|Environment]] accessor layer, | |||
*bcistream | |||
:provides code for the <tt>bcierr, bciout,</tt> and <tt>bcidbg</tt> output streams, and error handling, | |||
*config | |||
:contains configuration and versioning information in form of header files, | |||
*fileio | |||
:contains code dealing with directories and files, and its subdirectories represent data formats used for output and input, | |||
*gui | |||
:provides a very basic platform-independent interface layer to graphical elements. | |||
*modules | |||
:holds code that is common to [[User Reference:Core Mocules|core modules]], and one subdirectory for common code from each application, signal processing, and source modules. Most [[Programming Reference:GenericFilter|BCI2000 filters]] are located inside those subdirectories. | |||
*obj | |||
:holds pre-compiled header files during make and build processes, | |||
*types | |||
:contains BCI2000-specific data types that may be sent through [[Technical Reference:BCI2000 Messages|BCI2000 messages]], such as signals, parameters, and states. | |||
*utils | |||
:miscellaneous utility functions. | |||
===<tt>src/extlib</tt>=== | |||
Unlike the ''shared'' directory, this directory contains libraries, or interfaces to libraries, that are used by BCI2000 but not part of BCI2000 itself. | |||
Typically, the code in ''extlib'' is independent of BCI2000, and in most cases external to the BCI2000 project itself, e.g. provided by library vendors. | |||
===<tt>src/doc</tt>=== | |||
Contents of this directory are related to the production of documentation, not documentation itself. | |||
Its <tt>figures</tt> subdirectory holds original vector format versions of PNG files uploaded into the wiki, and independent copies of the PNG files themselves. | |||
<tt>wiki2help</tt> contains software related to the conversion of Wiki pages into the HTML help files from the BCI2000 distribution's <tt>doc/htmlhelp</tt> directory. | |||
==Coding Guidelines== | ==Coding Guidelines== | ||
Revision as of 11:08, 22 February 2008
Version Management
The BCI2000 source code is managed with the help of Subversion, an open-source cross-platform versioning tool widely used in various kinds of projects.
Subversion (SVN) uses the HTTP-based WebDAV protocol, so even web browsers may be used as clients, although a true SVN client software is required to access all features of the versioning system.
Browsing the Source Code Repository Online
Online viewing, and comparison of different versions of all source code files, is possible with a web browser (http://www.bci2000.org/tracproj/browser). (If you get a message about "viewing privileges", click the "login" link at the top right to log in.)
TortoiseSVN Client
For Win32 platforms, we recommend TortoiseSVN, a comfortable-to-use SVN client integrated into the Explorer shell.
Howto Pages
- Accessing the BCI2000 source code:
- Building BCI2000 from the source code:
Directory Layout
The SVN directory layout matches that of the BCI2000 binary distribution:
| batch | on-line system startup scripts |
|---|---|
| data | online data output |
| doc | information, HTML help files |
| parms | on-line system parameter files |
| prog | online system executables |
| tools | off-line analysis tools |
| src | source code |
Different from the binary distibution, there is an additional src subtree which holds the BCI2000 source code. Below src, there should be no end-user executables, compiled LaTeX files, or pdf files converted from editable formats. Rather, their source files should go below src, and their end-user versions go into either prog, doc, or the appropriate end-user directory below tools. In all makefiles or project files that are relevant to the binary distribution, the compiled output is directed into the appropriate executable directory (prog or tools/mytool).
The organization of the src subtree itself is as follows:
src/buildutils
Holds small utility programs that are used for maintenance.
src/buildutils/testing
Scripts and data used to test executables during the build phase (make test).
src/contrib
Source code and project files from the Contributions section. Paralleling organization of the core directory, there are subdirectories for application, signal processing, and source modules, and for tools. An additional directory, AppConnector, contains programs connecting via the AppConnector interface.
Each project from the contrib directory should have its own documentation page accessible through the Contributions:Contents hierarchy.
By default, contrib projects are excluded from the make process. For information about how to compile and use a piece of software located in the contrib directory, see theBuilding BCI2000 Howto page.
src/core
Source code and project files for the BCI2000 core distribution. Below this directory, there are subdirectories for core modules, and tools.
Core and contrib directories only contain project files (resp. make files), and source code that is unique to the respective piece of software. BCI2000 framework code is contained below the "shared" directory.
Inside the "shared" directory, code is organized into subdirectories as follows:
- accessors
- contains code related to the Environment accessor layer,
- bcistream
- provides code for the bcierr, bciout, and bcidbg output streams, and error handling,
- config
- contains configuration and versioning information in form of header files,
- fileio
- contains code dealing with directories and files, and its subdirectories represent data formats used for output and input,
- gui
- provides a very basic platform-independent interface layer to graphical elements.
- modules
- holds code that is common to core modules, and one subdirectory for common code from each application, signal processing, and source modules. Most BCI2000 filters are located inside those subdirectories.
- obj
- holds pre-compiled header files during make and build processes,
- types
- contains BCI2000-specific data types that may be sent through BCI2000 messages, such as signals, parameters, and states.
- utils
- miscellaneous utility functions.
src/extlib
Unlike the shared directory, this directory contains libraries, or interfaces to libraries, that are used by BCI2000 but not part of BCI2000 itself. Typically, the code in extlib is independent of BCI2000, and in most cases external to the BCI2000 project itself, e.g. provided by library vendors.
src/doc
Contents of this directory are related to the production of documentation, not documentation itself. Its figures subdirectory holds original vector format versions of PNG files uploaded into the wiki, and independent copies of the PNG files themselves. wiki2help contains software related to the conversion of Wiki pages into the HTML help files from the BCI2000 distribution's doc/htmlhelp directory.
Coding Guidelines
We maintain a loose set of guidelines/rules that is aimed at readability and maintenance efficiency. These rules are not obligatory but we ask contributors to consider them before handing in their code.