Skip to content

Commit

Permalink
improve docs [ci skip]
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com>
  • Loading branch information
Andrey1994 committed Nov 13, 2019
1 parent b5c2c1b commit 1723744
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
13 changes: 9 additions & 4 deletions docs/CoreModuleAPI.rst
@@ -1,15 +1,20 @@
BrainFlow Core API
===================

Core module of BrainFlow includes two dynamic libraries, one of them reads data from a board and provides methods to query information about data format while another dynamic library performs signal processing. All bindings just call methods from these dynamic libraries, it simplifies adding new boards and maintenance.
Core module of BrainFlow API is represented by two dynamic libraries:

* BoardController for data acquisition
* DataHandler for signal processing

These libraries are independent and you can use only one of them if you want to.

All possible exit codes and supported boards
----------------------------------------------

.. literalinclude:: ../src/board_controller/inc/brainflow_constants.h
:language: cpp

Board Controller Interface
BoardController Interface
---------------------------

This library reads data from a board and provides an API to request information about this board and data format. In User API these methods are available via BoardShim class.
Expand All @@ -24,10 +29,10 @@ Board Description methods are described below:
.. literalinclude:: ../src/board_controller/inc/board_info_getter.h
:language: cpp

Data Handler Interface
DataHandler Interface
----------------------

This library performs basic signal processing. In User API these methods are available via DataFilter class.
This library performs signal processing. In User API these methods are available via DataFilter class.

.. literalinclude:: ../src/data_handler/inc/data_handler.h
:language: cpp
19 changes: 5 additions & 14 deletions docs/UserAPI.rst
Expand Up @@ -3,14 +3,13 @@ User API

BrainFlow User API has only two classes:

- BoardShim to read data from a board
- DataFilter to perform signal processing
- BoardShim to read data from a board, it calls methods from underlying BoardController library
- DataFilter to perform signal processing, it calls methods from underlying DataHandler library

BrainFlow API is board agnostic, so to select a specific board you need to pass BrainFlow's board id to BoardShim's constructor and an instance of BrainFlowInputParams structure which should hold information for your specific board(e.g. specify serial_port for OpenBCI Cyton, check Supported Boards section for details).
This abstraction allows you to switch boards without any changes in code.
These classes are independent, so if you want, you can use BrainFlow API only for data streaming and perform signal processing by yourself and vice versa.

Since API for all bindings is almost the same we add description for parameters, return values and methods only for Python API.
For other languages we add docs without any description and hints.
BrainFlow API is board agnostic, so to select a specific board you need to pass BrainFlow's board id to BoardShim's constructor and an instance of BrainFlowInputParams structure which should hold information for your specific board, check Supported Boards section for details.
This abstraction allows you to switch boards without any changes in code.

Python API Reference
----------------------
Expand Down Expand Up @@ -46,13 +45,9 @@ brainflow.data\_filter
C++ API Reference
-------------------

Here we describe only high level API, to get information about structures, classes and enums from low level API check Brainflow Core API.

BoardShim class
~~~~~~~~~~~~~~~~

This class communicates with a real board and read/send data from/to it.

.. doxygenclass:: BoardShim
:members:
:project: BrainFlowCpp
Expand All @@ -61,8 +56,6 @@ This class communicates with a real board and read/send data from/to it.
DataFilter class
~~~~~~~~~~~~~~~~~~

Use this for signal processing, all methods change input data in-place.

.. doxygenclass:: DataFilter
:members:
:project: BrainFlowCpp
Expand All @@ -71,8 +64,6 @@ Use this for signal processing, all methods change input data in-place.
BrainFlowException class
~~~~~~~~~~~~~~~~~~~~~~~~~

Exception which is raised if wrong exit code was returned from low level API.

.. doxygenclass:: BrainFlowException
:members:
:project: BrainFlowCpp
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Expand Up @@ -8,7 +8,7 @@ Welcome to BrainFlow's documentation!

BrainFlow is a library intended to obtain, parse and analyze EEG, EMG, ECG and other kinds of data from BCI boards.

It provides uniform API for all supported boards, it means that you can switch boards without any changes in code, also if you add your board to BrainFlow it will work with almost all applications built on top on BrainFlow from the box.
It provides a **uniform API for all supported boards**, it means that you can switch boards without any changes in code, also if you add your board to BrainFlow it will work with almost all applications built on top on BrainFlow from the box. Also there is **powerfull API to perform signal processing** which you can use even without BCI headset.

**There are several forks of BrainFlow, we recommend to use** `original version <https://github.com/Andrey1994/brainflow>`_

Expand Down

0 comments on commit 1723744

Please sign in to comment.