Commit 93de4125 authored by nfoy's avatar nfoy

Merge remote-tracking branch 'origin/wip-jlindgre-merge-gnautilus' into integration-1.2

parents 84b36aa5 3383b7f0
# ---------------------------------
# Finds GNEEDaccessAPI
# Adds library to target
# Adds include path
# ---------------------------------
#IF(OV_ThirdPartyGMobilab)
# MESSAGE(STATUS " NOTE gtec Mobilab has already been found, cannot have gUSBAmp driver in the same executable")
# MESSAGE(STATUS " [ SKIP ] gUSBampCAPI...")
# RETURN()
#ENDIF(OV_ThirdPartyGMobilab)
IF(WIN32)
SET(PATHS_GNEEDaccessAPI "C:/Program Files/gtec/gNEEDaccess Client API/C" "C:/Program Files (x86)/gtec/gNEEDaccess Client API/C")
SET(PATHS_GNEEDaccessLIB "C:/Program Files/gtec/gNEEDaccess Client API/C/win32" "C:/Program Files (x86)/gtec/gNEEDaccess Client API/C/win32")
SET(PATHS_GNEEDaccessServer "C:/Program Files/gtec/gNEEDaccess/" "C:/Program Files (x86)/gtec/gNEEDaccess/")
FIND_PATH(PATH_GNEEDaccessAPI GDSClientAPI.h PATHS
${PATHS_GNEEDaccessAPI}
NO_DEFAULT_PATH)
IF(PATH_GNEEDaccessAPI)
MESSAGE(STATUS " Found gNEEDaccessAPI...")
# Find GDSClientAPI lib and dll
FIND_PATH(PATH_ClientLIB GDSClientAPI.dll PATHS
${PATHS_GNEEDaccessLIB}
NO_DEFAULT_PATH)
FIND_LIBRARY(LIB_GDSClientAPI GDSClientAPI PATHS ${PATHS_GNEEDaccessLIB} NO_DEFAULT_PATH)
IF(LIB_GDSClientAPI)
MESSAGE(STATUS " [ OK ] lib ${LIB_GDSClientAPI}")
ELSE(LIB_GDSClientAPI)
MESSAGE(STATUS " [FAILED] lib GDSClientAPI")
ENDIF(LIB_GDSClientAPI)
# Find GDSServer dll
FIND_PATH(PATH_ServerDLL GDSServer.dll PATHS
${PATHS_GNEEDaccessServer}
NO_DEFAULT_PATH)
IF(PATH_ServerDLL)
MESSAGE(STATUS " [ OK ] dll ${PATH_ServerDLL}")
ELSE(PATH_ServerDLL)
MESSAGE(STATUS " [FAILED] dll GDSServer")
ENDIF(PATH_ServerDLL)
# Find GDSServer lib
FIND_LIBRARY(LIB_GDSServer GDSServer PATHS ${PATHS_GNEEDaccessLIB} NO_DEFAULT_PATH)
IF(LIB_GDSServer)
MESSAGE(STATUS " [ OK ] lib ${LIB_GDSServer}")
ELSE(LIB_GDSServer)
MESSAGE(STATUS " [FAILED] lib GDSServer")
ENDIF(LIB_GDSServer)
# MESSAGE(STATUS "1, ${PATH_ClientLIB} 2, ${LIB_GDSClientAPI} 3, ${PATH_ServerDLL} 4, ${LIB_GDSServer}")
# Only add the compile/install directive if all necessary components were found
IF(PATH_ClientLIB AND LIB_GDSClientAPI AND PATH_ServerDLL AND LIB_GDSServer)
# Copy the DLL file at install
INSTALL(PROGRAMS "${PATH_ClientLIB}/GDSClientAPI.dll" DESTINATION "bin")
INSTALL(PROGRAMS "${PATH_ClientLIB}/gAPI.dll" DESTINATION "bin")
INSTALL(PROGRAMS "${PATH_ClientLIB}/Networking.dll" DESTINATION "bin")
INSTALL(PROGRAMS "${PATH_ServerDLL}/GDSServer.dll" DESTINATION "bin")
INCLUDE_DIRECTORIES(${PATH_GNEEDaccessAPI})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_GDSClientAPI} )
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_GDSServer} )
ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyGNEEDaccessAPI)
SET(OV_ThirdPartyGNEEDaccess "YES")
ENDIF(PATH_ClientLIB AND LIB_GDSClientAPI AND PATH_ServerDLL AND LIB_GDSServer)
ELSE(PATH_GNEEDaccessAPI)
MESSAGE(STATUS " FAILED to find gNEEDaccessAPI (optional)")
ENDIF(PATH_GNEEDaccessAPI)
ENDIF(WIN32)
......@@ -45,6 +45,7 @@ OV_ADD_CONTRIB_DRIVER("${CMAKE_SOURCE_DIR}/contrib/plugins/server-drivers/gtec-g
OV_ADD_CONTRIB_DRIVER("${CMAKE_SOURCE_DIR}/contrib/plugins/server-drivers/gtec-bcilab")
OV_ADD_CONTRIB_DRIVER("${CMAKE_SOURCE_DIR}/contrib/plugins/server-drivers/gtec-gmobilabplus")
OV_ADD_CONTRIB_DRIVER("${CMAKE_SOURCE_DIR}/contrib/plugins/server-drivers/gtec-gusbamp")
OV_ADD_CONTRIB_DRIVER("${CMAKE_SOURCE_DIR}/contrib/plugins/server-drivers/gtec-gnautilus")
OV_ADD_CONTRIB_DRIVER("${CMAKE_SOURCE_DIR}/contrib/plugins/server-drivers/mbt-smarting")
OV_ADD_CONTRIB_DRIVER("${CMAKE_SOURCE_DIR}/contrib/plugins/server-drivers/mitsarEEG202A")
OV_ADD_CONTRIB_DRIVER("${CMAKE_SOURCE_DIR}/contrib/plugins/server-drivers/openal-mono16bit-audiocapture")
......
......@@ -15,6 +15,7 @@
#include "ovasCDriverGTecGUSBampLegacy.h"
#include "ovasCDriverGTecGUSBampLinux.h"
#include "ovasCDriverGTecGMobiLabPlus.h"
#include "ovasCDrivergNautilusInterface.h"
#include "ovasCDriverFieldtrip.h"
#include "ovasCDriverMBTSmarting.h"
#include "ovasCDriverMitsarEEG202A.h"
......@@ -44,6 +45,9 @@ namespace OpenViBEContributions {
#endif
#if defined TARGET_HAS_ThirdPartyGMobiLabPlusAPI
vDriver->push_back(new OpenViBEAcquisitionServer::CDriverGTecGMobiLabPlus(pAcquisitionServer->getDriverContext()));
#endif
#if defined TARGET_HAS_ThirdPartyGNEEDaccessAPI
vDriver->push_back(new OpenViBEAcquisitionServer::CDrivergNautilusInterface(pAcquisitionServer->getDriverContext()));
#endif
vDriver->push_back(new OpenViBEAcquisitionServer::CDriverFieldtrip(pAcquisitionServer->getDriverContext()));
......
# This script is usually run relative to applications/platform/acquisition-server/
INCLUDE("FindThirdPartyBrainmasterCodeMakerAPI")
INCLUDE("FindThirdPartyEemagineEEGO")
INCLUDE("FindThirdPartyGMobiLabPlusAPI")
INCLUDE("FindThirdPartyGUSBampCAPI")
INCLUDE("../../../contrib/cmake-modules/FindThirdPartyGNEEDaccessAPI.cmake")
INCLUDE("FindThirdPartyMitsar")
This source diff could not be displayed because it is too large. You can view the blob instead.
#ifndef __OpenViBE_AcquisitionServer_CConfigurationgNautilusInterface_H__
#define __OpenViBE_AcquisitionServer_CConfigurationgNautilusInterface_H__
#if defined(TARGET_HAS_ThirdPartyGNEEDaccessAPI)
#include "../ovasCConfigurationBuilder.h"
#include "ovasIDriver.h"
#include <gtk/gtk.h>
#include <GDSClientAPI.h>
#include <GDSClientAPI_gNautilus.h>
#include <sstream>
#include <algorithm>
using namespace std;
namespace OpenViBEAcquisitionServer
{
/**
* \class CConfigurationgNautilusInterface
* \author g.tec medical engineering GmbH (g.tec medical engineering GmbH)
* \date Wed Aug 12 16:37:18 2015
* \brief The CConfigurationgNautilusInterface handles the configuration dialog specific to the g.NEEDaccess device.
*
* TODO: details
*
* \sa CDrivergNautilusInterface
*/
class CConfigurationgNautilusInterface : public OpenViBEAcquisitionServer::CConfigurationBuilder
{
public:
// you may have to add to your constructor some reference parameters
// for example, a connection ID:
//CConfigurationgNautilusInterface(OpenViBEAcquisitionServer::IDriverContext& rDriverContext, const char* sGtkBuilderFileName, OpenViBE::uint32& rConnectionId);
CConfigurationgNautilusInterface(OpenViBEAcquisitionServer::IDriverContext& rDriverContext,
const char* sGtkBuilderFileName,
string& rDeviceSerial,
OpenViBE::int32& rInputSource,
OpenViBE::uint32& rNetworkChannel,
OpenViBE::int32& rBandpassFilterIndex,
OpenViBE::int32& rNotchFilterIndex,
OpenViBE::float64& rSensitivity,
OpenViBE::boolean& rDigitalInputEnabled,
OpenViBE::boolean& rNoiseReductionEnabled,
OpenViBE::boolean& rCAREnabled,
OpenViBE::boolean& rAccelerationDataEnabled,
OpenViBE::boolean& rCounterEnabled,
OpenViBE::boolean& rLinkQualityEnabled,
OpenViBE::boolean& rBatteryLevelEnabled,
OpenViBE::boolean& rValidationIndicatorEnabled,
vector<OpenViBE::uint16>& rSelectedChannels,
vector<OpenViBE::uint16>& rBipolarChannels,
vector<OpenViBE::boolean>& rCAR,
vector<OpenViBE::boolean>& rNoiseReduction
);
virtual OpenViBE::boolean preConfigure(void);
virtual OpenViBE::boolean postConfigure(void);
//button callback functions
void buttonChannelSettingsPressedCB(void);
void buttonChannelSettingsApplyPressedCB(void);
void buttonSensitivityFiltersPressedCB(void);
void buttonSensitivityFiltersApplyPressedCB(void);
OpenViBE::boolean getHardwareSettings(void);
OpenViBE::boolean getChannelNames(void);
OpenViBE::boolean getAvailableChannels(void);
OpenViBE::boolean getFiltersForNewSamplingRate(void);
void comboboxSampleRateChangedCB(void);
void checkbuttonNoiseReductionChangedCB(void);
void checkbuttonCARChangedCB(void);
protected:
OpenViBEAcquisitionServer::IDriverContext& m_rDriverContext;
string& m_rDeviceSerial;
OpenViBE::int32& m_rInputSource;
OpenViBE::uint32& m_rNetworkChannel;
OpenViBE::int32& m_rBandpassFilterIndex;
OpenViBE::int32& m_rNotchFilterIndex;
OpenViBE::float64& m_rSensitivity;
OpenViBE::boolean& m_rDigitalInputEnabled;
OpenViBE::boolean& m_rNoiseReductionEnabled;
OpenViBE::boolean& m_rCAREnabled;
OpenViBE::boolean& m_rAccelerationDataEnabled;
OpenViBE::boolean& m_rCounterEnabled;
OpenViBE::boolean& m_rLinkQualityEnabled;
OpenViBE::boolean& m_rBatteryLevelEnabled;
OpenViBE::boolean& m_rValidationIndicatorEnabled;
vector<OpenViBE::uint16>& m_vSelectedChannels;
vector<OpenViBE::uint16>& m_vBipolarChannels;
vector<OpenViBE::boolean>& m_vCAR;
vector<OpenViBE::boolean>& m_vNoiseReduction;
vector<OpenViBE::int32> m_vComboBoxBandpassFilterIndex;
vector<OpenViBE::int32> m_vComboBoxNotchFilterIndex;
vector<OpenViBE::float64> m_vComboBoxSensitivityValues;
vector<OpenViBE::int32> m_vComboBoxInputSources;
vector<OpenViBE::uint32> m_vComboBoxNetworkChannels;
private:
/*
* Insert here all specific attributes, such as a connection ID.
* use references to directly modify the corresponding attribute of the driver
* Example:
*/
// OpenViBE::uint32& m_ui32ConnectionID;
OpenViBE::boolean openDevice(void);
OpenViBE::boolean closeDevice(void);
GDS_HANDLE m_ui64DeviceHandle;
GDS_RESULT m_oGdsResult;
vector<OpenViBE::boolean> m_vAvailableChannels;
char (*m_sDeviceNames)[DEVICE_NAME_LENGTH_MAX];
OpenViBE::boolean m_bConnectionOpen;
};
};
#endif // TARGET_HAS_ThirdPartyGNEEDaccessAPI
#endif // __OpenViBE_AcquisitionServer_CConfigurationgNautilusInterface_H__
#ifndef __OpenViBE_AcquisitionServer_CDrivergNautilusInterface_H__
#define __OpenViBE_AcquisitionServer_CDrivergNautilusInterface_H__
#if defined(TARGET_HAS_ThirdPartyGNEEDaccessAPI)
#include "ovasIDriver.h"
#include "../ovasCHeader.h"
#include <openvibe/ov_all.h>
#include "../ovasCSettingsHelper.h"
#include "../ovasCSettingsHelperOperators.h"
#include <GDSClientAPI.h>
#include <GDSClientAPI_gNautilus.h>
#include <string>
#include <algorithm>
#include <Windows.h>
using namespace std;
namespace OpenViBEAcquisitionServer
{
/**
* \class CDrivergNautilusInterface
* \author g.tec medical engineering GmbH (g.tec medical engineering GmbH)
* \date Wed Aug 12 16:37:18 2015
* \brief The CDrivergNautilusInterface allows the acquisition server to acquire data from a g.NEEDaccess device.
*
* TODO: details
*
* \sa CConfigurationgNautilusInterface
*/
class CDrivergNautilusInterface : public OpenViBEAcquisitionServer::IDriver
{
public:
CDrivergNautilusInterface(OpenViBEAcquisitionServer::IDriverContext& rDriverContext);
virtual ~CDrivergNautilusInterface(void);
virtual const char* getName(void);
virtual OpenViBE::boolean initialize(
const OpenViBE::uint32 ui32SampleCountPerSentBlock,
OpenViBEAcquisitionServer::IDriverCallback& rCallback);
virtual OpenViBE::boolean uninitialize(void);
virtual OpenViBE::boolean start(void);
virtual OpenViBE::boolean stop(void);
virtual OpenViBE::boolean loop(void);
virtual OpenViBE::boolean isConfigurable(void);
virtual OpenViBE::boolean configure(void);
virtual const OpenViBEAcquisitionServer::IHeader* getHeader(void) { return &m_oHeader; }
virtual OpenViBE::boolean isFlagSet(
const OpenViBEAcquisitionServer::EDriverFlag eFlag) const
{
return eFlag==DriverFlag_IsUnstable;
}
protected:
SettingsHelper m_oSettings;
OpenViBEAcquisitionServer::IDriverCallback* m_pCallback;
// Replace this generic Header with any specific header you might have written
OpenViBEAcquisitionServer::CHeader m_oHeader;
OpenViBE::uint32 m_ui32SampleCountPerSentBlock;
OpenViBE::float32* m_pSample;
OpenViBE::uint32 m_ui32DeviceIndex;
OpenViBE::uint32 m_ui32ActualDeviceIndex;
OpenViBE::uint32 m_ui32BufferSize;
OpenViBE::uint32 m_ui32AvailableScans;
OpenViBE::float32* m_pBuffer;
OpenViBE::int32 m_i32NotchFilterIndex;
OpenViBE::int32 m_i32BandPassFilterIndex;
OpenViBE::float64 m_f64Sensitivity;
OpenViBE::int32 m_i32InputSource;
OpenViBE::uint32 m_ui32NetworkChannel;
OpenViBE::boolean m_bDigitalInputEnabled;
OpenViBE::boolean m_bNoiseReductionEnabled;
OpenViBE::boolean m_bCAREnabled;
OpenViBE::boolean m_bAccelerationDataEnabled;
OpenViBE::boolean m_bCounterEnabled;
OpenViBE::boolean m_bLinkQualityEnabled;
OpenViBE::boolean m_bBatteryLevelEnabled;
OpenViBE::boolean m_bValidationIndicatorEnabled;
vector<OpenViBE::uint16> m_vSelectedChannels;
vector<OpenViBE::uint16> m_vBipolarChannels;
vector<OpenViBE::boolean> m_vNoiseReduction;
vector<OpenViBE::boolean> m_vCAR;
OpenViBE::uint32 m_ui32AcquiredChannelCount;
GDS_HANDLE m_pDevice;
GDS_RESULT m_oGdsResult;
GDS_GNAUTILUS_CONFIGURATION m_oNautilusDeviceCfg;
std::string m_sDeviceSerial;
OpenViBE::uint32 m_ui32DeviceCount;
private:
/*
* Insert here all specific attributes, such as USB port number or device ID.
* Example :
*/
// OpenViBE::uint32 m_ui32ConnectionID;
};
};
#endif // TARGET_HAS_ThirdPartyGNEEDaccessAPI
#endif // __OpenViBE_AcquisitionServer_CDrivergNautilusInterface_H__
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment