diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cf25ac6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+CMakeLists.txt.user*
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..6f508ef
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,49 @@
+cmake_minimum_required(VERSION 3.5)
+project(eegoSports
+ LANGUAGES CXX
+ VERSION 0.1.0)
+add_compile_options(-std=c++17)
+# set up LSL if not done already
+if(NOT TARGET LSL::lsl)
+ # when building out of tree LSL_ROOT needs to be specified on the cmd line
+ file(TO_CMAKE_PATH "${LSL_INSTALL_ROOT}" LSL_INSTALL_ROOT)
+ list(APPEND LSL_INSTALL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../LSL/liblsl/build/install")
+ find_package(LSL HINTS ${LSL_INSTALL_ROOT}/share/LSL/ ${LSL_INSTALL_ROOT}/LSL/share/LSL QUIET)
+ if(NOT LSL_FOUND)
+ message(FATAL_ERROR "Precompiled LSL was not found. Set LSL_INSTALL_ROOT to the LSL installation path ( cmake -DLSL_INSTALL_ROOT=/path/to/installed/lsl)")
+ endif()
+ list(APPEND CMAKE_MODULE_PATH ${LSL_DIR})
+ message(STATUS "Looking for LSLCMake in ${LSL_DIR}")
+ include(LSLCMake)
+endif()
+
+find_package(Qt5 REQUIRED COMPONENTS Widgets Network Charts)
+find_package(Boost REQUIRED)
+include_directories(eemagine/sdk ${LSL_INSTALL_ROOT}/include)
+link_directories(${EEMAGINE_SDK_DIR})
+
+add_executable(${PROJECT_NAME} MACOSX_BUNDLE
+ #eemagine/sdk/wrapper.cc
+ main.cpp
+ mainwindow.cpp
+ mainwindow.h
+ mainwindow.ui
+
+)
+target_link_libraries(${PROJECT_NAME}
+ PRIVATE
+ Qt5::Widgets
+ Qt5::Network
+ Qt5::Charts
+ LSL::lsl
+ ${Boost_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ eego-SDK
+)
+
+
+
+installLSLApp(${PROJECT_NAME})
+
+LSLGenerateCPackConfig()
+
diff --git a/eegoSports.sln b/eegoSports.sln
deleted file mode 100644
index 70b7c72..0000000
--- a/eegoSports.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eegoSports", "eegoSports.vcproj", "{8D9A8AE1-87C9-3AA9-886C-3F4EA93CDCB3}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {8D9A8AE1-87C9-3AA9-886C-3F4EA93CDCB3}.Debug|Win32.ActiveCfg = Debug|Win32
- {8D9A8AE1-87C9-3AA9-886C-3F4EA93CDCB3}.Debug|Win32.Build.0 = Debug|Win32
- {8D9A8AE1-87C9-3AA9-886C-3F4EA93CDCB3}.Debug|x64.ActiveCfg = Debug|Win32
- {8D9A8AE1-87C9-3AA9-886C-3F4EA93CDCB3}.Debug|x64.Build.0 = Debug|Win32
- {8D9A8AE1-87C9-3AA9-886C-3F4EA93CDCB3}.Release|Win32.ActiveCfg = Release|Win32
- {8D9A8AE1-87C9-3AA9-886C-3F4EA93CDCB3}.Release|Win32.Build.0 = Release|Win32
- {8D9A8AE1-87C9-3AA9-886C-3F4EA93CDCB3}.Release|x64.ActiveCfg = Release|Win32
- {8D9A8AE1-87C9-3AA9-886C-3F4EA93CDCB3}.Release|x64.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/eegoSports.vcproj b/eegoSports.vcproj
deleted file mode 100644
index 0a2bd7e..0000000
--- a/eegoSports.vcproj
+++ /dev/null
@@ -1,319 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eemagine/sdk/amplifier.h b/eemagine/sdk/amplifier.h
index c76a092..7c2cc63 100644
--- a/eemagine/sdk/amplifier.h
+++ b/eemagine/sdk/amplifier.h
@@ -32,9 +32,9 @@
#include
#include
// eemagine
-#include
-#include
-#include
+#include
+#include
+#include
namespace eemagine {
namespace sdk {
diff --git a/eemagine/sdk/buffer.h b/eemagine/sdk/buffer.h
index bc78c19..dbfb7c5 100644
--- a/eemagine/sdk/buffer.h
+++ b/eemagine/sdk/buffer.h
@@ -1,102 +1,100 @@
-/*
- * License: eego amplifier Interface SDK, rev. 1.3
- *
- *
- * Copyright 2015, eemagine Medical Imaging Solutions GmbH
- *
- *
- * 1. Redistributions of source code must retain the copyright notice this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- *
- * 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the eemagine Medical Imaging Solutions GmbH.
- *
- * 4. Neither the name of the eemagine Medical Imaging Solutions GmbH nor the names of its contributors or products may be used to endorse or promote products derived from this software without specific prior written permission by eemagine
- *
- *
- * This Software is provided by eemagine Medical Imaging Solutions GmbH ''As Is'' and any express or implied warranties, including, but not limited to, the implied warranties merchantability and fitness for a particular purpose are disclaimed. In no event shall eemagine be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including but not limited to, procurement of substitute goods or services, loss of use, data, or profits, or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
- *
- * The eego amplifier comes with its own user manual, which must be read carefully before making use of this SDK or any derived software.
- *
- *
- * You need to run full testing and qualification based on your own requirements to claim any performance of the combined system.
- *
- *
- * Please be especially advised that any certification holding for the eego amplifier is not valid for a combined system of your application software and the eego amplifier. You must obtain your own certification for a combined system of amplifier and software.
- */
-
-#ifndef __eemagine_sdk_buffer_h__
-#define __eemagine_sdk_buffer_h__
-
-// system
-#include
-#include
-// eemagine
-#include
-
-namespace eemagine {
- namespace sdk {
- /// Wrapper around array to provide indexed access to values
- class buffer {
- public:
- /**
- * \brief default constructor
- */
- buffer(unsigned int channel_count = 0, unsigned int sample_count = 0)
- : _data(channel_count * sample_count)
- , _channel_count(channel_count)
- , _sample_count(sample_count)
- {
- }
- /**
- * \brief get the number of channels
- * @return number of channels
- */
- const unsigned int& getChannelCount() const
- {
- return _channel_count;
- }
-
- /**
- * \brief get the number of samples
- * @return number of samples
- */
- const unsigned int& getSampleCount() const
- {
- return _sample_count;
- }
- /**
- * \brief get sample value
- * @param channel the channel index(start indexing at zero)
- * @param sample the sample index(start indexing at zero)
- * @return returns that value for channel at sample
- */
- const double& getSample(unsigned int channel, unsigned int sample) const
- {
- if (channel >= _channel_count || sample >= _sample_count) {
- throw(eemagine::sdk::exceptions::incorrectValue("invalid getSample index"));
- }
- return _data[channel + sample * _channel_count];
- }
- /**
- * \brief get number of samples
- * @return number of samples
- */
- size_t size() const { return _data.size(); }
- /**
- * \brief direct pointer to data
- */
- double * data() {
- //return &_data.front(); //this might fail and is a pre-C++11 hack for _data.data()
- //return _data.data();
- return &(_data[0]);
- }
- protected:
- std::vector < double > _data;
- unsigned int _channel_count;
- unsigned int _sample_count;
- };
- }
-}
-
-#endif
+/*
+ * License: eego amplifier Interface SDK, rev. 1.3
+ *
+ *
+ * Copyright 2015, eemagine Medical Imaging Solutions GmbH
+ *
+ *
+ * 1. Redistributions of source code must retain the copyright notice this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the eemagine Medical Imaging Solutions GmbH.
+ *
+ * 4. Neither the name of the eemagine Medical Imaging Solutions GmbH nor the names of its contributors or products may be used to endorse or promote products derived from this software without specific prior written permission by eemagine
+ *
+ *
+ * This Software is provided by eemagine Medical Imaging Solutions GmbH ''As Is'' and any express or implied warranties, including, but not limited to, the implied warranties merchantability and fitness for a particular purpose are disclaimed. In no event shall eemagine be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including but not limited to, procurement of substitute goods or services, loss of use, data, or profits, or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
+ *
+ * The eego amplifier comes with its own user manual, which must be read carefully before making use of this SDK or any derived software.
+ *
+ *
+ * You need to run full testing and qualification based on your own requirements to claim any performance of the combined system.
+ *
+ *
+ * Please be especially advised that any certification holding for the eego amplifier is not valid for a combined system of your application software and the eego amplifier. You must obtain your own certification for a combined system of amplifier and software.
+ */
+
+#ifndef __eemagine_sdk_buffer_h__
+#define __eemagine_sdk_buffer_h__
+
+// system
+#include
+#include
+// eemagine
+#include
+
+namespace eemagine {
+ namespace sdk {
+ /// Wrapper around array to provide indexed access to values
+ class buffer {
+ public:
+ /**
+ * \brief default constructor
+ */
+ buffer(unsigned int channel_count = 0, unsigned int sample_count = 0)
+ : _data(channel_count * sample_count)
+ , _channel_count(channel_count)
+ , _sample_count(sample_count)
+ {
+ }
+ /**
+ * \brief get the number of channels
+ * @return number of channels
+ */
+ const unsigned int& getChannelCount() const
+ {
+ return _channel_count;
+ }
+
+ /**
+ * \brief get the number of samples
+ * @return number of samples
+ */
+ const unsigned int& getSampleCount() const
+ {
+ return _sample_count;
+ }
+ /**
+ * \brief get sample value
+ * @param channel the channel index(start indexing at zero)
+ * @param sample the sample index(start indexing at zero)
+ * @return returns that value for channel at sample
+ */
+ const double& getSample(unsigned int channel, unsigned int sample) const
+ {
+ if (channel >= _channel_count || sample >= _sample_count) {
+ throw(eemagine::sdk::exceptions::incorrectValue("invalid getSample index"));
+ }
+ return _data[channel + sample * _channel_count];
+ }
+ /**
+ * \brief get number of samples
+ * @return number of samples
+ */
+ size_t size() const { return _data.size(); }
+ /**
+ * \brief direct pointer to data
+ */
+ double * data() {
+ return _data.data();
+ }
+ protected:
+ std::vector < double > _data;
+ unsigned int _channel_count;
+ unsigned int _sample_count;
+ };
+ }
+}
+
+#endif
diff --git a/eemagine/sdk/channel.h b/eemagine/sdk/channel.h
index e903466..9395e10 100644
--- a/eemagine/sdk/channel.h
+++ b/eemagine/sdk/channel.h
@@ -38,7 +38,7 @@ namespace eemagine {
/**
* type of channel
*/
- enum channel_type { none, reference, bipolar, trigger, sample_counter, impedance_reference, impedance_ground };
+ enum channel_type { none, reference, bipolar, trigger, sample_counter, impedance_reference, impedance_ground, accelerometer, gyroscope, magnetometer };
/**
* \brief default constructor
@@ -67,9 +67,7 @@ namespace eemagine {
// conversion for writing the channel into an ostream.
inline
std::ostream &
-operator<<(std::ostream &out, const eemagine::sdk::channel &c)
-{
-
+operator<<(std::ostream &out, const eemagine::sdk::channel &c) {
out << "channel(";
out << c.getIndex();
out << ", ";
@@ -92,6 +90,18 @@ operator<<(std::ostream &out, const eemagine::sdk::channel &c)
case eemagine::sdk::channel::impedance_ground:
out << "impedance_ground";
break;
+ case eemagine::sdk::channel::accelerometer:
+ out << "accel";
+ break;
+ case eemagine::sdk::channel::gyroscope:
+ out << "gyro";
+ break;
+ case eemagine::sdk::channel::magnetometer:
+ out << "magneto";
+ break;
+ default:
+ out << "?";
+ break;
}
out << ")";
diff --git a/eemagine/sdk/factory.h b/eemagine/sdk/factory.h
index 0752d5e..df0c3ba 100644
--- a/eemagine/sdk/factory.h
+++ b/eemagine/sdk/factory.h
@@ -31,7 +31,7 @@
// system
#include
// eemagine
-#include
+#include
// It has to be either dynamic or static
#if !(defined(EEGO_SDK_BIND_DYNAMIC) ^ defined(EEGO_SDK_BIND_STATIC))
@@ -56,12 +56,12 @@ namespace eemagine {
* constructor
*/
#ifdef EEGO_SDK_BIND_STATIC
- factory();
+ factory(void * data = NULL);
#else
-#ifdef WIN32
- factory(const std::wstring& path);
+#ifdef _WIN32
+ factory(const std::wstring& path, void * data = NULL);
#endif
- factory(const std::string& path);
+ factory(const std::string& path, void * data = NULL);
#endif // EEGO_SDK_BIND_STATIC
/**
diff --git a/eemagine/sdk/stream.h b/eemagine/sdk/stream.h
index 6541517..72a2a7c 100644
--- a/eemagine/sdk/stream.h
+++ b/eemagine/sdk/stream.h
@@ -32,9 +32,9 @@
#include
#include
// eemagine
-#include
-#include
-#include
+#include
+#include
+#include
namespace eemagine {
namespace sdk {
diff --git a/eemagine/sdk/version.h b/eemagine/sdk/version.h
index 7ef121c..580e6b4 100644
--- a/eemagine/sdk/version.h
+++ b/eemagine/sdk/version.h
@@ -1,9 +1,9 @@
-#ifndef __eemagine_sdk_version_h__
-#define __eemagine_sdk_version_h__
-
-#define EEGO_SDK_VERSION_MAJOR 1
-#define EEGO_SDK_VERSION_MINOR 3
-#define EEGO_SDK_VERSION_MICRO 4
-#define EEGO_SDK_VERSION 31165
-
-#endif
+#ifndef __eemagine_sdk_version_h__
+#define __eemagine_sdk_version_h__
+
+#define EEGO_SDK_VERSION_MAJOR 1
+#define EEGO_SDK_VERSION_MINOR 3
+#define EEGO_SDK_VERSION_MICRO 19
+#define EEGO_SDK_VERSION 40453
+
+#endif
diff --git a/eemagine/sdk/wrapper.cc b/eemagine/sdk/wrapper.cc
index 804ac3d..4efa6ba 100644
--- a/eemagine/sdk/wrapper.cc
+++ b/eemagine/sdk/wrapper.cc
@@ -1,795 +1,850 @@
-/*
- * License: eego amplifier Interface SDK, rev. 1.3
- *
- *
- * Copyright 2015, eemagine Medical Imaging Solutions GmbH
- *
- *
- * 1. Redistributions of source code must retain the copyright notice this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- *
- * 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the eemagine Medical Imaging Solutions GmbH.
- *
- * 4. Neither the name of the eemagine Medical Imaging Solutions GmbH nor the names of its contributors or products may be used to endorse or promote products derived from this software without specific prior written permission by eemagine
- *
- *
- * This Software is provided by eemagine Medical Imaging Solutions GmbH ''As Is'' and any express or implied warranties, including, but not limited to, the implied warranties merchantability and fitness for a particular purpose are disclaimed. In no event shall eemagine be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including but not limited to, procurement of substitute goods or services, loss of use, data, or profits, or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
- *
- * The eego amplifier comes with its own user manual, which must be read carefully before making use of this SDK or any derived software.
- *
- *
- * You need to run full testing and qualification based on your own requirements to claim any performance of the combined system.
- *
- *
- * Please be especially advised that any certification holding for the eego amplifier is not valid for a combined system of your application software and the eego amplifier. You must obtain your own certification for a combined system of amplifier and software.
- */
-
-// system
-#pragma warning(disable: 4996)
-#include
-#include
-#include