Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] BrainAlive Device Integration #171

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build/make/Engine.mk
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ OBJS = Core/AABB.o \
Devices/Neurosity/CrownDevice.o \
Devices/NeuroSky/NeuroSkyDevice.o \
Devices/OpenBCI/OpenBCIDevices.o \
Devices/BrainAlive/BrainAliveDevices.o \
Devices/BrainAlive/BrainAliveNodes.o \
Devices/Test/TestDevice.o \
Devices/Test/TestDeviceDriver.o \
Devices/Versus/VersusDevice.o \
Expand Down
6 changes: 6 additions & 0 deletions build/make/Studio.mk
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ MOCH = Devices/Bluetooth/BluetoothDevice.cpp \
Devices/NeuroSky/NeuroSkySerialHandler.cpp \
Devices/OpenBCI/OpenBCIDriver.cpp \
Devices/OpenBCI/OpenBCISerialHandler.cpp \
Devices/BrainAlive/BrainAliveDriver.cpp \
Devices/BrainAlive/BrainAliveSerialHandler.cpp \
Devices/BrainAlive/BrainAliveBluetooth.cpp \
Devices/Versus/VersusDriver.cpp \
Devices/Versus/VersusSerialHandler.cpp \
Plugins/ABM/ABMPlugin.cpp \
Expand Down Expand Up @@ -242,6 +245,9 @@ OBJS = Devices/ABM/AbmDriver.o \
Devices/NeuroSky/NeuroSkySerialHandler.o \
Devices/OpenBCI/OpenBCIDriver.o \
Devices/OpenBCI/OpenBCISerialHandler.o \
Devices/BrainAlive/BrainAliveDriver.o \
Devices/BrainAlive/BrainAliveSerialHandler.o \
Devices/BrainAlive/BrainAliveBluetooth.o \
Devices/Versus/VersusDriver.o \
Devices/Versus/VersusSerialHandler.o \
Devices/DeviceHelpers.o \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
5 changes: 5 additions & 0 deletions build/vs/Engine.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,16 @@
<ClInclude Include="..\..\src\Engine\Core\Version.h" />
<ClCompile Include="..\..\src\Engine\Creud.cpp" />
<ClInclude Include="..\..\src\Engine\Creud.h" />
<ClCompile Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveDevices.cpp" />
<ClCompile Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveNodes.cpp" />
<ClCompile Include="..\..\src\Engine\Devices\BrainFlow\BrainFlowDevices.cpp" />
<ClCompile Include="..\..\src\Engine\Devices\BrainFlow\BrainFlowNodes.cpp" />
<ClCompile Include="..\..\src\Engine\Devices\BrainMaster\BrainMasterDevices.cpp" />
<ClCompile Include="..\..\src\Engine\Devices\eemagine\eemagineDevices.cpp" />
<ClCompile Include="..\..\src\Engine\DSP\AttributeChannels.cpp" />
<ClInclude Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveConstant.h" />
<ClInclude Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveDevices.h" />
<ClInclude Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveNodes.h" />
<ClInclude Include="..\..\src\Engine\Devices\BrainFlow\BrainFlowDevices.h" />
<ClInclude Include="..\..\src\Engine\Devices\BrainFlow\BrainFlowNodes.h" />
<ClInclude Include="..\..\src\Engine\Devices\BrainMaster\BrainMasterDevices.h" />
Expand Down
18 changes: 18 additions & 0 deletions build/vs/Engine.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,12 @@
<Filter>Devices\BrainMaster</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Engine\Precompiled.cpp" />
<ClCompile Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveDevices.cpp">
<Filter>Devices\BrainAlive</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveNodes.cpp">
<Filter>Devices\BrainAlive</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\Engine\Core\AABB.h">
Expand Down Expand Up @@ -1255,6 +1261,15 @@
<Filter>Devices\BrainMaster</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Engine\Precompiled.h" />
<ClInclude Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveConstant.h">
<Filter>Devices\BrainAlive</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveDevices.h">
<Filter>Devices\BrainAlive</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Engine\Devices\BrainAlive\BrainAliveNodes.h">
<Filter>Devices\BrainAlive</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Core">
Expand Down Expand Up @@ -1332,6 +1347,9 @@
<Filter Include="Devices\BrainMaster">
<UniqueIdentifier>{dff5d1c2-5460-4d5f-893c-d66f7671b140}</UniqueIdentifier>
</Filter>
<Filter Include="Devices\BrainAlive">
<UniqueIdentifier>{ef2eefb7-611a-4fa6-aa5a-7c3072b89559}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\Engine\Proprietary\README.md">
Expand Down
3 changes: 3 additions & 0 deletions build/vs/Studio.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ set VAR=--no-notes -DWIN32 -D_WINDOWS -DNEUROMORE_PLATFORM_WINDOWS -DHAVE_CONFIG
%MOC% %INC% %VAR% %DIR%/Devices/NeuroSky/NeuroSkySerialHandler.h -b %PCH% -o %DIR%/Devices/NeuroSky/NeuroSkySerialHandler.moc.cpp
%MOC% %INC% %VAR% %DIR%/Devices/OpenBCI/OpenBCIDriver.h -b %PCH% -o %DIR%/Devices/OpenBCI/OpenBCIDriver.moc.cpp
%MOC% %INC% %VAR% %DIR%/Devices/OpenBCI/OpenBCISerialHandler.h -b %PCH% -o %DIR%/Devices/OpenBCI/OpenBCISerialHandler.moc.cpp
%MOC% %INC% %VAR% %DIR%/Devices/BrainAlive/BrainAliveDriver.h -b %PCH% -o %DIR%/Devices/BrainAlive/BrainAliveDriver.moc.cpp
%MOC% %INC% %VAR% %DIR%/Devices/BrainAlive/BrainAliveSerialHandler.h -b %PCH% -o %DIR%/Devices/BrainAlive/BrainAliveSerialHandler.moc.cpp
%MOC% %INC% %VAR% %DIR%/Devices/BrainAlive/BrainAliveBluetooth.h -b %PCH% -o %DIR%/Devices/BrainAlive/BrainAliveBluetooth.moc.cpp
%MOC% %INC% %VAR% %DIR%/Devices/Versus/VersusDriver.h -b %PCH% -o %DIR%/Devices/Versus/VersusDriver.moc.cpp
%MOC% %INC% %VAR% %DIR%/Devices/Versus/VersusSerialHandler.h -b %PCH% -o %DIR%/Devices/Versus/VersusSerialHandler.moc.cpp

