Skip to content

Commit 8f1f632

Browse files
committed
Add Intan Recording Controller plugin
1 parent fee60f9 commit 8f1f632

16 files changed

Lines changed: 10243 additions & 1 deletion
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|x64">
9+
<Configuration>Debug</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Release|Win32">
13+
<Configuration>Release</Configuration>
14+
<Platform>Win32</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<ProjectGuid>{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}</ProjectGuid>
23+
<RootNamespace>RecordingController</RootNamespace>
24+
<ProjectName>IntanRecordingController</ProjectName>
25+
</PropertyGroup>
26+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
28+
<ConfigurationType>DynamicLibrary</ConfigurationType>
29+
<UseDebugLibraries>true</UseDebugLibraries>
30+
<PlatformToolset>v120</PlatformToolset>
31+
<CharacterSet>MultiByte</CharacterSet>
32+
</PropertyGroup>
33+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
34+
<ConfigurationType>DynamicLibrary</ConfigurationType>
35+
<UseDebugLibraries>true</UseDebugLibraries>
36+
<PlatformToolset>v120</PlatformToolset>
37+
<CharacterSet>MultiByte</CharacterSet>
38+
</PropertyGroup>
39+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
40+
<ConfigurationType>Application</ConfigurationType>
41+
<UseDebugLibraries>false</UseDebugLibraries>
42+
<PlatformToolset>v120</PlatformToolset>
43+
<WholeProgramOptimization>true</WholeProgramOptimization>
44+
<CharacterSet>MultiByte</CharacterSet>
45+
</PropertyGroup>
46+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
47+
<ConfigurationType>Application</ConfigurationType>
48+
<UseDebugLibraries>false</UseDebugLibraries>
49+
<PlatformToolset>v120</PlatformToolset>
50+
<WholeProgramOptimization>true</WholeProgramOptimization>
51+
<CharacterSet>MultiByte</CharacterSet>
52+
</PropertyGroup>
53+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
54+
<ImportGroup Label="ExtensionSettings">
55+
</ImportGroup>
56+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
57+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
58+
<Import Project="..\Plugin_Debug32.props" />
59+
</ImportGroup>
60+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
<Import Project="..\Plugin_Debug64.props" />
63+
</ImportGroup>
64+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
65+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66+
<Import Project="..\Plugin_Release32.props" />
67+
</ImportGroup>
68+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
69+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70+
<Import Project="..\Plugin_Release64.props" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup />
74+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
75+
<ClCompile>
76+
<WarningLevel>Level3</WarningLevel>
77+
<Optimization>Disabled</Optimization>
78+
<SDLCheck>false</SDLCheck>
79+
</ClCompile>
80+
<Link>
81+
<GenerateDebugInformation>true</GenerateDebugInformation>
82+
<AdditionalDependencies>okFrontPanel.lib;open-ephys.lib;setupapi.lib;opengl32.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
83+
<AdditionalLibraryDirectories>$(GUIDir);$(OutDir);../../../../Resources/DLLs/VS2013</AdditionalLibraryDirectories>
84+
</Link>
85+
</ItemDefinitionGroup>
86+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
87+
<ClCompile>
88+
<WarningLevel>Level3</WarningLevel>
89+
<Optimization>Disabled</Optimization>
90+
<SDLCheck>false</SDLCheck>
91+
</ClCompile>
92+
<Link>
93+
<GenerateDebugInformation>true</GenerateDebugInformation>
94+
<AdditionalDependencies>okFrontPanel.lib;open-ephys.lib;setupapi.lib;opengl32.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
95+
<AdditionalLibraryDirectories>$(GUIDir);$(OutDir);../../../../Resources/DLLs/VS2013-x64</AdditionalLibraryDirectories>
96+
</Link>
97+
</ItemDefinitionGroup>
98+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
99+
<ClCompile>
100+
<WarningLevel>Level3</WarningLevel>
101+
<Optimization>MaxSpeed</Optimization>
102+
<FunctionLevelLinking>true</FunctionLevelLinking>
103+
<IntrinsicFunctions>true</IntrinsicFunctions>
104+
<SDLCheck>false</SDLCheck>
105+
</ClCompile>
106+
<Link>
107+
<GenerateDebugInformation>true</GenerateDebugInformation>
108+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
109+
<OptimizeReferences>true</OptimizeReferences>
110+
<AdditionalDependencies>okFrontPanel.lib;open-ephys.lib;setupapi.lib;opengl32.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
111+
<AdditionalLibraryDirectories>$(GUIDir);$(OutDir);../../../../Resources/DLLs/VS2013</AdditionalLibraryDirectories>
112+
</Link>
113+
</ItemDefinitionGroup>
114+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
115+
<ClCompile>
116+
<WarningLevel>Level3</WarningLevel>
117+
<Optimization>MaxSpeed</Optimization>
118+
<FunctionLevelLinking>true</FunctionLevelLinking>
119+
<IntrinsicFunctions>true</IntrinsicFunctions>
120+
<SDLCheck>false</SDLCheck>
121+
</ClCompile>
122+
<Link>
123+
<GenerateDebugInformation>true</GenerateDebugInformation>
124+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
125+
<OptimizeReferences>true</OptimizeReferences>
126+
<AdditionalDependencies>okFrontPanel.lib;open-ephys.lib;setupapi.lib;opengl32.lib;glu32.lib;%(AdditionalDependencies)</AdditionalDependencies>
127+
<AdditionalLibraryDirectories>$(GUIDir);$(OutDir);../../../../Resources/DLLs/VS2013-x64</AdditionalLibraryDirectories>
128+
</Link>
129+
</ItemDefinitionGroup>
130+
<ItemGroup>
131+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\OpenEphysLib.cpp" />
132+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\RHD2000Editor.cpp" />
133+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\RHD2000Thread.cpp" />
134+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000datablockusb3.cpp" />
135+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000evalboardusb3.cpp" />
136+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000registersusb3.cpp" />
137+
</ItemGroup>
138+
<ItemGroup>
139+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\RHD2000Editor.h" />
140+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\RHD2000Thread.h" />
141+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\okFrontPanelDLL.h" />
142+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000datablockusb3.h" />
143+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000evalboardusb3.h" />
144+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000registersusb3.h" />
145+
</ItemGroup>
146+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
147+
<ImportGroup Label="ExtensionTargets">
148+
</ImportGroup>
149+
</Project>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
<Filter Include="Source Files\rhythm-api">
17+
<UniqueIdentifier>{35e16920-0815-44c8-bc78-2f8ab27244af}</UniqueIdentifier>
18+
</Filter>
19+
</ItemGroup>
20+
<ItemGroup>
21+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\OpenEphysLib.cpp">
22+
<Filter>Source Files</Filter>
23+
</ClCompile>
24+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\RHD2000Editor.cpp">
25+
<Filter>Source Files</Filter>
26+
</ClCompile>
27+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\RHD2000Thread.cpp">
28+
<Filter>Source Files</Filter>
29+
</ClCompile>
30+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000datablockusb3.cpp">
31+
<Filter>Source Files\rhythm-api</Filter>
32+
</ClCompile>
33+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000evalboardusb3.cpp">
34+
<Filter>Source Files\rhythm-api</Filter>
35+
</ClCompile>
36+
<ClCompile Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000registersusb3.cpp">
37+
<Filter>Source Files\rhythm-api</Filter>
38+
</ClCompile>
39+
</ItemGroup>
40+
<ItemGroup>
41+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\RHD2000Editor.h">
42+
<Filter>Source Files</Filter>
43+
</ClInclude>
44+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\RHD2000Thread.h">
45+
<Filter>Source Files</Filter>
46+
</ClInclude>
47+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\okFrontPanelDLL.h">
48+
<Filter>Source Files\rhythm-api</Filter>
49+
</ClInclude>
50+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000datablockusb3.h">
51+
<Filter>Source Files\rhythm-api</Filter>
52+
</ClInclude>
53+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000evalboardusb3.h">
54+
<Filter>Source Files\rhythm-api</Filter>
55+
</ClInclude>
56+
<ClInclude Include="..\..\..\..\Source\Plugins\IntanRecordingController\rhythm-api\rhd2000registersusb3.h">
57+
<Filter>Source Files\rhythm-api</Filter>
58+
</ClInclude>
59+
</ItemGroup>
60+
</Project>

Builds/VisualStudio2013/Plugins/Plugins.sln

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.40629.0
4+
VisualStudioVersion = 12.0.31101.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KWIKFormat", "KWIKFormat\KWIKFormat.vcxproj", "{554C8744-32CD-427C-A9E5-BF9A44440CED}"
77
ProjectSection(ProjectDependencies) = postProject
@@ -57,6 +57,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LFP_Viewer", "LFP_Viewer\LF
5757
EndProject
5858
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RhythmNode", "RhythmNode\RhythmNode.vcxproj", "{3FFC6E87-5767-4245-9760-249E239965AB}"
5959
EndProject
60+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IntanRecordingController", "IntanRecordingController\IntanRecordingController.vcxproj", "{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}"
61+
EndProject
6062
Global
6163
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6264
Debug|Mixed Platforms = Debug|Mixed Platforms
@@ -319,6 +321,18 @@ Global
319321
{3FFC6E87-5767-4245-9760-249E239965AB}.Release|Win32.Build.0 = Release|Win32
320322
{3FFC6E87-5767-4245-9760-249E239965AB}.Release|x64.ActiveCfg = Release|x64
321323
{3FFC6E87-5767-4245-9760-249E239965AB}.Release|x64.Build.0 = Release|x64
324+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
325+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Debug|Mixed Platforms.Build.0 = Debug|Win32
326+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Debug|Win32.ActiveCfg = Debug|Win32
327+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Debug|Win32.Build.0 = Debug|Win32
328+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Debug|x64.ActiveCfg = Debug|x64
329+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Debug|x64.Build.0 = Debug|x64
330+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Release|Mixed Platforms.ActiveCfg = Release|Win32
331+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Release|Mixed Platforms.Build.0 = Release|Win32
332+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Release|Win32.ActiveCfg = Release|Win32
333+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Release|Win32.Build.0 = Release|Win32
334+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Release|x64.ActiveCfg = Release|x64
335+
{6BA7767C-DBDA-44DF-8095-220FD1E2D91A}.Release|x64.Build.0 = Release|x64
322336
EndGlobalSection
323337
GlobalSection(SolutionProperties) = preSolution
324338
HideSolutionNode = FALSE
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
LIBNAME := $(notdir $(CURDIR))
3+
OBJDIR := $(OBJDIR)/$(LIBNAME)
4+
TARGET := $(LIBNAME).so
5+
6+
LDFLAGS := $(LDFLAGS) -lokFrontPanel
7+
8+
SRC_DIR := ${shell find ./ -type d -print}
9+
VPATH := $(SOURCE_DIRS)
10+
11+
SRC := $(foreach sdir,$(SRC_DIR),$(wildcard $(sdir)/*.cpp))
12+
OBJ := $(addprefix $(OBJDIR)/,$(notdir $(SRC:.cpp=.o)))
13+
14+
BLDCMD := $(CXX) -shared -o $(OUTDIR)/$(TARGET) $(OBJ) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
15+
16+
VPATH = $(SRC_DIR)
17+
18+
.PHONY: objdir
19+
20+
$(OUTDIR)/$(TARGET): objdir $(OBJ)
21+
-@mkdir -p $(BINDIR)
22+
-@mkdir -p $(LIBDIR)
23+
-@mkdir -p $(OUTDIR)
24+
@echo "Building $(TARGET)"
25+
@$(BLDCMD)
26+
27+
$(OBJDIR)/%.o : %.cpp
28+
@echo "Compiling $<"
29+
@$(CXX) $(CXXFLAGS) -o "$@" -c "$<"
30+
31+
32+
objdir:
33+
-@mkdir -p $(OBJDIR)
34+
35+
clean:
36+
@echo "Cleaning $(LIBNAME)"
37+
-@rm -rf $(OBJDIR)
38+
-@rm -f $(OUTDIR)/$(TARGET)
39+
40+
-include $(OBJ:%.o=%.d)
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
------------------------------------------------------------------
3+
4+
This file is part of the Open Ephys GUI
5+
Copyright (C) 2013 Open Ephys
6+
7+
------------------------------------------------------------------
8+
9+
This program is free software: you can redistribute it and/or modify
10+
it under the terms of the GNU General Public License as published by
11+
the Free Software Foundation, either version 3 of the License, or
12+
(at your option) any later version.
13+
14+
This program is distributed in the hope that it will be useful,
15+
but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
GNU General Public License for more details.
18+
19+
You should have received a copy of the GNU General Public License
20+
along with this program. If not, see <http://www.gnu.org/licenses/>.
21+
22+
*/
23+
24+
#include <PluginInfo.h>
25+
#include "RHD2000Thread.h"
26+
#include <string>
27+
#ifdef WIN32
28+
#include <Windows.h>
29+
#define EXPORT __declspec(dllexport)
30+
#else
31+
#define EXPORT __attribute__((visibility("default")))
32+
#endif
33+
34+
using namespace Plugin;
35+
#define NUM_PLUGINS 1
36+
37+
extern "C" EXPORT void getLibInfo(Plugin::LibraryInfo* info)
38+
{
39+
info->apiVersion = PLUGIN_API_VER;
40+
info->name = "Intan Recording Controller";
41+
info->libVersion = 1;
42+
info->numPlugins = NUM_PLUGINS;
43+
}
44+
45+
extern "C" EXPORT int getPluginInfo(int index, Plugin::PluginInfo* info)
46+
{
47+
switch (index)
48+
{
49+
case 0:
50+
info->type = Plugin::PLUGIN_TYPE_DATA_THREAD;
51+
info->dataThread.name = "Intan Rec. Controller";
52+
info->dataThread.creator = &createDataThread<RHD2000Thread>;
53+
break;
54+
default:
55+
return -1;
56+
break;
57+
}
58+
return 0;
59+
}
60+
61+
#ifdef WIN32
62+
BOOL WINAPI DllMain(IN HINSTANCE hDllHandle,
63+
IN DWORD nReason,
64+
IN LPVOID Reserved)
65+
{
66+
return TRUE;
67+
}
68+
69+
#endif

0 commit comments

Comments
 (0)