-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathOpenEphysLib.cpp
More file actions
87 lines (75 loc) · 3.86 KB
/
OpenEphysLib.cpp
File metadata and controls
87 lines (75 loc) · 3.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2013 Open Ephys
------------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <PluginInfo.h>
#include "PosTracker/PosTracker.h"
#include "StereoPos/StereoPos.h"
#include "cvTracking/Trackers.hpp"
#include <string>
#ifdef WIN32
#include <Windows.h>
#define EXPORT __declspec(dllexport)
#else
#define EXPORT __attribute__((visibility("default")))
#endif
using namespace Plugin;
//Number of plugins defined on the library. Can be of different types (Processors, RecordEngines, etc...)
#define NUM_PLUGINS 3
extern "C" EXPORT void getLibInfo(Plugin::LibraryInfo* info)
{
info->apiVersion = PLUGIN_API_VER; /*API version, defined by the GUI source.
Should not be changed to ensure it is always equal to the one used in the latest codebase. The GUI refueses to load plugins with mismatched API versions */
info->name = "Pos Tracker"; //Name of the Library, used only for information
info->libVersion = 1; //Version of the library, used only for information
info->numPlugins = NUM_PLUGINS;
}
extern "C" EXPORT int getPluginInfo(int index, Plugin::PluginInfo* info)
{
switch (index)
{
//one case per plugin. This example is for a processor which connects directly to the signal chain
case 0:
info->type = Plugin::PLUGIN_TYPE_PROCESSOR; //Type of plugin. See "Source/Processors/PluginManager/OpenEphysPlugin.h" for complete info about the different type structures
info->processor.name = "Pos Tracker"; //Processor name shown in the GUI
info->processor.type = Plugin::SourceProcessor; //Type of processor. Can be FilterProcessor, SourceProcessor, SinkProcessor or UtilityProcessor. Specifies where on the processor list will appear
info->processor.creator = &(Plugin::createProcessor<PosTracker>); //Class factory pointer. Replace "ExampleProcessor" with the name of your class.
break;
case 1:
info->type = Plugin::PLUGIN_TYPE_PROCESSOR; //Type of plugin. See "Source/Processors/PluginManager/OpenEphysPlugin.h" for complete info about the different type structures
info->processor.name = "Stereo Pos"; //Processor name shown in the GUI
info->processor.type = Plugin::FilterProcessor; //Type of processor. Can be FilterProcessor, SourceProcessor, SinkProcessor or UtilityProcessor. Specifies where on the processor list will appear
info->processor.creator = &(Plugin::createProcessor<StereoPos>); //Class factory pointer. Replace "ExampleProcessor" with the name of your class.
break;
case 2:
info->type = Plugin::PLUGIN_TYPE_PROCESSOR; //Type of plugin. See "Source/Processors/PluginManager/OpenEphysPlugin.h" for complete info about the different type structures
info->processor.name = "Tracking API"; //Processor name shown in the GUI
info->processor.type = Plugin::FilterProcessor; //Type of processor. Can be FilterProcessor, SourceProcessor, SinkProcessor or UtilityProcessor. Specifies where on the processor list will appear
info->processor.creator = &(Plugin::createProcessor<Trackers>); //Class factory pointer. Replace "ExampleProcessor" with the name of your class.
break;
default:
return -1;
break;
}
return 0;
}
#ifdef WIN32
BOOL WINAPI DllMain(IN HINSTANCE hDllHandle,
IN DWORD nReason,
IN LPVOID Reserved)
{
return TRUE;
}
#endif