diff --git a/contrib/cmake-modules/CMakeLists.txt b/contrib/cmake-modules/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..139597f9cb07c5d48bed18984ec4747f4b4f3438 --- /dev/null +++ b/contrib/cmake-modules/CMakeLists.txt @@ -0,0 +1,2 @@ + + diff --git a/contrib/cmake-modules/FindThirdPartyGNEEDaccessAPI.cmake b/contrib/cmake-modules/FindThirdPartyGNEEDaccessAPI.cmake new file mode 100644 index 0000000000000000000000000000000000000000..9e7d830a2068785f1fb61c7fef478a3840e390e9 --- /dev/null +++ b/contrib/cmake-modules/FindThirdPartyGNEEDaccessAPI.cmake @@ -0,0 +1,66 @@ +# --------------------------------- +# 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) + FIND_PATH(PATH_GNEEDaccessAPI GDSClientAPI.h PATHS + "C:/Program Files/gtec/gNEEDaccess Client API/C" + "C:/Program Files (x86)/gtec/gNEEDaccess Client API/C" + "C:/Program Files/gtec/gNEEDaccess Client API/C/win32" + "C:/Program Files (x86)/gtec/gNEEDaccess Client API/C/win32" + ${OV_CUSTOM_DEPENDENCIES_PATH}) + IF(PATH_GNEEDaccessAPI) + MESSAGE(STATUS " Found gNEEDaccessAPI...") + INCLUDE_DIRECTORIES(${PATH_GNEEDaccessAPI}) + FIND_PATH(PATH_ClientAPI GDSClientAPI.lib PATHS + "C:/Program Files (x86)/gtec/gNEEDaccess Client API/C/win32" + "C:/Program Files/gtec/gNEEDaccess Client API/C/win32" + ) + IF(PATH_ClientAPI) + FIND_LIBRARY(LIB_GDSClientAPI GDSClientAPI PATHS ${PATH_ClientAPI}) + MESSAGE(STATUS "${LIB_GDSClientAPI}") + IF(LIB_GDSClientAPI) + MESSAGE(STATUS " [ OK ] lib ${LIB_GDSClientAPI}") + TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_GDSClientAPI} ) + ELSE(LIB_GDSClientAPI) + MESSAGE(STATUS " [FAILED] lib GDSClientAPI") + ENDIF(LIB_GDSClientAPI) + ENDIF(PATH_ClientAPI) + + FIND_PATH(PATH_ServerLIB GDSServer.lib PATHS + "C:/Program Files (x86)/gtec/gNEEDaccess Client API/C/win32" + "C:/Program Files/gtec/gNEEDaccess Client API/C/win32" + ) + IF(PATH_ServerLIB) + # Find GDSServer lib and dll + FIND_LIBRARY(LIB_GDSServer GDSServer PATHS ${PATH_ServerLIB}) + IF(LIB_GDSServer) + MESSAGE(STATUS " [ OK ] lib ${LIB_GDSServer}") + TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_GDSServer} ) + ELSE(LIB_GDSServer) + MESSAGE(STATUS " [FAILED] lib GDSServer") + ENDIF(LIB_GDSServer) + ENDIF(PATH_ServerLIB) + + # Copy the DLL file at install + INSTALL(PROGRAMS "${PATH_ClientAPI}/GDSClientAPI.dll" DESTINATION "bin") + INSTALL(PROGRAMS "${PATH_ClientAPI}/gAPI.dll" DESTINATION "bin") + INSTALL(PROGRAMS "${PATH_ClientAPI}/Networking.dll" DESTINATION "bin") + INSTALL(PROGRAMS "${PATH_ServerLIB}/GDSServer.dll" DESTINATION "bin") + + ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyGNEEDaccessAPI) + SET(OV_ThirdPartyGNEEDaccess "YES") + + ELSE(PATH_GNEEDaccessAPI) + MESSAGE(STATUS " FAILED to find gNEEDaccessAPI (optional)") + ENDIF(PATH_GNEEDaccessAPI) +ENDIF(WIN32) + diff --git a/contrib/common/contribAcquisitionServer.cmake b/contrib/common/contribAcquisitionServer.cmake index 11ec55c1871567daaea931da91bd53ba365337aa..04d2f6bbd76945d45672c8d5988c2e347ed54567 100644 --- a/contrib/common/contribAcquisitionServer.cmake +++ b/contrib/common/contribAcquisitionServer.cmake @@ -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") diff --git a/contrib/common/contribAcquisitionServer.inl b/contrib/common/contribAcquisitionServer.inl index 925c27d847b0b89d801940f113bda695fb489081..4cc6ef8c635c66fa44bee21f697adaa6f0d3dd26 100644 --- a/contrib/common/contribAcquisitionServer.inl +++ b/contrib/common/contribAcquisitionServer.inl @@ -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())); diff --git a/contrib/common/contribAcquisitionServerLinkLibs.cmake b/contrib/common/contribAcquisitionServerLinkLibs.cmake index 48ed9d721da8647abb5eb41b7ed5412302628752..8ab5b8d3e05c45cc49801147a7e86fedce25c2ec 100644 --- a/contrib/common/contribAcquisitionServerLinkLibs.cmake +++ b/contrib/common/contribAcquisitionServerLinkLibs.cmake @@ -1,6 +1,9 @@ +# 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") diff --git a/contrib/plugins/server-drivers/gtec-gnautilus/share/interface-gNautilusInterface.ui b/contrib/plugins/server-drivers/gtec-gnautilus/share/interface-gNautilusInterface.ui new file mode 100644 index 0000000000000000000000000000000000000000..d60272682a36f085bf179b700bbcd76562674ec2 --- /dev/null +++ b/contrib/plugins/server-drivers/gtec-gnautilus/share/interface-gNautilusInterface.ui @@ -0,0 +1,3656 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <requires lib="gtk+" version="2.22"/> + <!-- interface-naming-policy project-wide --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="upper">100</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment2"> + <property name="upper">100</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment3"> + <property name="upper">64</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkListStore" id="liststore1"> + <columns> + <!-- column-name sensitivity --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkListStore" id="liststore2"> + <columns> + <!-- column-name filter --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkListStore" id="liststore3"> + <columns> + <!-- column-name filter --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkDialog" id="dialog_sensitivity_filters"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkVBox" id="dialog-vbox4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkHButtonBox" id="dialog-action_area4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="button_select_sensitivity_filters_apply"> + <property name="label">gtk-apply</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="button_select_sensitivity_filters_cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_title_sensitivity_filters"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Select sensitivity and filter settings for all EEG channels</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_title_sensitvity_filters"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel" id="label_select_sensitivity"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Sensitivity [mV] :</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_select_sensitivity"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore1</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext5"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_select_sensitivity"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel" id="label_select_bandpass_filter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Bandpass filter :</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_select_bandpass_filter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore2</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext6"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_select_bandpass_filter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel" id="label_select_notch_filter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Notch filter :</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_select_notch_filter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore3</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext7"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_select_notch_filter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">8</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">button_select_sensitivity_filters_apply</action-widget> + <action-widget response="0">button_select_sensitivity_filters_cancel</action-widget> + </action-widgets> + </object> + <object class="GtkListStore" id="liststore4"> + <columns> + <!-- column-name bipolar --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkDialog" id="dialog_select_channels_bipolar_car_noise"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="resizable">False</property> + <property name="modal">True</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkVBox" id="dialog-vbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkHButtonBox" id="dialog-action_area2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="button_channel_apply"> + <property name="label">gtk-apply</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="button_channel_cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channels_bipolar_car_noise"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Select acquired channels and channels for bipolar, CAR and noise reduction</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_channels_title"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkTable" id="table1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="n_rows">3</property> + <property name="n_columns">7</property> + <child> + <object class="GtkLabel" id="label_acquire_channel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Channel</property> + </object> + </child> + <child> + <object class="GtkLabel" id="label_bipolar_channel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Bipolar channel</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_select_car"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">CAR</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_select_noise"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Noise reduction</property> + </object> + <packing> + <property name="left_attach">6</property> + <property name="right_attach">7</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkHBox" id="hbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_1"> + <property name="label" translatable="yes">FP1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_2"> + <property name="label" translatable="yes">FP2</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_3"> + <property name="label" translatable="yes">AF3</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_4"> + <property name="label" translatable="yes">AF4</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_5"> + <property name="label" translatable="yes">F7</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_6"> + <property name="label" translatable="yes">F3</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_7"> + <property name="label" translatable="yes">FZ</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_8"> + <property name="label" translatable="yes">F4</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_9"> + <property name="label" translatable="yes">F8</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">8</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_10"> + <property name="label" translatable="yes">FC5</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">9</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_11"> + <property name="label" translatable="yes">FC1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">10</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_12"> + <property name="label" translatable="yes">FC2</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">11</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_13"> + <property name="label" translatable="yes">FC6</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">12</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_14"> + <property name="label" translatable="yes">T7</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">13</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_15"> + <property name="label" translatable="yes">C3</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">14</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_16"> + <property name="label" translatable="yes">CZ</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">15</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_17"> + <property name="label" translatable="yes">C4</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">16</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_18"> + <property name="label" translatable="yes">T8</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">17</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_19"> + <property name="label" translatable="yes">CP5</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">18</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_20"> + <property name="label" translatable="yes">CP1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">19</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_21"> + <property name="label" translatable="yes">CP2</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">20</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_22"> + <property name="label" translatable="yes">CP6</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">21</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_23"> + <property name="label" translatable="yes">P7</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">22</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_24"> + <property name="label" translatable="yes">P3</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">23</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_25"> + <property name="label" translatable="yes">PZ</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">24</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_26"> + <property name="label" translatable="yes">P4</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">25</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_27"> + <property name="label" translatable="yes">P8</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">26</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_28"> + <property name="label" translatable="yes">PO7</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">27</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_29"> + <property name="label" translatable="yes">PO3</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">28</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_30"> + <property name="label" translatable="yes">PO4</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">29</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_31"> + <property name="label" translatable="yes">PO8</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">30</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_channel_32"> + <property name="label" translatable="yes">OZ</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">31</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkLabel" id="label_channel_1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 1)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 2)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 3)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 4)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 5)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 6)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 7)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 8)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 9)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">8</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 10)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">9</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_11"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 11)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">10</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_12"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 12)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">11</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_13"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 13)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">12</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_14"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 14)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">13</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_15"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 15)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">14</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_16"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 16)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">15</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_17"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 17)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">16</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_18"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 18)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">17</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_19"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 19)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">18</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_20"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 20)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">19</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_21"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 21)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">20</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_22"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 22)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">21</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_23"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 23)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">22</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_24"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 24)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">23</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_25"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 25)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">24</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_26"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 26)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">25</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_27"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 27)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">26</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_28"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 28)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">27</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_29"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 29)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">28</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_30"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 30)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">29</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_31"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 31)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">30</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_32"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">(Channel 32)</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">31</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkComboBox" id="combobox_channel_1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext8"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext9"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext10"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext11"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext12"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext13"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext14"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext15"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext16"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">8</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext17"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">9</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_11"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext18"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">10</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_12"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext19"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">11</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_13"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext20"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">12</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_14"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext21"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">13</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_15"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext22"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">14</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_16"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext23"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">15</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_17"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext24"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">16</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_18"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext25"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">17</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_19"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext26"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">18</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_20"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext27"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">19</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_21"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext28"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">20</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_22"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext29"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">21</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_23"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext30"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">22</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_24"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext31"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">23</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_25"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext32"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">24</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_26"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext33"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">25</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_27"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext34"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">26</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_28"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext35"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">27</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_29"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext36"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">28</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_30"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext37"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">29</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_31"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext38"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">30</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_channel_32"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">liststore4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext39"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">31</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_3"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_4"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_6"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_7"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_8"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_9"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">8</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_10"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">9</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_11"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">10</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_12"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">11</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_13"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">12</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_14"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">13</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_15"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">14</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_16"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">15</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_17"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">16</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_18"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">17</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_19"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">18</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_20"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">19</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_21"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">20</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_22"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">21</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_23"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">22</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_24"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">23</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_25"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">24</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_26"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">25</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_27"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">26</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_28"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">27</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_29"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">28</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_30"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">29</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_31"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">30</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car_channel_32"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">31</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox6"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_3"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_4"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_6"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_7"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_8"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_9"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">8</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_10"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">9</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_11"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">10</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_12"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">11</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_13"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">12</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_14"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">13</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_15"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">14</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_16"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">15</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_17"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">16</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_18"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">17</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_19"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">18</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_20"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">19</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_21"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">20</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_22"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">21</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_23"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">22</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_24"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">23</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_25"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">24</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_26"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">25</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_27"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">26</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_28"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">27</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_29"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">28</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_30"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">29</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_31"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">30</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_channel_32"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">31</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">6</property> + <property name="right_attach">7</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator7"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator8"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">5</property> + <property name="right_attach">6</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">6</property> + <property name="right_attach">7</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">button_channel_apply</action-widget> + <action-widget response="0">button_channel_cancel</action-widget> + </action-widgets> + </object> + <object class="GtkListStore" id="model1"> + <columns> + <!-- column-name gchararray --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkListStore" id="model2"> + <columns> + <!-- column-name gchararray --> + <column type="gchararray"/> + </columns> + <data> + <row> + <col id="0" translatable="yes">unspecified</col> + </row> + <row> + <col id="0" translatable="yes">female</col> + </row> + <row> + <col id="0" translatable="yes">male</col> + </row> + <row> + <col id="0" translatable="yes">unknown</col> + </row> + </data> + </object> + <object class="GtkListStore" id="model3"> + <columns> + <!-- column-name gchararray --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkListStore" id="model4"> + <columns> + <!-- column-name gchararray --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkDialog" id="openvibe-acquisition-server-settings"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="resizable">False</property> + <property name="window_position">center</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkVBox" id="dialog-vbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">2</property> + <child> + <object class="GtkLabel" id="label_title"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">g.Nautilus Configuration</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child internal-child="action_area"> + <object class="GtkHButtonBox" id="dialog-action_area_bottom"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="button_apply"> + <property name="label">gtk-apply</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="button_cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_title"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_general_settings"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">General Settings</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_general_settings"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">4</property> + </packing> + </child> + <child> + <object class="GtkTable" id="table_general_settings"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="n_rows">8</property> + <property name="n_columns">5</property> + <child> + <object class="GtkLabel" id="label_age"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Age :</property> + </object> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_identifier"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Identifier :</property> + </object> + </child> + <child> + <object class="GtkLabel" id="label_gender"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Gender :</property> + </object> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_device_serial"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Device serial :</property> + </object> + <packing> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_sample_rate"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Sample rate [Hz] :</property> + </object> + <packing> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_input_source"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Input source :</property> + </object> + <packing> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_network_channel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Network channel :</property> + </object> + <packing> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_event_channel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Event channel</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_noise_reduction"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Noise reduction</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_car"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">CAR</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_acceleration_data"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Acceleration data</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_counter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Counter</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_link_quality"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Link quality</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_battery_level"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Battery level</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_validation_indicator"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Validation indicator</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="right_attach">4</property> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_event_channel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_noise_reduction"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_car"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_acceleration_data"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_counter"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_link_quality"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_battery_level"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="checkbutton_validation_indicator"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">4</property> + <property name="right_attach">5</property> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="spinbutton_identifier"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <property name="primary_icon_sensitive">True</property> + <property name="secondary_icon_sensitive">True</property> + <property name="adjustment">adjustment1</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="spinbutton_age"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <property name="primary_icon_sensitive">True</property> + <property name="secondary_icon_sensitive">True</property> + <property name="adjustment">adjustment2</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_gender"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">model2</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext2"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="entry_device_serial"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="invisible_char">●</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <property name="primary_icon_sensitive">True</property> + <property name="secondary_icon_sensitive">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_input_source"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">model3</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext3"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_network_channel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">model4</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext4"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator10"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator11"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator12"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator13"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator14"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator15"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator16"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + </packing> + </child> + <child> + <object class="GtkVSeparator" id="vseparator17"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="combobox_sampling_frequency"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">model1</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext1"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_number_of_channels"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Number of channels :</property> + </object> + <packing> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="spinbutton_number_of_channels"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="invisible_char">●</property> + <property name="primary_icon_activatable">False</property> + <property name="secondary_icon_activatable">False</property> + <property name="primary_icon_sensitive">True</property> + <property name="secondary_icon_sensitive">True</property> + <property name="adjustment">adjustment3</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_general_bottom"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">6</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label_channel_settings"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Channel Settings</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">7</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_channel_settings"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">8</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox_channel_settings"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkButton" id="button_select_channels_bipolar_car_noise"> + <property name="label" translatable="yes">Select channels and settings for bipolar, CAR and noise reduction...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="button_select_sensitivity_filters"> + <property name="label" translatable="yes">Select sensitivity and filters for EEG channels...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">9</property> + </packing> + </child> + <child> + <object class="GtkHSeparator" id="hseparator_action_area"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">10</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="-10">button_apply</action-widget> + <action-widget response="-6">button_cancel</action-widget> + </action-widgets> + </object> +</interface> diff --git a/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCConfigurationgNautilusInterface.cpp b/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCConfigurationgNautilusInterface.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f13a1e92a9375e379b3d12bb61c54bcae100d2cb --- /dev/null +++ b/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCConfigurationgNautilusInterface.cpp @@ -0,0 +1,1035 @@ +#include "ovasCConfigurationgNautilusInterface.h" + +using namespace OpenViBE; +using namespace OpenViBE::Kernel; +using namespace OpenViBEAcquisitionServer; + +using namespace std; + +/*_________________________________________________ + +Insert callback to specific widget here +Example with a button that launch a calibration of the device: +*/ + +//Callback connected to a dedicated gtk button (button_select_channels_bipolar_car_noise): +static void button_channel_settings_cb(::GtkButton* pButton, void* pUserData) +{ + CConfigurationgNautilusInterface* l_pConfig=static_cast<CConfigurationgNautilusInterface*>(pUserData); + l_pConfig->buttonChannelSettingsPressedCB(); +} + +//Callback actually called: +void CConfigurationgNautilusInterface::buttonChannelSettingsPressedCB(void) +{ + // Connect to the hardware, ask for calibration, verify the return code, etc. + + GtkWidget *l_pDialog = GTK_WIDGET(gtk_builder_get_object(m_pBuilderConfigureInterface,"dialog_select_channels_bipolar_car_noise")); + gint l_i32Resp = gtk_dialog_run(GTK_DIALOG(l_pDialog)); + + gtk_widget_hide(l_pDialog); +} + +//Callback connected to a dedicated gtk button (button_select_sensitivity_filters): +static void button_sensitivity_filters_cb(::GtkButton* pButton, void* pUserData) +{ + CConfigurationgNautilusInterface* l_pConfig=static_cast<CConfigurationgNautilusInterface*>(pUserData); + l_pConfig->buttonSensitivityFiltersPressedCB(); +} + +//Callback actually called: +void CConfigurationgNautilusInterface::buttonSensitivityFiltersPressedCB(void) +{ + // get bandpass and notch filters for currenty selected sampling rate and set to filter list in corresponding dialog + GtkWidget *l_pDialog = GTK_WIDGET(gtk_builder_get_object(m_pBuilderConfigureInterface,"dialog_sensitivity_filters")); + gint l_i32Resp = gtk_dialog_run(GTK_DIALOG(l_pDialog)); + + gtk_widget_hide(l_pDialog); +} + +//Callback connected to a dedicated gtk button (button_sensitivity_filters_apply): +static void button_sensitivity_filters_apply_cb(::GtkButton* pButton, void* pUserData) +{ + CConfigurationgNautilusInterface* l_pConfig=static_cast<CConfigurationgNautilusInterface*>(pUserData); + l_pConfig->buttonSensitivityFiltersApplyPressedCB(); +} + +//Callback actually called: +void CConfigurationgNautilusInterface::buttonSensitivityFiltersApplyPressedCB(void) +{ + // get handle to sensitivity and filters dialog and close it + GtkWidget *l_pDialog = GTK_WIDGET(gtk_builder_get_object(m_pBuilderConfigureInterface,"dialog_sensitivity_filters")); + gtk_widget_hide(l_pDialog); +} + +//Callback connected to a dedicated gtk button (button_channel_apply): +static void button_channel_settings_apply_cb(::GtkButton* pButton, void* pUserData) +{ + CConfigurationgNautilusInterface* l_pConfig=static_cast<CConfigurationgNautilusInterface*>(pUserData); + l_pConfig->buttonChannelSettingsApplyPressedCB(); +} + +//Callback actually called: +void CConfigurationgNautilusInterface::buttonChannelSettingsApplyPressedCB(void) +{ + // get handle to channel settings dialog and close it + GtkWidget *l_pDialog = GTK_WIDGET(gtk_builder_get_object(m_pBuilderConfigureInterface,"dialog_select_channels_bipolar_car_noise")); + gtk_widget_hide(l_pDialog); + + // get number of channels selected and set range as number of channels starting at number of channels + unsigned __int16 l_ui16NumberOfChannels = 0; + unsigned __int16 i; + char l_sTemporary[30]; + for (i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + // set electrode names as channel names in channel selection dialog + sprintf_s(&l_sTemporary[0],30,"checkbutton_channel_%d",(i + 1)); + GtkButton *l_pCheckButton = GTK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if (l_pCheckButton) + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton))) + l_ui16NumberOfChannels += 1; + } + + GtkSpinButton *l_pSpinButton = GTK_SPIN_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"spinbutton_number_of_channels")); + gtk_spin_button_set_range(l_pSpinButton,l_ui16NumberOfChannels,l_ui16NumberOfChannels); + gtk_spin_button_set_value(l_pSpinButton,l_ui16NumberOfChannels); +} + +// catch combobox sampling rate changed signal and call function which handles event +static void sample_rate_changed_cb(::GtkComboBox* pComboBox, void *pUserData) +{ + CConfigurationgNautilusInterface* l_pConfig=static_cast<CConfigurationgNautilusInterface*>(pUserData); + l_pConfig->comboboxSampleRateChangedCB(); +} + +// Callback actually called +void CConfigurationgNautilusInterface::comboboxSampleRateChangedCB() +{ + // get hardware filters according to sampling frequency currently selected + OpenViBE::boolean l_bFunctionReturn = getFiltersForNewSamplingRate(); + if (!l_bFunctionReturn) + { + // TODO: add error handling + } +} + +// catch noise reduction checkbox toggled signal and call function which handles event +static void noise_reduction_changed_cb(::GtkCheckButton* pCheckbutton, void* pUserData) +{ + CConfigurationgNautilusInterface* l_pConfig = static_cast<CConfigurationgNautilusInterface*>(pUserData); + l_pConfig->checkbuttonNoiseReductionChangedCB(); +} + +// Callback actually called +void CConfigurationgNautilusInterface::checkbuttonNoiseReductionChangedCB() +{ + // activate/deactivate noise reduction checkboxes in dialog_select_channels_bipolar_car_noise + GtkCheckButton *l_pCheckButtonNoiseReduction = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_noise_reduction")); + gboolean l_bCheckButtonValue = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButtonNoiseReduction)); + char l_sTemporary[45]; + for (unsigned __int16 i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + sprintf_s(&l_sTemporary[0],45,"checkbutton_noise_channel_%d",(i + 1)); + l_pCheckButtonNoiseReduction = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + + if (l_pCheckButtonNoiseReduction) + { + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButtonNoiseReduction),l_bCheckButtonValue); + } + } +} + +// catch car checkbox toggled signal and call function which handles event +static void car_changed_cb(::GtkCheckButton* pCheckbutton, void* pUserData) +{ + CConfigurationgNautilusInterface* l_pConfig = static_cast<CConfigurationgNautilusInterface*>(pUserData); + l_pConfig->checkbuttonCARChangedCB(); +} + +// Callback actually called +void CConfigurationgNautilusInterface::checkbuttonCARChangedCB() +{ + // activate/deactivate car checkboxes in dialog_select_channels_bipolar_car_noise + GtkCheckButton *l_pCheckButtonCAR = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_car")); + gboolean l_bCheckButtonValue = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButtonCAR)); + char l_sTemporary[45]; + for (unsigned __int16 i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + sprintf_s(&l_sTemporary[0],45,"checkbutton_car_channel_%d",(i + 1)); + l_pCheckButtonCAR = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + + if (l_pCheckButtonCAR) + { + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButtonCAR),l_bCheckButtonValue); + } + } +} + +// get hardware related settings from GDS +OpenViBE::boolean CConfigurationgNautilusInterface::getHardwareSettings(void) +{ + GtkTreeIter l_iter; + unsigned __int32 i; + + // get network channel and set in dialog and set one as active in dialog + unsigned __int32 l_ui32SupportedNWChannelsCount; + unsigned __int32* l_pSupportedNWChannels; + // get number of supported network channels to allocate memory to hold supported network channels + m_oGdsResult = GDS_GNAUTILUS_GetSupportedNetworkChannels(m_ui64DeviceHandle, m_sDeviceNames, NULL, &l_ui32SupportedNWChannelsCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + l_pSupportedNWChannels = new unsigned __int32[l_ui32SupportedNWChannelsCount]; + m_oGdsResult = GDS_GNAUTILUS_GetSupportedNetworkChannels(m_ui64DeviceHandle, m_sDeviceNames, l_pSupportedNWChannels, &l_ui32SupportedNWChannelsCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + // get network channel currently used between base station and headstage + unsigned __int32 l_ui32NetworkChannel; + m_oGdsResult = GDS_GNAUTILUS_GetNetworkChannel(m_ui64DeviceHandle, m_sDeviceNames, &l_ui32NetworkChannel); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + // put network channels to combobox + GtkComboBox *l_pComboBoxNetworkChannel = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface, "combobox_network_channel")); + GtkTreeModel *l_pListStoreNetworkChannel = gtk_combo_box_get_model(l_pComboBoxNetworkChannel); + gtk_list_store_clear(GTK_LIST_STORE(l_pListStoreNetworkChannel)); + stringstream l_sNetworkChannel; + if (m_vComboBoxNetworkChannels.size() > 0) + m_vComboBoxNetworkChannels.clear(); + + // fill network channel combobox with available network channels + for (i = 0; i < l_ui32SupportedNWChannelsCount; i++) + { + l_sNetworkChannel << l_pSupportedNWChannels[i]; + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreNetworkChannel), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreNetworkChannel),&l_iter,0,l_sNetworkChannel.str().c_str(),-1); + l_sNetworkChannel.clear(); + l_sNetworkChannel.str(""); + + m_vComboBoxNetworkChannels.push_back(l_pSupportedNWChannels[i]); + } + vector<OpenViBE::uint32>::iterator l_NetworkChannelIterator; + l_NetworkChannelIterator = find(m_vComboBoxNetworkChannels.begin(),m_vComboBoxNetworkChannels.end(),l_ui32NetworkChannel); + __int32 nw_ch_index = distance(m_vComboBoxNetworkChannels.begin(),l_NetworkChannelIterator); + gtk_combo_box_set_active(l_pComboBoxNetworkChannel,nw_ch_index); + + delete [] l_pSupportedNWChannels; + + // get supported sample rates + unsigned __int32 *l_pSupportedSamplingRates; + unsigned __int32 l_ui32SupportedSamplingRatesCount; + stringstream l_sSupportedSamplingRates; + + // get number of supported sample rates + m_oGdsResult = GDS_GNAUTILUS_GetSupportedSamplingRates(m_ui64DeviceHandle, m_sDeviceNames, NULL, &l_ui32SupportedSamplingRatesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + l_pSupportedSamplingRates = new unsigned __int32[l_ui32SupportedSamplingRatesCount]; + // get supported sample rates + m_oGdsResult = GDS_GNAUTILUS_GetSupportedSamplingRates(m_ui64DeviceHandle, m_sDeviceNames, l_pSupportedSamplingRates, &l_ui32SupportedSamplingRatesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + // set sample rates as content of combo box in corresponding dialog + GtkComboBox *l_pComboBoxSamplingRates = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface, "combobox_sampling_frequency")); + GtkTreeModel *l_pListStoreSamplingRates = gtk_combo_box_get_model(l_pComboBoxSamplingRates); + gtk_list_store_clear(GTK_LIST_STORE(l_pListStoreSamplingRates)); + for (i = 0; i < l_ui32SupportedSamplingRatesCount; i++) + { + l_sSupportedSamplingRates << l_pSupportedSamplingRates[i]; + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreSamplingRates), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreSamplingRates), &l_iter, 0, l_sSupportedSamplingRates.str().c_str(),-1); + l_sSupportedSamplingRates.clear(); + l_sSupportedSamplingRates.str(""); + } + gtk_combo_box_set_active(l_pComboBoxSamplingRates,0); + + boolean l_bFunctionReturn = getFiltersForNewSamplingRate(); + if (!l_bFunctionReturn) + { + return false; + } + + // set list of sensitivities according to sensitivities returned by gds function + double *l_pSupportedSensitivities; + unsigned __int32 l_ui32SupportedSensitivitiesCount; + std::stringstream l_sSensitivities; + // get number of sensitivities + m_oGdsResult = GDS_GNAUTILUS_GetSupportedSensitivities(m_ui64DeviceHandle, m_sDeviceNames, NULL, &l_ui32SupportedSensitivitiesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + // TODO: add error handling + return false; + } + // get sensitivities + l_pSupportedSensitivities = new double[l_ui32SupportedSensitivitiesCount]; + m_oGdsResult = GDS_GNAUTILUS_GetSupportedSensitivities(m_ui64DeviceHandle, m_sDeviceNames, l_pSupportedSensitivities, &l_ui32SupportedSensitivitiesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + // TODO: add error handling + return false; + } + // set items in dialog item combobox_select_sensitivity + GtkComboBox *l_pComboBoxSensitivities = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface, "combobox_select_sensitivity")); + GtkTreeModel *l_pListStoreSensitivities = gtk_combo_box_get_model(l_pComboBoxSensitivities); + gtk_list_store_clear(GTK_LIST_STORE(l_pListStoreSensitivities)); + for (i = 0; i < l_ui32SupportedSensitivitiesCount; i++) + { + l_sSensitivities << (l_pSupportedSensitivities[i] / 1000); + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreSensitivities), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreSensitivities), &l_iter, 0, l_sSensitivities.str().c_str(),-1); + m_vComboBoxSensitivityValues.push_back(l_pSupportedSensitivities[i]); + l_sSensitivities.clear(); + l_sSensitivities.str(""); + } + gtk_combo_box_set_active(l_pComboBoxSensitivities,0); + + delete [] l_pSupportedSensitivities; + + // set input signals in input sources combobox in main configuration dialog + GDS_GNAUTILUS_INPUT_SIGNAL *l_pSupportedInputSources; + unsigned __int32 l_ui32SupportedInputSourcesCount; + // first get number of supported input sources (call with third parameter set to NULL) + m_oGdsResult = GDS_GNAUTILUS_GetSupportedInputSources(m_ui64DeviceHandle, m_sDeviceNames, NULL, &l_ui32SupportedInputSourcesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + // TODO: add error handling + return false; + } + // allocate memory to hold input sources + l_pSupportedInputSources = new GDS_GNAUTILUS_INPUT_SIGNAL[l_ui32SupportedInputSourcesCount]; + // now get input sources + m_oGdsResult = GDS_GNAUTILUS_GetSupportedInputSources(m_ui64DeviceHandle, m_sDeviceNames, l_pSupportedInputSources, &l_ui32SupportedInputSourcesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + // TODO: add error handling + return false; + } + + // set values to combobox_input_source (there are only three allowed at the moment, see code below) + GtkComboBox *l_pComboBoxInputSources = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface, "combobox_input_source")); + GtkTreeModel *l_pListStoreInputSources = gtk_combo_box_get_model(l_pComboBoxInputSources); + gtk_list_store_clear(GTK_LIST_STORE(l_pListStoreInputSources)); + stringstream l_sInputSource; + for (i = 0; i < l_ui32SupportedInputSourcesCount; i++) + { + if (l_pSupportedInputSources[i] == 0) + { + // electrode input + m_vComboBoxInputSources.push_back(l_pSupportedInputSources[i]); + l_sInputSource << "Electrode"; + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreInputSources), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreInputSources), &l_iter, 0, l_sInputSource.str().c_str(),-1); + } + else if (l_pSupportedInputSources[i] == 1) + { + // shortcut + m_vComboBoxInputSources.push_back(l_pSupportedInputSources[i]); + l_sInputSource << "Shortcut"; + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreInputSources), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreInputSources), &l_iter, 0, l_sInputSource.str().c_str(),-1); + } + else if (l_pSupportedInputSources[i] == 5) + { + // test signal + m_vComboBoxInputSources.push_back(l_pSupportedInputSources[i]); + l_sInputSource << "Test Signal"; + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreInputSources), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreInputSources), &l_iter, 0, l_sInputSource.str().c_str(),-1); + } + l_sInputSource.clear(); + l_sInputSource.str(""); + } + gtk_combo_box_set_active(l_pComboBoxInputSources,0); + + return true; +} + +// get channel names for hardware currently connected (cannot be changed as electrode grid is fixed) +OpenViBE::boolean CConfigurationgNautilusInterface::getChannelNames(void) +{ + unsigned __int32 l_ui32MountedModulesCount, l_ui32ElectrodeNamesCount; + char l_sTemporary[30]; + stringstream l_sBipolarEntry; + + // get number of mounted modules and electrode names currently available + l_ui32MountedModulesCount = 0; + l_ui32ElectrodeNamesCount = 0; + m_oGdsResult = GDS_GNAUTILUS_GetChannelNames(m_ui64DeviceHandle,m_sDeviceNames,&l_ui32MountedModulesCount,NULL,&l_ui32ElectrodeNamesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + // set array of electrode names according to names currently available + char (*l_pElectrodeNames)[GDS_GNAUTILUS_ELECTRODE_NAME_LENGTH_MAX] = new char[l_ui32ElectrodeNamesCount][GDS_GNAUTILUS_ELECTRODE_NAME_LENGTH_MAX]; + // get electrode names + m_oGdsResult = GDS_GNAUTILUS_GetChannelNames(m_ui64DeviceHandle,m_sDeviceNames,&l_ui32MountedModulesCount,l_pElectrodeNames,&l_ui32ElectrodeNamesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + unsigned __int16 i; + GtkComboBox *l_pComboBoxBipolarChannels = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,"combobox_channel_1")); + GtkTreeModel *l_pListStoreBipolarChannels = gtk_combo_box_get_model(l_pComboBoxBipolarChannels); + gtk_list_store_clear(GTK_LIST_STORE(l_pListStoreBipolarChannels)); + + l_sBipolarEntry << "none"; + GtkTreeIter l_iter; + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreBipolarChannels), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreBipolarChannels), &l_iter, 0, l_sBipolarEntry.str().c_str(),-1); + for (i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + // set electrode names as channel names in channel selection dialog + sprintf_s(&l_sTemporary[0],30,"checkbutton_channel_%d",(i + 1)); + GtkButton *l_pCheckButtonChannel = GTK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if ((l_pCheckButtonChannel) && (i < l_ui32ElectrodeNamesCount)) + { + gtk_button_set_label(l_pCheckButtonChannel,&l_pElectrodeNames[i][0]); + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreBipolarChannels), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreBipolarChannels), &l_iter, 0, &l_pElectrodeNames[i][0],-1); + } + else if ((l_pCheckButtonChannel) && (i > l_ui32ElectrodeNamesCount)) + { + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButtonChannel),false); + } + } + for (i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + sprintf_s(&l_sTemporary[0],30,"combobox_channel_%d",(i + 1)); + l_pComboBoxBipolarChannels = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if (l_pComboBoxBipolarChannels) + { + gtk_combo_box_set_model(l_pComboBoxBipolarChannels,l_pListStoreBipolarChannels); + gtk_combo_box_set_active(l_pComboBoxBipolarChannels,0); + } + } + // adapt number of recorded channels in main configuration dialog according to number of actual selected channels + GtkSpinButton *l_pSpinButtonNumberOfChannels = GTK_SPIN_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"spinbutton_number_of_channels")); + gtk_spin_button_set_range(l_pSpinButtonNumberOfChannels,l_ui32ElectrodeNamesCount,l_ui32ElectrodeNamesCount); + gtk_spin_button_set_value(l_pSpinButtonNumberOfChannels,l_ui32ElectrodeNamesCount); + + // set electrode names as channel names + m_vChannelName.clear(); + for (i = 0; i < l_ui32ElectrodeNamesCount; i++) + { + m_vChannelName[i] = l_pElectrodeNames[i]; + } + + delete [] l_pElectrodeNames; + + return true; +} + +// get channels currenly available for g.Nautilus used +OpenViBE::boolean CConfigurationgNautilusInterface::getAvailableChannels(void) +{ + char l_sTemporary[30]; + + // get channels currently available on connected device + BOOL l_bAvailableChannels[GDS_GNAUTILUS_CHANNELS_MAX]; + m_oGdsResult = GDS_GNAUTILUS_GetAvailableChannels(m_ui64DeviceHandle,m_sDeviceNames,&l_bAvailableChannels); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + m_vAvailableChannels.resize(GDS_GNAUTILUS_CHANNELS_MAX); + + for (unsigned __int16 i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + sprintf_s(&l_sTemporary[0],30,"checkbutton_channel_%d",(i + 1)); + GtkCheckButton *l_pCheckButtonChannel = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if (l_bAvailableChannels[i] == 1) + { + if (l_pCheckButtonChannel) + { + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButtonChannel),true); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckButtonChannel),true); + } + m_vAvailableChannels[i] = true; + } + else + { + if (l_pCheckButtonChannel) + { + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButtonChannel),false); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckButtonChannel),false); + } + m_vAvailableChannels[i] = false; + } + } + + return true; +} + +// if sampling rate changed filters in filter settings dialog have to be updated according to new sampling rate +boolean CConfigurationgNautilusInterface::getFiltersForNewSamplingRate(void) +{ + GtkTreeIter l_iter; + unsigned __int32 i; + + // get current sample rate + GtkComboBox *l_pComboBoxSamplingRate = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface, "combobox_sampling_frequency")); + const char *l_sSamplingRate = gtk_combo_box_get_active_text(l_pComboBoxSamplingRate); + double l_dSamplingRate = atof(l_sSamplingRate); + + // get notch and bandpass filters available + GDS_FILTER_INFO *l_pBandPassFilters, *l_pNotchFilters; + unsigned __int32 l_ui32BandPassFiltersCount, l_ui32NotchFiltersCount; + std::stringstream l_sFilterDescription; + l_sFilterDescription << "no bandpass filter"; + + // get number of bandpass filters and allocate filter array correspondingly + m_oGdsResult = GDS_GNAUTILUS_GetBandpassFilters(m_ui64DeviceHandle, m_sDeviceNames, NULL, &l_ui32BandPassFiltersCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + l_pBandPassFilters = new GDS_FILTER_INFO[l_ui32BandPassFiltersCount]; + // get bandpass filters + m_oGdsResult = GDS_GNAUTILUS_GetBandpassFilters(m_ui64DeviceHandle, m_sDeviceNames, l_pBandPassFilters, &l_ui32BandPassFiltersCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + // get number of notch filters and allocate filter array correspondingly + m_oGdsResult = GDS_GNAUTILUS_GetNotchFilters(m_ui64DeviceHandle, m_sDeviceNames, NULL, &l_ui32NotchFiltersCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + l_pNotchFilters = new GDS_FILTER_INFO[l_ui32NotchFiltersCount]; + // get notch filters + m_oGdsResult = GDS_GNAUTILUS_GetNotchFilters(m_ui64DeviceHandle, m_sDeviceNames, l_pNotchFilters, &l_ui32NotchFiltersCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + // set filters as combobox entries depending on the current sample rate selected + GtkComboBox *l_pComboBoxBandPass = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,"combobox_select_bandpass_filter")); + GtkTreeModel *l_pListStoreBandPass = gtk_combo_box_get_model(l_pComboBoxBandPass); + gtk_list_store_clear(GTK_LIST_STORE(l_pListStoreBandPass)); + + GtkComboBox *l_pComboBoxNotch = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,"combobox_select_notch_filter")); + GtkTreeModel *l_pListStoreNotch = gtk_combo_box_get_model(l_pComboBoxNotch); + gtk_list_store_clear(GTK_LIST_STORE(l_pListStoreNotch)); + + if(m_vComboBoxBandpassFilterIndex.size() > 0) + m_vComboBoxBandpassFilterIndex.clear(); + if (m_vComboBoxNotchFilterIndex.size() > 0) + m_vComboBoxNotchFilterIndex.clear(); + if (m_vComboBoxSensitivityValues.size() > 0) + m_vComboBoxSensitivityValues.clear(); + + // fill bandpass filter combobox with available filters + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreBandPass), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreBandPass),&l_iter,0,l_sFilterDescription.str().c_str(),-1); + l_sFilterDescription.clear(); + l_sFilterDescription.str(""); + + m_vComboBoxBandpassFilterIndex.push_back(-1); + for (i = 0; i < l_ui32BandPassFiltersCount; i++) + { + if (l_dSamplingRate == l_pBandPassFilters[i].SamplingRate) + { + if (l_pBandPassFilters[i].TypeId == 1) + l_sFilterDescription << "Butterworth - "; + if (l_pBandPassFilters[i].TypeId == 2) + l_sFilterDescription << "Chebyshev - "; + + l_sFilterDescription << l_pBandPassFilters[i].Order << " - ["; + l_sFilterDescription << l_pBandPassFilters[i].LowerCutoffFrequency << "; "; + l_sFilterDescription << l_pBandPassFilters[i].UpperCutoffFrequency << "] - "; + l_sFilterDescription << l_pBandPassFilters[i].SamplingRate; + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreBandPass), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreBandPass), &l_iter, 0, l_sFilterDescription.str().c_str(),-1); + m_vComboBoxBandpassFilterIndex.push_back(i); + } + l_sFilterDescription.clear(); + l_sFilterDescription.str(""); + } + gtk_combo_box_set_active(l_pComboBoxBandPass,m_rBandpassFilterIndex+1); // +1 because -1 is for "no filter". + + // fill notch filter combobox with available fliters + l_sFilterDescription << "no notch filter"; + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreNotch), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreNotch),&l_iter,0,l_sFilterDescription.str().c_str(),-1); + l_sFilterDescription.clear(); + l_sFilterDescription.str(""); + + m_vComboBoxNotchFilterIndex.push_back(-1); + for (i = 0; i < l_ui32NotchFiltersCount; i++) + { + if (l_dSamplingRate == l_pNotchFilters[i].SamplingRate) + { + if (l_pNotchFilters[i].TypeId == 1) + l_sFilterDescription << "Butterworth - "; + if (l_pNotchFilters[i].TypeId == 2) + l_sFilterDescription << "Chebyshev - "; + + l_sFilterDescription << l_pNotchFilters[i].Order << " - ["; + l_sFilterDescription << l_pNotchFilters[i].LowerCutoffFrequency << "; "; + l_sFilterDescription << l_pNotchFilters[i].UpperCutoffFrequency << "] - "; + l_sFilterDescription << l_pNotchFilters[i].SamplingRate; + gtk_list_store_append(GTK_LIST_STORE(l_pListStoreNotch), &l_iter); + gtk_list_store_set(GTK_LIST_STORE(l_pListStoreNotch), &l_iter, 0, l_sFilterDescription.str().c_str(),-1); + m_vComboBoxNotchFilterIndex.push_back(i); + } + l_sFilterDescription.clear(); + l_sFilterDescription.str(""); + } + gtk_combo_box_set_active(l_pComboBoxNotch,m_rNotchFilterIndex+1); // +1 because -1 is for "no filter". + + delete [] l_pBandPassFilters; + delete [] l_pNotchFilters; + + return true; +} + +// If you added more reference attribute, initialize them here +CConfigurationgNautilusInterface::CConfigurationgNautilusInterface(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) + : CConfigurationBuilder(sGtkBuilderFileName) + ,m_rDriverContext(rDriverContext) + ,m_rDeviceSerial(rDeviceSerial) + ,m_rInputSource(rInputSource) + ,m_rNetworkChannel(rNetworkChannel) + ,m_rBandpassFilterIndex(rBandpassFilterIndex) + ,m_rNotchFilterIndex(rNotchFilterIndex) + ,m_rSensitivity(rSensitivity) + ,m_rDigitalInputEnabled(rDigitalInputEnabled) + ,m_rNoiseReductionEnabled(rNoiseReductionEnabled) + ,m_rCAREnabled(rCAREnabled) + ,m_rAccelerationDataEnabled(rAccelerationDataEnabled) + ,m_rCounterEnabled(rCounterEnabled) + ,m_rLinkQualityEnabled(rLinkQualityEnabled) + ,m_rBatteryLevelEnabled(rBatteryLevelEnabled) + ,m_rValidationIndicatorEnabled(rValidationIndicatorEnabled) + ,m_vSelectedChannels(rSelectedChannels) + ,m_vBipolarChannels(rBipolarChannels) + ,m_vCAR(rCAR) + ,m_vNoiseReduction(rNoiseReduction) +{ + m_bConnectionOpen = false; +} + +boolean CConfigurationgNautilusInterface::preConfigure(void) +{ + if(! CConfigurationBuilder::preConfigure()) + { + return false; + } + + // Connect here all callbacks + // Example: + // g_signal_connect(gtk_builder_get_object(m_pBuilderConfigureInterface, "button_calibrate"), "pressed", G_CALLBACK(button_calibrate_pressed_cb), this); + + // Insert here the pre-configure code. + // For example, you may want to check if a device is currently connected + // and if more than one are connected. Then you can list in a dedicated combo-box + // the device currently connected so the user can choose which one he wants to acquire from. + + boolean l_bFunctionReturn; + + // open connection to device if not done yet before reading filters, channel names etc. + if (!m_bConnectionOpen) + { + // open device handle and get connected device + l_bFunctionReturn = openDevice(); + if (!l_bFunctionReturn) + { + return false; + } + } + + // get settings for connected hardware + l_bFunctionReturn = getHardwareSettings(); + if (!l_bFunctionReturn) + { + return false; + } + + // get available channels + l_bFunctionReturn = getAvailableChannels(); + if(!l_bFunctionReturn) + { + return false; + } + + l_bFunctionReturn = getChannelNames(); + if (!l_bFunctionReturn) + { + return false; + } + + // activate checkboxes in g.Nautilus Configuration dialog + ::GtkCheckButton *l_pCheckbuttonEventChannel = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_event_channel")); + ::gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonEventChannel),m_rDigitalInputEnabled); + + ::GtkCheckButton *l_pCheckbuttonNoiseReduction = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_noise_reduction")); + ::gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonNoiseReduction),m_rNoiseReductionEnabled); + + ::GtkCheckButton *l_pCheckbuttonCAR = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_car")); + ::gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonCAR),m_rCAREnabled); + + // activate/deactivate channel, noise reduction and CAR checkboxes in dialog_select_channels_bipolar_car_noise + // as well as bipolar combo boxes according to available channels + gboolean l_bCheckbuttonNoiseReductionValue = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonNoiseReduction)); + gboolean l_bCheckbuttonCARValue = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonCAR)); + char l_sTemporary[45]; + GtkCheckButton *l_pCheckButton; + GtkComboBox *l_pComboBox; + for (unsigned __int16 i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + sprintf_s(&l_sTemporary[0],45,"checkbutton_channel_%d",(i + 1)); + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if ((l_pCheckButton) && (m_vAvailableChannels[i])) + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButton),true); + else if (l_pCheckButton) + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButton),false); + + sprintf_s(&l_sTemporary[0],45,"checkbutton_noise_channel_%d",(i + 1)); + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if ((l_pCheckButton) && (m_vAvailableChannels[i])) + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButton),l_bCheckbuttonNoiseReductionValue); + else if (l_pCheckButton) + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButton),false); + + sprintf_s(&l_sTemporary[0],45,"checkbutton_car_channel_%d",(i + 1)); + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if ((l_pCheckButton) && (m_vAvailableChannels[i])) + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButton),l_bCheckbuttonCARValue); + else if (l_pCheckButton) + gtk_widget_set_sensitive(GTK_WIDGET(l_pCheckButton),false); + + sprintf_s(&l_sTemporary[0],45,"combobox_channel_%d",(i + 1)); + l_pComboBox = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if ((l_pComboBox) && (m_vAvailableChannels[i])) + gtk_widget_set_sensitive(GTK_WIDGET(l_pComboBox),true); + else if (l_pComboBox) + gtk_widget_set_sensitive(GTK_WIDGET(l_pComboBox),false); + } + + ::GtkCheckButton *l_pCheckbuttonAccelerationData = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_acceleration_data")); + ::gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonAccelerationData),m_rAccelerationDataEnabled); + + ::GtkCheckButton *l_pCheckbuttonCounter = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_counter")); + ::gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonCounter),m_rCounterEnabled); + + ::GtkCheckButton *l_pCheckbuttonLinkQuality = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_link_quality")); + ::gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonLinkQuality),m_rLinkQualityEnabled); + + ::GtkCheckButton *l_pCheckbuttonBatteryLevel= GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_battery_level")); + ::gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonBatteryLevel),m_rBatteryLevelEnabled); + + ::GtkCheckButton *l_pCheckbuttonValidationIndicator = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_validation_indicator")); + ::gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l_pCheckbuttonValidationIndicator),m_rValidationIndicatorEnabled); + + g_signal_connect(gtk_builder_get_object(m_pBuilderConfigureInterface,"button_select_channels_bipolar_car_noise"),"pressed",G_CALLBACK(button_channel_settings_cb),this); + g_signal_connect(gtk_builder_get_object(m_pBuilderConfigureInterface,"button_select_sensitivity_filters"),"pressed",G_CALLBACK(button_sensitivity_filters_cb),this); + + g_signal_connect(gtk_builder_get_object(m_pBuilderConfigureInterface,"button_select_sensitivity_filters_apply"),"pressed",G_CALLBACK(button_sensitivity_filters_apply_cb),this); + g_signal_connect(gtk_builder_get_object(m_pBuilderConfigureInterface,"button_channel_apply"),"pressed",G_CALLBACK(button_channel_settings_apply_cb),this); + + // set device serial in device serial text entry in g.Nautilus Configuration dialog + ::GtkEntry *l_pEntryDeviceSerial = GTK_ENTRY(gtk_builder_get_object(m_pBuilderConfigureInterface, "entry_device_serial")); + ::gtk_entry_set_text(l_pEntryDeviceSerial,m_rDeviceSerial.c_str()); + ::gtk_entry_set_editable(l_pEntryDeviceSerial,false); + + // deactivate buttons if no device is detected + if (gtk_entry_get_text_length(l_pEntryDeviceSerial) < 13) + { + GtkWidget *l_pButton = GTK_WIDGET(gtk_builder_get_object(m_pBuilderConfigureInterface,"button_select_channels_bipolar_car_noise")); + gtk_widget_set_sensitive(l_pButton,false); + + l_pButton = GTK_WIDGET(gtk_builder_get_object(m_pBuilderConfigureInterface,"button_select_sensitivity_filters")); + gtk_widget_set_sensitive(l_pButton,false); + } + + // catch event when sample rate is changed to adjust available filters + g_signal_connect(gtk_builder_get_object(m_pBuilderConfigureInterface, "combobox_sampling_frequency"),"changed",G_CALLBACK(sample_rate_changed_cb),this); + + // catch events when car and noise reduction checkboxes are toggled in main config dialog to enable/disable corresponding checkboxes in related dialog + g_signal_connect(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_noise_reduction"),"toggled",G_CALLBACK(noise_reduction_changed_cb),this); + g_signal_connect(gtk_builder_get_object(m_pBuilderConfigureInterface, "checkbutton_car"), "toggled", G_CALLBACK(car_changed_cb),this); + + return true; +} + +boolean CConfigurationgNautilusInterface::postConfigure(void) +{ + if(m_bApplyConfiguration) + { + // If the user pressed the "apply" button, you need to save the changes made in the configuration. + // For example, you can save the connection ID of the selected device: + // m_ui32ConnectionID = <value-from-gtk-widget> + GtkCheckButton *l_pCheckButton; + unsigned __int16 i; + unsigned __int32 l_ui32ComboBoxIndex; + gboolean l_bButtonValue = false; + gdouble l_dNumberOfChannels = 0; + + // get serial number from configuration dialog + GtkEntry *l_pEntrySerial = GTK_ENTRY(gtk_builder_get_object(m_pBuilderConfigureInterface, "entry_device_serial")); + m_rDeviceSerial = gtk_entry_get_text(l_pEntrySerial); + + // get selected channels + char l_sTemporary[45]; + m_vSelectedChannels.clear(); + for (i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + sprintf_s(&l_sTemporary[0],45,"checkbutton_channel_%d",(i + 1)); + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if (l_pCheckButton) + { + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton))) + { + m_vSelectedChannels.push_back(i + 1); + l_dNumberOfChannels += 1; + } + else + { + m_vSelectedChannels.push_back(0); + m_vChannelName.erase(i); + } + } + } + + // get bipolar channels + m_vBipolarChannels.clear(); + for (i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + sprintf_s(&l_sTemporary[0],45,"combobox_channel_%d", (i + 1)); + GtkComboBox *l_pComboBoxBipolarChannels = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if (l_pComboBoxBipolarChannels) + m_vBipolarChannels.push_back((OpenViBE::uint16)gtk_combo_box_get_active(l_pComboBoxBipolarChannels)); + } + + // set bandpass and notch filter indices to correponding variables + GtkComboBox *l_pComboBoxBandpassFilters = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,"combobox_select_bandpass_filter")); + l_ui32ComboBoxIndex = gtk_combo_box_get_active(l_pComboBoxBandpassFilters); + m_rBandpassFilterIndex = m_vComboBoxBandpassFilterIndex.at(l_ui32ComboBoxIndex); + + GtkComboBox *l_pComboBoxNotchFilters = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,"combobox_select_notch_filter")); + l_ui32ComboBoxIndex = gtk_combo_box_get_active(l_pComboBoxNotchFilters); + m_rNotchFilterIndex = m_vComboBoxNotchFilterIndex.at(l_ui32ComboBoxIndex); + + // sensitivity + GtkComboBox *l_pComboBoxSensitivities = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,"combobox_select_sensitivity")); + l_ui32ComboBoxIndex = gtk_combo_box_get_active(l_pComboBoxSensitivities); + m_rSensitivity = m_vComboBoxSensitivityValues.at(l_ui32ComboBoxIndex); + + // digital inputs + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_event_channel")); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_rDigitalInputEnabled = true; + else + m_rDigitalInputEnabled = false; + + // noise reduction + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_noise_reduction")); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_rNoiseReductionEnabled = true; + else + m_rNoiseReductionEnabled = false; + + // if noise reduction is active, check for which channels noise reduction is enabled + m_vNoiseReduction.clear(); + for (i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + sprintf_s(&l_sTemporary[0],45,"checkbutton_noise_channel_%d",(i + 1)); + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if (l_pCheckButton) + { + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_vNoiseReduction.push_back(true); + else + m_vNoiseReduction.push_back(false); + } + } + + // CAR + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_car")); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_rCAREnabled = true; + else + m_rCAREnabled = false; + + // if CAR is active, check for which channels CAR is enabled + m_vCAR.clear(); + for (i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + sprintf_s(&l_sTemporary[0],45,"checkbutton_car_channel_%d",(i + 1)); + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,l_sTemporary)); + if (l_pCheckButton) + { + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_vCAR.push_back(true); + else + m_vCAR.push_back(false); + } + } + + // acceleration data + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_acceleration_data")); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_rAccelerationDataEnabled = true; + else + m_rAccelerationDataEnabled = false; + + // counter + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_counter")); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_rCounterEnabled = true; + else + m_rCounterEnabled = false; + + // link quality + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_link_quality")); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_rLinkQualityEnabled = true; + else + m_rLinkQualityEnabled = false; + + // battery level + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_battery_level")); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_rBatteryLevelEnabled = true; + else + m_rBatteryLevelEnabled = false; + + // validation indicator + l_pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface,"checkbutton_validation_indicator")); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(l_pCheckButton)) == 1) + m_rValidationIndicatorEnabled = true; + else + m_rValidationIndicatorEnabled = false; + + // network channel + GtkComboBox *l_pComboBoxNetworkChannel = GTK_COMBO_BOX(gtk_builder_get_object(m_pBuilderConfigureInterface,"combobox_network_channel")); + const char* l_sNetworkChannel = gtk_combo_box_get_active_text(l_pComboBoxNetworkChannel); + m_rNetworkChannel = (unsigned __int32)atoi(l_sNetworkChannel); + + // set number of channels in main configuration dialog (spinbutton still remains disabled, user cannot change value there) + GtkSpinButton *l_pSpinButtonChannels = GTK_SPIN_BUTTON(gtk_builder_get_object(m_pBuilderConfigureInterface, "spinbutton_number_of_channels")); + gtk_spin_button_set_value(l_pSpinButtonChannels, l_dNumberOfChannels); + gtk_spin_button_set_range(l_pSpinButtonChannels, l_dNumberOfChannels, l_dNumberOfChannels); + } + if (m_bConnectionOpen) + { + // close connection handle + boolean l_bFunctionReturn = closeDevice(); + if (!l_bFunctionReturn) + { + return false; + } + } + + if(! CConfigurationBuilder::postConfigure()) // normal header is filled (Subject ID, Age, Gender, channels, sampling frequency), ressources are realesed + { + return false; + } + + return true; +} + +boolean CConfigurationgNautilusInterface::openDevice(void) +{ + GDS_ENDPOINT l_epHostEp, l_epLocalEp; + GDS_DEVICE_CONNECTION_INFO *l_pConnectedDevicesInfo; + unsigned __int32 l_ui32DeviceCount; + string l_sDeviceSerial; + BOOL l_bOpenExclusively = true; + BOOL l_bIsCreator; + m_sDeviceNames = new char[1][DEVICE_NAME_LENGTH_MAX]; + + uint8 l_ui8ByteIP[4]; + l_ui8ByteIP[0] = 1; + l_ui8ByteIP[1] = 0; + l_ui8ByteIP[2] = 0; + l_ui8ByteIP[3] = 127; + char l_sTemporaryIP[16]; + + _snprintf_s(l_sTemporaryIP,IP_ADDRESS_LENGTH_MAX,"%d.%d.%d.%d",l_ui8ByteIP[3],l_ui8ByteIP[2],l_ui8ByteIP[1],l_ui8ByteIP[0]); + + for(unsigned __int32 i = 0; i < IP_ADDRESS_LENGTH_MAX; i++) + { + l_epHostEp.IpAddress[i] = l_sTemporaryIP[i]; + l_epLocalEp.IpAddress[i] = l_sTemporaryIP[i]; + } + + l_epHostEp.Port = 50223; + l_epLocalEp.Port = 50224; + + // get connected device + m_oGdsResult = GDS_GetConnectedDevices(l_epHostEp, l_epLocalEp, &l_pConnectedDevicesInfo, &l_ui32DeviceCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + for(unsigned __int32 i = 0; i < l_ui32DeviceCount; i++) + { + // if devices are in use they cannot be used for a new acquisition + if((l_pConnectedDevicesInfo[i].InUse) && (i < l_ui32DeviceCount)) + continue; + // only one device can be used for data acquisition, as g.Nautilus cannot be synchronized + if ((l_pConnectedDevicesInfo[i].InUse) && (l_pConnectedDevicesInfo[i].ConnectedDevicesLength > 1)) + continue; + GDS_DEVICE_INFO *l_pDeviceInfo = l_pConnectedDevicesInfo[i].ConnectedDevices; + if(l_pDeviceInfo[0].DeviceType == GDS_DEVICE_TYPE_GNAUTILUS) + { + l_sDeviceSerial = l_pDeviceInfo[0].Name; + l_ui32DeviceCount = 1; + break; + } + } + + if (l_ui32DeviceCount == 0) + { + return false; + } + + strncpy_s(m_sDeviceNames[0], l_sDeviceSerial.c_str(), DEVICE_NAME_LENGTH_MAX); + m_rDeviceSerial = l_sDeviceSerial; + + // connect to device + m_oGdsResult = GDS_Connect(l_epHostEp, l_epLocalEp, m_sDeviceNames, l_ui32DeviceCount, l_bOpenExclusively, &m_ui64DeviceHandle, &l_bIsCreator); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + m_bConnectionOpen = true; + + return true; +} + +boolean CConfigurationgNautilusInterface::closeDevice(void) +{ + // disconnect device + m_oGdsResult = GDS_Disconnect(&m_ui64DeviceHandle); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + m_bConnectionOpen = false; + delete [] m_sDeviceNames; + + return true; +} \ No newline at end of file diff --git a/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCConfigurationgNautilusInterface.h b/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCConfigurationgNautilusInterface.h new file mode 100644 index 0000000000000000000000000000000000000000..eaac862fde2143aca447e5f92f716612c46e1cd8 --- /dev/null +++ b/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCConfigurationgNautilusInterface.h @@ -0,0 +1,118 @@ +#ifndef __OpenViBE_AcquisitionServer_CConfigurationgNautilusInterface_H__ +#define __OpenViBE_AcquisitionServer_CConfigurationgNautilusInterface_H__ + +#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 // __OpenViBE_AcquisitionServer_CConfigurationgNautilusInterface_H__ diff --git a/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCDrivergNautilusInterface.cpp b/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCDrivergNautilusInterface.cpp new file mode 100644 index 0000000000000000000000000000000000000000..638b02055342f76e3a0fc7056075de75ccce3f29 --- /dev/null +++ b/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCDrivergNautilusInterface.cpp @@ -0,0 +1,513 @@ +#include "ovasCDrivergNautilusInterface.h" +#include "ovasCConfigurationgNautilusInterface.h" + +#include <toolkit/ovtk_all.h> + +using namespace OpenViBEAcquisitionServer; +using namespace OpenViBE; +using namespace OpenViBE::Kernel; +using namespace std; + +//___________________________________________________________________// +// // + +// global functions, event handles and variables +void OnDataReadyEventHandler(GDS_HANDLE connection_handle, void *usr_data); +HANDLE g_oDataReadyEventHandle; + +CDrivergNautilusInterface::CDrivergNautilusInterface(IDriverContext& rDriverContext) + :IDriver(rDriverContext) + ,m_oSettings("AcquisitionServer_Driver_gNautilusInterface", m_rDriverContext.getConfigurationManager()) + ,m_pCallback(NULL) + ,m_ui32SampleCountPerSentBlock(4) //default value, has to correspond to nautilus_device_cfg.NumberOfScans!! + ,m_pSample(NULL) + ,m_ui32DeviceIndex(uint32(-1)) + ,m_ui32BufferSize(0) + ,m_pBuffer(NULL) + ,m_pDevice(NULL) + ,m_i32InputSource(0) + ,m_ui32NetworkChannel(11) + ,m_i32NotchFilterIndex(-1) + ,m_i32BandPassFilterIndex(-1) + ,m_bDigitalInputEnabled(true) + ,m_bNoiseReductionEnabled(false) + ,m_bCAREnabled(false) + ,m_bAccelerationDataEnabled(true) + ,m_bCounterEnabled(true) + ,m_bLinkQualityEnabled(true) + ,m_bBatteryLevelEnabled(true) + ,m_bValidationIndicatorEnabled(true) + ,m_ui32AcquiredChannelCount(32) +{ + m_oHeader.setSamplingFrequency(250); + m_oHeader.setChannelCount(32); + + // The following class allows saving and loading driver settings from the acquisition server .conf file + m_oSettings.add("Header", &m_oHeader); + // To save your custom driver settings, register each variable to the SettingsHelper + //m_oSettings.add("SettingName", &variable); + m_oSettings.add("DeviceIndex", &m_ui32DeviceIndex); + m_oSettings.add("InputSource", &m_i32InputSource); + m_oSettings.add("NetworkChannel", &m_ui32NetworkChannel); + m_oSettings.add("Sensitivity", &m_f64Sensitivity); + m_oSettings.add("NotchFilterIndex", &m_i32NotchFilterIndex); + m_oSettings.add("BandPassFilterIndex", &m_i32BandPassFilterIndex); + m_oSettings.add("DigitalInputEnabled", &m_bDigitalInputEnabled); + m_oSettings.add("NoiseReductionEnabled", &m_bNoiseReductionEnabled); + m_oSettings.add("CAREnabled", &m_bCAREnabled); + m_oSettings.add("AccelerationEnabled", &m_bAccelerationDataEnabled); + m_oSettings.add("CounterEnabled", &m_bCounterEnabled); + m_oSettings.add("LinqQualityEnabled", &m_bLinkQualityEnabled); + m_oSettings.add("BatteryLevelEnabled", &m_bBatteryLevelEnabled); + m_oSettings.add("ValidationIndicatorEnabled", &m_bValidationIndicatorEnabled); + + m_oSettings.load(); +} + +CDrivergNautilusInterface::~CDrivergNautilusInterface(void) +{ +} + +const char* CDrivergNautilusInterface::getName(void) +{ + return "g.tec g.Nautilus using g.NEEDaccess"; +} + +//___________________________________________________________________// +// // + +boolean CDrivergNautilusInterface::initialize( + const uint32 ui32SampleCountPerSentBlock, + IDriverCallback& rCallback) +{ + if(m_rDriverContext.isConnected()) + { + return false; + } + if(!m_oHeader.isChannelCountSet()||!m_oHeader.isSamplingFrequencySet()) + { + return false; + } + + if (ui32SampleCountPerSentBlock > 250) + { + return false; + } + + // initialize basic GDS functions before the first GDS function itself is called + GDS_Initialize(); + + // g.Nautilus provides some extra channel, add them to the channels count + // and provide corresponding names + m_oHeader.setChannelCount(m_ui32AcquiredChannelCount); + if(m_bDigitalInputEnabled) + { + m_oHeader.setChannelCount(m_ui32AcquiredChannelCount+1); + m_oHeader.setChannelName(m_ui32AcquiredChannelCount, "CH_Event"); + m_ui32AcquiredChannelCount = m_oHeader.getChannelCount(); + } + if (m_bAccelerationDataEnabled) + { + m_oHeader.setChannelCount(m_ui32AcquiredChannelCount+3); + m_oHeader.setChannelName(m_ui32AcquiredChannelCount-2, "CH_Accel_x"); + m_oHeader.setChannelName(m_ui32AcquiredChannelCount-1, "CH_Accel_y"); + m_oHeader.setChannelName(m_ui32AcquiredChannelCount, "CH_Accel_z"); + m_ui32AcquiredChannelCount = m_oHeader.getChannelCount(); + } + if(m_bCounterEnabled) + { + m_oHeader.setChannelCount(m_ui32AcquiredChannelCount+1); + m_oHeader.setChannelName(m_ui32AcquiredChannelCount, "CH_Counter"); + m_ui32AcquiredChannelCount = m_oHeader.getChannelCount(); + } + if(m_bLinkQualityEnabled) + { + m_oHeader.setChannelCount(m_ui32AcquiredChannelCount+1); + m_oHeader.setChannelName(m_ui32AcquiredChannelCount, "CH_LQ"); + m_ui32AcquiredChannelCount = m_oHeader.getChannelCount(); + } + if (m_bBatteryLevelEnabled) + { + m_oHeader.setChannelCount(m_ui32AcquiredChannelCount+1); + m_oHeader.setChannelName(m_ui32AcquiredChannelCount, "CH_Battery"); + m_ui32AcquiredChannelCount = m_oHeader.getChannelCount(); + } + if(m_bValidationIndicatorEnabled) + { + m_oHeader.setChannelCount(m_ui32AcquiredChannelCount+1); + m_oHeader.setChannelName(m_ui32AcquiredChannelCount, "CH_Valid"); + m_ui32AcquiredChannelCount = m_oHeader.getChannelCount(); + } + + m_ui32AcquiredChannelCount = m_oHeader.getChannelCount(); + + // initialize connection and open connection handle and get serial of connected g.Nautilus + GDS_DEVICE_CONNECTION_INFO *l_pConnectedDevicesInfo; + OpenViBE::uint32 l_ui32ConnectedDevicesCount = 0; + GDS_ENDPOINT l_epHostEp; + GDS_ENDPOINT l_epLocalEp; + OpenViBE::uint8 l_bByteIP[4]; + char l_sTempIP[16]; + unsigned __int32 i; + + l_bByteIP[0] = 1; + l_bByteIP[1] = 0; + l_bByteIP[2] = 0; + l_bByteIP[3] = 127; + + _snprintf_s(l_sTempIP,IP_ADDRESS_LENGTH_MAX,"%d.%d.%d.%d",l_bByteIP[3],l_bByteIP[2],l_bByteIP[1],l_bByteIP[0]); + + for(i = 0; i < IP_ADDRESS_LENGTH_MAX; i++) + { + l_epHostEp.IpAddress[i] = l_sTempIP[i]; + l_epLocalEp.IpAddress[i] = l_sTempIP[i]; + } + + l_epHostEp.Port = 50223; + l_epLocalEp.Port = 50224; + + OpenViBE::boolean l_bDeviceFound = false; + m_oGdsResult = GDS_GetConnectedDevices(l_epHostEp, l_epLocalEp, &l_pConnectedDevicesInfo, &l_ui32ConnectedDevicesCount); + if(m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + for(i = 0; i < l_ui32ConnectedDevicesCount; i++) + { + // if devices are in use they cannot be used for a new acquisition + if((l_pConnectedDevicesInfo[i].InUse) && (i < l_ui32ConnectedDevicesCount)) + { + continue; + } + // only one device can be used for data acquisition, as g.Nautilus cannot be synchronized + if ((l_pConnectedDevicesInfo[i].InUse) && (l_pConnectedDevicesInfo[i].ConnectedDevicesLength > 1)) + { + continue; + } + GDS_DEVICE_INFO *l_pDeviceInfo = l_pConnectedDevicesInfo[i].ConnectedDevices; + if(l_pDeviceInfo[0].DeviceType == GDS_DEVICE_TYPE_GNAUTILUS) + { + // check if device used for configuration is still available + if (!strcmp(l_pDeviceInfo[0].Name,m_sDeviceSerial.c_str())) + { + m_ui32DeviceCount = 1; + l_bDeviceFound = true; + break; + } + } + } + if(l_bDeviceFound == false) + { + return false; + } + + char (*l_sDeviceNames)[DEVICE_NAME_LENGTH_MAX] = new char[1][DEVICE_NAME_LENGTH_MAX]; + bool l_bOpenExclusively = true; + BOOL l_bIsCreator; + + strncpy_s(l_sDeviceNames[0], m_sDeviceSerial.c_str(), DEVICE_NAME_LENGTH_MAX); + + // connect to device + m_oGdsResult = GDS_Connect(l_epHostEp, l_epLocalEp, l_sDeviceNames, m_ui32DeviceCount, l_bOpenExclusively, &m_pDevice, &l_bIsCreator); + if(m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + // get and set electrode names for selected electrodes + unsigned __int32 l_ui32MountedModulesCount, l_ui32ElectrodeNamesCount; + m_oGdsResult = GDS_GNAUTILUS_GetChannelNames(m_pDevice, l_sDeviceNames, &l_ui32MountedModulesCount, NULL, &l_ui32ElectrodeNamesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + char (*l_sElectrodeNames)[GDS_GNAUTILUS_ELECTRODE_NAME_LENGTH_MAX] = new char[l_ui32ElectrodeNamesCount][GDS_GNAUTILUS_ELECTRODE_NAME_LENGTH_MAX]; + m_oGdsResult = GDS_GNAUTILUS_GetChannelNames(m_pDevice, l_sDeviceNames, &l_ui32MountedModulesCount, l_sElectrodeNames, &l_ui32ElectrodeNamesCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + unsigned __int16 l_ui16SelectedChannelsCount = 0; + + m_oNautilusDeviceCfg.SamplingRate = m_oHeader.getSamplingFrequency(); + m_oNautilusDeviceCfg.NumberOfScans = ui32SampleCountPerSentBlock; + m_oNautilusDeviceCfg.NetworkChannel = m_ui32NetworkChannel; + m_oNautilusDeviceCfg.AccelerationData = m_bAccelerationDataEnabled; + m_oNautilusDeviceCfg.BatteryLevel = m_bBatteryLevelEnabled; + m_oNautilusDeviceCfg.CAR = m_bCAREnabled; + m_oNautilusDeviceCfg.Counter = m_bCounterEnabled; + m_oNautilusDeviceCfg.DigitalIOs = m_bDigitalInputEnabled; + m_oNautilusDeviceCfg.LinkQualityInformation = m_bLinkQualityEnabled; + m_oNautilusDeviceCfg.NoiseReduction = m_bNoiseReductionEnabled; + m_oNautilusDeviceCfg.Slave = 0; + m_oNautilusDeviceCfg.ValidationIndicator = m_bValidationIndicatorEnabled; + m_oNautilusDeviceCfg.InputSignal = GDS_GNAUTILUS_INPUT_SIGNAL(m_i32InputSource); + + for (i = 0; i < GDS_GNAUTILUS_CHANNELS_MAX; i++) + { + if (find(m_vSelectedChannels.begin(),m_vSelectedChannels.end(),(i + 1)) != m_vSelectedChannels.end()) + { + m_oNautilusDeviceCfg.Channels[i].Enabled = true; + } + else + { + m_oNautilusDeviceCfg.Channels[i].Enabled = false; + } + m_oNautilusDeviceCfg.Channels[i].Sensitivity = m_f64Sensitivity; + if (i < m_vCAR.size()) + { + m_oNautilusDeviceCfg.Channels[i].UsedForCar = m_vCAR[i]; + } + else + { + m_oNautilusDeviceCfg.Channels[i].UsedForCar = false; + } + if (i < m_vNoiseReduction.size()) + { + m_oNautilusDeviceCfg.Channels[i].UsedForNoiseReduction = m_vNoiseReduction[i]; + } + else + { + m_oNautilusDeviceCfg.Channels[i].UsedForNoiseReduction = false; + } + m_oNautilusDeviceCfg.Channels[i].BandpassFilterIndex = m_i32BandPassFilterIndex; + m_oNautilusDeviceCfg.Channels[i].NotchFilterIndex = m_i32NotchFilterIndex; + if (i < m_vBipolarChannels.size()) + { + m_oNautilusDeviceCfg.Channels[i].BipolarChannel = m_vBipolarChannels[i]; + } + else + { + m_oNautilusDeviceCfg.Channels[i].BipolarChannel = false; + } + } + + // Builds up a buffer to store + // acquired samples. This buffer + // will be sent to the acquisition + // server later... + + m_pSample=new float[m_ui32AcquiredChannelCount*m_oNautilusDeviceCfg.NumberOfScans]; + if(!m_pSample) + { + delete [] m_pSample; + m_pSample=NULL; + return false; + } + // set up data buffer for gds getdata function + m_pBuffer = new float[m_ui32AcquiredChannelCount*m_oNautilusDeviceCfg.NumberOfScans]; + if(!m_pBuffer) + { + delete [] m_pBuffer; + m_pBuffer = NULL; + return false; + } + m_ui32BufferSize = m_ui32AcquiredChannelCount*m_oNautilusDeviceCfg.NumberOfScans; + + // ... + // initialize hardware and get + // available header information + // from it + // Using for example the connection ID provided by the configuration (m_ui32ConnectionID) + // ... + + // Saves parameters + m_pCallback=&rCallback; + m_ui32SampleCountPerSentBlock=ui32SampleCountPerSentBlock; + return true; +} + +boolean CDrivergNautilusInterface::start(void) +{ + if(!m_rDriverContext.isConnected()) return false; + if(m_rDriverContext.isStarted()) return false; + + // if no device was found return + if (m_ui32DeviceCount != 1) + { + return false; + } + + GDS_CONFIGURATION_BASE *l_oGdsDeviceConfigurations = new GDS_CONFIGURATION_BASE[m_ui32DeviceCount]; + l_oGdsDeviceConfigurations[0].Configuration = &m_oNautilusDeviceCfg; + l_oGdsDeviceConfigurations[0].DeviceInfo.DeviceType = GDS_DEVICE_TYPE_GNAUTILUS; + strcpy_s(l_oGdsDeviceConfigurations[0].DeviceInfo.Name,m_sDeviceSerial.c_str()); + + // TODO: add error handling if gds_result.ErrorCode != 0 + m_oGdsResult = GDS_SetConfiguration(m_pDevice,l_oGdsDeviceConfigurations,m_ui32DeviceCount); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + // initialize data ready event and set data ready event handle + g_oDataReadyEventHandle = NULL; + g_oDataReadyEventHandle = CreateEvent(NULL, false, false, NULL); + m_oGdsResult = GDS_SetDataReadyCallback(m_pDevice, (GDS_Callback)OnDataReadyEventHandler,m_oNautilusDeviceCfg.NumberOfScans,NULL); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + // ... + // request hardware to start + // sending data + // ... + // start acquisition + m_oGdsResult = GDS_StartAcquisition(m_pDevice); + if(m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + // start data stream from server + m_oGdsResult = GDS_StartStreaming(m_pDevice); + if(m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + return true; +} + +boolean CDrivergNautilusInterface::loop(void) +{ + if(!m_rDriverContext.isConnected()) return false; + if(!m_rDriverContext.isStarted()) return true; + + OpenViBE::CStimulationSet l_oStimulationSet; + + // set number of scans getdata function will return + m_ui32AvailableScans = m_oNautilusDeviceCfg.NumberOfScans; + + if(m_rDriverContext.isStarted()) + { + DWORD dw_ret = WaitForSingleObject(g_oDataReadyEventHandle,5000); + if(dw_ret == WAIT_TIMEOUT) + { + // if data ready event is not triggered in 5000ms add a timeout handler + return false; + } + // when data is ready call get data function with amount of scans to return + m_oGdsResult = GDS_GetData(m_pDevice,&m_ui32AvailableScans,m_pBuffer,m_ui32BufferSize); + if(m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + // put data from receiving buffer to application buffer + for(uint32 i=0; i<m_ui32AcquiredChannelCount; i++) + { + for(uint32 j=0; j<m_ui32SampleCountPerSentBlock; j++) + { + m_pSample[i*m_ui32SampleCountPerSentBlock+j]=m_pBuffer[j*(m_ui32AcquiredChannelCount)+i]; + } + } + } + + // ... + // receive samples from hardware + // put them the correct way in the sample array + // whether the buffer is full, send it to the acquisition server + //... + m_pCallback->setSamples(m_pSample); + + // When your sample buffer is fully loaded, + // it is advised to ask the acquisition server + // to correct any drift in the acquisition automatically. + m_rDriverContext.correctDriftSampleCount(m_rDriverContext.getSuggestedDriftCorrectionSampleCount()); + + // ... + // receive events from hardware + // and put them the correct way in a CStimulationSet object + //... + m_pCallback->setStimulationSet(l_oStimulationSet); + + return true; +} + +boolean CDrivergNautilusInterface::stop(void) +{ + if(!m_rDriverContext.isConnected()) return false; + if(!m_rDriverContext.isStarted()) return false; + + // ... + // request the hardware to stop + // sending data + // ... + + + // stop streaming + m_oGdsResult = GDS_StopStreaming(m_pDevice); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + // stop data acquisiton + m_oGdsResult = GDS_StopAcquisition(m_pDevice); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + return true; +} + +boolean CDrivergNautilusInterface::uninitialize(void) +{ + if(!m_rDriverContext.isConnected()) return false; + if(m_rDriverContext.isStarted()) return false; + + // ... + // uninitialize hardware here + // ... + + m_oGdsResult = GDS_Disconnect(&m_pDevice); + if (m_oGdsResult.ErrorCode != GDS_ERROR_SUCCESS) + { + return false; + } + + delete [] m_pSample; + m_pSample=NULL; + m_pCallback=NULL; + + // uninitialize basic GDS functions after last GDS function is called + GDS_Uninitialize(); + + return true; +} + +//___________________________________________________________________// +// // +boolean CDrivergNautilusInterface::isConfigurable(void) +{ + return true; // change to false if your device is not configurable +} + +boolean CDrivergNautilusInterface::configure(void) +{ + // Change this line if you need to specify some references to your driver attribute that need configuration, e.g. the connection ID. + CConfigurationgNautilusInterface m_oConfiguration(m_rDriverContext, OpenViBE::Directories::getDataDir() + "/applications/acquisition-server/interface-gNautilusInterface.ui", + m_sDeviceSerial,m_i32InputSource,m_ui32NetworkChannel,m_i32BandPassFilterIndex,m_i32NotchFilterIndex,m_f64Sensitivity,m_bDigitalInputEnabled, + m_bNoiseReductionEnabled,m_bCAREnabled,m_bAccelerationDataEnabled,m_bCounterEnabled,m_bLinkQualityEnabled,m_bBatteryLevelEnabled, + m_bValidationIndicatorEnabled,m_vSelectedChannels,m_vBipolarChannels,m_vCAR,m_vNoiseReduction); + + if(!m_oConfiguration.configure(m_oHeader)) + { + return false; + } + m_oSettings.save(); + + return true; +} + +void OnDataReadyEventHandler(GDS_HANDLE connection_handle, void *usr_data) +{ + // signals data is ready on GDS acquisition buffer + if(!SetEvent(g_oDataReadyEventHandle)) + { + // insert error handling if necessary + } +} \ No newline at end of file diff --git a/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCDrivergNautilusInterface.h b/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCDrivergNautilusInterface.h new file mode 100644 index 0000000000000000000000000000000000000000..22de8593a77e39c2361e236da700b21f989fe86d --- /dev/null +++ b/contrib/plugins/server-drivers/gtec-gnautilus/src/ovasCDrivergNautilusInterface.h @@ -0,0 +1,111 @@ +#ifndef __OpenViBE_AcquisitionServer_CDrivergNautilusInterface_H__ +#define __OpenViBE_AcquisitionServer_CDrivergNautilusInterface_H__ + +#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 // __OpenViBE_AcquisitionServer_CDrivergNautilusInterface_H__