Expand Down
27 changes: 27 additions & 0 deletions build/vs/Studio.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,29 @@
<ClCompile Include="..\..\src\Studio\Devices\Bluetooth\BluetoothDriver.moc.cpp" />
<ClCompile Include="..\..\src\Studio\Devices\Bluetooth\BluetoothService.cpp" />
<ClCompile Include="..\..\src\Studio\Devices\Bluetooth\BluetoothService.moc.cpp" />
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveBluetooth.cpp" />
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveBluetooth.moc.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production-ANT|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production-ANT|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveDriver.cpp" />
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveDriver.moc.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production-ANT|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production-ANT|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveSerialHandler.cpp" />
<ClCompile Include="..\..\src\Studio\Devices\BrainFlow\BrainFlowDriver.cpp" />
<ClCompile Include="..\..\src\Studio\Devices\BrainMaster\BrainMasterDriver.cpp" />
<ClCompile Include="..\..\src\Studio\Devices\BrainMaster\Discovery20.cpp" />
Expand Down Expand Up @@ -411,6 +434,10 @@
<ClInclude Include="..\..\src\Studio\Devices\Bluetooth\BluetoothDevice.h" />
<ClInclude Include="..\..\src\Studio\Devices\Bluetooth\BluetoothDriver.h" />
<ClInclude Include="..\..\src\Studio\Devices\Bluetooth\BluetoothService.h" />
<ClInclude Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveBluetooth.h" />
<ClInclude Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveCommands.h" />
<ClInclude Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveDriver.h" />
<ClInclude Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveSerialHandler.h" />
<ClInclude Include="..\..\src\Studio\Devices\BrainFlow\BrainFlowDriver.h" />
<ClInclude Include="..\..\src\Studio\Devices\BrainMaster\BrainMasterDriver.h" />
<ClInclude Include="..\..\src\Studio\Devices\BrainMaster\Discovery20.h" />
Expand Down
30 changes: 30 additions & 0 deletions build/vs/Studio.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@
<Filter Include="Devices\BrainMaster">
<UniqueIdentifier>{4fe9b200-c172-45b0-98da-aa7e3e34ae5d}</UniqueIdentifier>
</Filter>
<Filter Include="Devices\BrainAlive">
<UniqueIdentifier>{ea678dc3-e306-4a6b-a86b-86cb5d2f1ddf}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\Studio\Devices\DeviceHelpers.cpp">
Expand Down Expand Up @@ -827,6 +830,21 @@
<Filter>Devices\BrainMaster</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Studio\Precompiled.cpp" />
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveBluetooth.cpp">
<Filter>Devices\BrainAlive</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveDriver.cpp">
<Filter>Devices\BrainAlive</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveSerialHandler.cpp">
<Filter>Devices\BrainAlive</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveBluetooth.moc.cpp">
<Filter>Devices\BrainAlive</Filter>
</ClCompile>
<ClCompile Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveDriver.moc.cpp">
<Filter>Devices\BrainAlive</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\Studio\Devices\DeviceHelpers.h">
Expand Down Expand Up @@ -1217,6 +1235,18 @@
<Filter>Devices\BrainMaster</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Studio\Precompiled.h" />
<ClInclude Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveBluetooth.h">
<Filter>Devices\BrainAlive</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveCommands.h">
<Filter>Devices\BrainAlive</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveDriver.h">
<Filter>Devices\BrainAlive</Filter>
</ClInclude>
<ClInclude Include="..\..\src\Studio\Devices\BrainAlive\BrainAliveSerialHandler.h">
<Filter>Devices\BrainAlive</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\Studio\Resources\AppIcon.icns">
Expand Down
1 change: 1 addition & 0 deletions src/Engine/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#define INCLUDE_DEVICE_ESENSESKINRESPONSE
#define INCLUDE_DEVICE_NEUROSITY_NOTION
#define INCLUDE_DEVICE_BRAINFLOW
//#define INCLUDE_DEVICE_BRAINALIVE
#if defined(NEUROMORE_PLATFORM_WINDOWS)
#define INCLUDE_DEVICE_EEMAGINE
#define INCLUDE_DEVICE_MITSAR
Expand Down
48 changes: 48 additions & 0 deletions src/Engine/Devices/BrainAlive/BrainAliveConstant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/****************************************************************************
**
** Copyright 2019 neuromore co
** Contact: https://neuromore.com/contact
**
** Commercial License Usage
** Licensees holding valid commercial neuromore licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and neuromore. For licensing terms
** and conditions see https://neuromore.com/licensing. For further
** information use the contact form at https://neuromore.com/contact.
**
** neuromore Public License Usage
** Alternatively, this file may be used under the terms of the neuromore
** Public License version 1 as published by neuromore co with exceptions as
** appearing in the file neuromore-class-exception.md included in the
** packaging of this file. Please review the following information to
** ensure the neuromore Public License requirements will be met:
** https://neuromore.com/npl
**
****************************************************************************/

#pragma once
#include <string>
#include <tuple>

struct BrainAliveInputParams {
Core::String channel_1;
Core::String channel_2;
Core::String channel_3;
Core::String channel_4;
Core::String channel_5;
Core::String channel_6;
Core::String channel_7;
Core::String channel_8;

BrainAliveInputParams() {
channel_1 = "F7";
channel_2 = "FT7";
channel_3 = "T7";
channel_4 = "TP7";
channel_5 = "Cz";
channel_6 = "C4";
channel_7 = "FC4";
channel_8 = "F4";
}
};
Loading