Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin-GUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yehaojie
plugin-GUI
Commits
9e51406a
Commit
9e51406a
authored
12 years ago
by
jsiegle
Browse files
Options
Downloads
Patches
Plain Diff
Removed obsolete Configuration class
parent
c8f84e6d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Source/Processors/GenericProcessor.h
+0
-1
0 additions, 1 deletion
Source/Processors/GenericProcessor.h
Source/UI/Configuration.cpp
+0
-65
0 additions, 65 deletions
Source/UI/Configuration.cpp
Source/UI/Configuration.h
+0
-235
0 additions, 235 deletions
Source/UI/Configuration.h
with
0 additions
and
301 deletions
Source/Processors/GenericProcessor.h
+
0
−
1
View file @
9e51406a
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include
"../../JuceLibraryCode/JuceHeader.h"
#include
"../../JuceLibraryCode/JuceHeader.h"
#include
"Editors/GenericEditor.h"
#include
"Editors/GenericEditor.h"
#include
"../UI/Configuration.h"
#include
"../AccessClass.h"
#include
"../AccessClass.h"
#include
<time.h>
#include
<time.h>
#include
<stdio.h>
#include
<stdio.h>
...
...
This diff is collapsed.
Click to expand it.
Source/UI/Configuration.cpp
deleted
100644 → 0
+
0
−
65
View file @
c8f84e6d
/*
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2012 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
"Configuration.h"
DataSource
::
DataSource
(
GenericProcessor
*
p
,
Configuration
*
c
)
{
processor
=
p
;
name
=
p
->
getName
();
id
=
p
->
getNodeId
();
firstChan
=
0
;
for
(
int
n
=
0
;
n
<
c
->
numDataSources
();
n
++
)
{
firstChan
+=
c
->
getSource
(
n
)
->
getNumChans
();
}
numChans
=
p
->
getNumOutputs
();
nextAvailableChan
=
firstChan
;
channelMapping
.
ensureStorageAllocated
(
numChans
);
totalElectrodes
=
0
;
}
void
Configuration
::
removeDataSource
(
GenericProcessor
*
p
)
{
std
::
cout
<<
"Removing data source from configuration!"
<<
std
::
endl
;
for
(
int
n
=
0
;
n
<
numDataSources
();
n
++
)
{
GenericProcessor
*
gp
=
(
GenericProcessor
*
)
getSource
(
n
)
->
getProcessor
();
if
(
gp
==
p
)
dataSources
.
remove
(
n
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Source/UI/Configuration.h
deleted
100644 → 0
+
0
−
235
View file @
c8f84e6d
/*
------------------------------------------------------------------
This file is part of the Open Ephys GUI
Copyright (C) 2012 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/>.
*/
#ifndef __CONFIGURATION_H_9DEA9372__
#define __CONFIGURATION_H_9DEA9372__
#include
"../../JuceLibraryCode/JuceHeader.h"
#include
"../Processors/GenericProcessor.h"
/**
Holds configuration information for the signal chain.
The Configuration can be accessed by all processors in order to
update channel names, electrode groupings, and acquisition parameters.
@see UIComponent, GenericProcessor
*/
class
GenericProcessor
;
class
Configuration
;
class
Trode
{
public:
Trode
(
int
nchans
,
int
startChan
,
String
name_
)
{
name
=
name_
;
for
(
int
n
=
0
;
n
<
nchans
;
n
++
)
{
channelMapping
.
add
(
startChan
++
);
inputRange
.
add
(
10000.0
);
threshold
.
add
(
5000.0
);
isActive
.
add
(
true
);
}
}
~
Trode
()
{}
int
numChannels
()
{
return
channelMapping
.
size
();}
void
setChannel
(
int
wire
,
int
chan
)
{
if
(
checkWire
(
wire
))
channelMapping
.
set
(
wire
,
chan
);
}
void
setThreshold
(
int
wire
,
float
thresh
)
{
if
(
checkWire
(
wire
))
threshold
.
set
(
wire
,
thresh
);
}
void
setInputRange
(
int
wire
,
float
inRange
)
{
if
(
checkWire
(
wire
))
inputRange
.
set
(
wire
,
inRange
);
}
void
setState
(
int
wire
,
bool
state
)
{
if
(
checkWire
(
wire
))
isActive
.
set
(
wire
,
state
);
}
int
getChannel
(
int
wire
)
{
if
(
checkWire
(
wire
))
return
channelMapping
[
wire
];
else
return
-
1
;
}
float
getThreshold
(
int
wire
)
{
if
(
checkWire
(
wire
))
return
threshold
[
wire
];
else
return
-
1
;
}
float
getInputRange
(
int
wire
)
{
if
(
checkWire
(
wire
))
return
inputRange
[
wire
];
else
return
-
1
;
}
bool
getState
(
int
wire
)
{
if
(
checkWire
(
wire
))
return
isActive
[
wire
];
else
return
false
;
}
int
*
getRawDataPointer
()
{
return
channelMapping
.
getRawDataPointer
();
}
String
getName
()
{
return
name
;}
private
:
Array
<
int
,
CriticalSection
>
channelMapping
;
Array
<
float
,
CriticalSection
>
threshold
;
Array
<
float
,
CriticalSection
>
inputRange
;
Array
<
bool
,
CriticalSection
>
isActive
;
String
name
;
bool
checkWire
(
int
wire
)
{
if
(
wire
<
channelMapping
.
size
()
&&
wire
>
-
1
)
return
true
;
else
return
false
;
}
};
class
DataSource
{
public:
DataSource
(
GenericProcessor
*
p
,
Configuration
*
c
);
~
DataSource
()
{}
GenericProcessor
*
getProcessor
()
{
return
processor
;}
int
numTetrodes
()
{
return
tetrodes
.
size
();}
int
numStereotrodes
()
{
return
stereotrodes
.
size
();}
int
numSingleWires
()
{
return
singleWires
.
size
();}
int
getElectrodeNumberForChannel
(
int
chan
)
{
return
channelMapping
[
chan
];
}
Trode
*
getTetrode
(
int
n
)
{
return
tetrodes
[
n
];}
Trode
*
getStereotrode
(
int
n
)
{
return
stereotrodes
[
n
];}
Trode
*
getSingleWire
(
int
n
)
{
return
singleWires
[
n
];}
void
addTrode
(
int
numChannels
,
String
name_
)
{
Trode
*
t
=
new
Trode
(
numChannels
,
nextAvailableChan
,
name_
);
for
(
int
n
=
0
;
n
<
numChannels
;
n
++
)
{
channelMapping
.
set
(
nextAvailableChan
++
,
totalElectrodes
);
}
totalElectrodes
++
;
if
(
t
->
numChannels
()
==
1
)
singleWires
.
add
(
t
);
else
if
(
t
->
numChannels
()
==
2
)
stereotrodes
.
add
(
t
);
else
if
(
t
->
numChannels
()
==
4
)
tetrodes
.
add
(
t
);
}
String
getName
()
{
return
name
;}
int
getNumChans
()
{
return
numChans
;}
int
getFirstChan
()
{
return
firstChan
;}
int
id
;
private
:
String
name
;
OwnedArray
<
Trode
,
CriticalSection
>
tetrodes
;
OwnedArray
<
Trode
,
CriticalSection
>
stereotrodes
;
OwnedArray
<
Trode
,
CriticalSection
>
singleWires
;
Array
<
int
,
CriticalSection
>
channelMapping
;
int
totalElectrodes
;
int
firstChan
;
int
numChans
;
int
nextAvailableChan
;
GenericProcessor
*
processor
;
};
class
Configuration
{
public:
Configuration
()
{};
~
Configuration
()
{};
void
removeDataSource
(
GenericProcessor
*
);
int
numDataSources
()
{
return
dataSources
.
size
();}
DataSource
*
getSource
(
int
sourceNum
)
{
return
dataSources
[
sourceNum
];}
void
addDataSource
(
DataSource
*
d
)
{
std
::
cout
<<
"New data source added."
<<
std
::
endl
;
dataSources
.
add
(
d
);
}
private
:
OwnedArray
<
DataSource
,
CriticalSection
>
dataSources
;
};
#endif // __CONFIGURATION_H_9DEA9372__
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment