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
62c5a7a1
Commit
62c5a7a1
authored
10 years ago
by
Aaron Cuevas Lopez
Browse files
Options
Downloads
Patches
Plain Diff
Document RecordEngine header
parent
28c5a047
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Processors/RecordEngine.h
+72
-4
72 additions, 4 deletions
Source/Processors/RecordEngine.h
Source/Processors/RecordNode.h
+18
-0
18 additions, 0 deletions
Source/Processors/RecordNode.h
with
90 additions
and
4 deletions
Source/Processors/RecordEngine.h
+
72
−
4
View file @
62c5a7a1
...
...
@@ -45,24 +45,92 @@ class RecordEngine : public AccessClass
public:
RecordEngine
();
~
RecordEngine
();
/** All the public methods are called by RecordNode:
When acquisition starts (in the specified order):
1-resetChannels
2-registerProcessor, addChannel, registerSpikeSource, addspikeelectrode
3-startAcquisition
When recording starts (in the specified order):
1-directoryChanged (if needed)
2-openFiles
During recording:
writeData, writeEvent, writeSpike, updateTimeStamp
When recording stops:
closeFiles
*/
/** Called when recording starts to open all needed files
*/
virtual
void
openFiles
(
File
rootFolder
,
int
experimentNumber
,
int
recordingNumber
)
=
0
;
/** Called when recording stops to close all files
and do all the necessary cleanups
*/
virtual
void
closeFiles
()
=
0
;
/** Write continuous data.
This method gets the full data buffer, it must query getRecordState for
each registered channel to determine which channels to actually write to disk
*/
virtual
void
writeData
(
AudioSampleBuffer
&
buffer
,
int
nSamples
)
=
0
;
/** Write a single event to disk.
*/
virtual
void
writeEvent
(
int
eventType
,
MidiMessage
&
event
,
int
samplePosition
)
=
0
;
virtual
void
addChannel
(
int
index
,
Channel
*
chan
)
=
0
;
/** Called when acquisition starts once for each processor that might record continuous data
*/
virtual
void
registerProcessor
(
GenericProcessor
*
processor
);
/** Called after registerProcessor, once for each output
channel of the processor
*/
virtual
void
addChannel
(
int
index
,
Channel
*
chan
)
=
0
;
/** Called when acquisition starts once for each processor that might record spikes
*/
virtual
void
registerSpikeSource
(
GenericProcessor
*
processor
);
/** Called after registerSpikesource, once for each channel group
*/
virtual
void
addSpikeElectrode
(
int
index
,
SpikeRecordInfo
*
elec
)
=
0
;
/** Write a spike to disk
*/
virtual
void
writeSpike
(
const
SpikeObject
&
spike
,
int
electrodeIndex
)
=
0
;
virtual
void
registerProcessor
(
GenericProcessor
*
processor
);
virtual
void
registerSpikeSource
(
GenericProcessor
*
processor
);
/** Called when a new acquisition starts, to clean all channel data
before registering the processors
*/
virtual
void
resetChannels
();
/** Called every time a new timestamp event is received
*/
virtual
void
updateTimeStamp
(
int64
timestamp
);
/** Called after all channels and spike groups have been registered,
just before acquisition starts
*/
virtual
void
startAcquisition
();
/** Called when the recording directory changes during an acquisition
*/
virtual
void
directoryChanged
();
protected:
/** Functions to access RecordNode arrays and utilities
*/
/** Gets the specified channel from the channel array stored in RecordNode
*/
Channel
*
getChannel
(
int
index
);
/** Gets the specified channel group info structure from the array stored in RecordNode
*/
SpikeRecordInfo
*
getSpikeElectrode
(
int
index
);
/** Generate a Matlab-compatible datestring
*/
String
generateDateString
();
private:
...
...
This diff is collapsed.
Click to expand it.
Source/Processors/RecordNode.h
+
18
−
0
View file @
62c5a7a1
...
...
@@ -72,12 +72,18 @@ public:
*/
void
setParameter
(
int
parameterIndex
,
float
newValue
);
/** Called by the processor graph for each processor that could record data
*/
void
registerProcessor
(
GenericProcessor
*
sourceNode
);
/** Called by the processor graph for each recordable channel
*/
void
addInputChannel
(
GenericProcessor
*
sourceNode
,
int
chan
);
bool
enable
();
bool
disable
();
/** Get channel stored in channelPointers array
*/
Channel
*
getDataChannel
(
int
index
);
/** Called by the ControlPanel to determine the amount of space
...
...
@@ -113,14 +119,26 @@ public:
return
rootFolder
;
}
/** Adds a Record Engine to use
*/
void
registerRecordEngine
(
RecordEngine
*
engine
);
/** Clears the list of active Record Engines
*/
void
clearRecordEngines
();
/** Must be called by a spike recording source on the "enable" method
*/
void
registerSpikeSource
(
GenericProcessor
*
processor
);
/** Registers an electrode group for spike recording
Must be called by a spike recording source on the "enable" method
after the call to registerSpikeSource
*/
int
addSpikeElectrode
(
SpikeRecordInfo
*
elec
);
/** Called by a spike recording source to write a spike to file
*/
void
writeSpike
(
SpikeObject
&
spike
,
int
electrodeIndex
);
SpikeRecordInfo
*
getSpikeElectrode
(
int
index
);
...
...
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