Open Ephys GUI
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions
RecordNode Class Reference

Receives inputs from all processors that want to save their data. More...

#include <RecordNode.h>

Inheritance diagram for RecordNode:
GenericProcessor AccessClass

List of all members.

Public Member Functions

 RecordNode ()
 ~RecordNode ()
void process (AudioSampleBuffer &buffer, MidiBuffer &eventBuffer, int &nSamples)
 Handle incoming data and decide which files and events to write to disk.
void setParameter (int parameterIndex, float newValue)
 Overrides implementation in GenericProcessor; used to change recording parameters on the fly.
void addInputChannel (GenericProcessor *sourceNode, int chan)
bool enable ()
bool disable ()
float getFreeSpace ()
 Called by the ControlPanel to determine the amount of space left in the current dataDirectory.
void setChannel (Channel *ch)
 Selects a channel relative to a particular processor with ID = id.
void setChannelStatus (Channel *ch, bool status)
 Turns recording on and off for a particular channel.
void resetConnections ()
 Used to clear all connections prior to the start of acquisition.
void filenameComponentChanged (FilenameComponent *)
 Callback to indicate when user has chosen a new data directory.
void createNewDirectory ()
 Creates a new data directory in the location specified by the fileNameComponent.
- Public Member Functions inherited from GenericProcessor
 GenericProcessor (const String &name_)
virtual ~GenericProcessor ()
const String getName () const
virtual void prepareToPlay (double sampleRate, int estimatedSamplesPerBlock)
void releaseResources ()
virtual AudioProcessorEditor * createEditor ()
bool hasEditor () const
void reset ()
void setCurrentProgramStateInformation (const void *data, int sizeInBytes)
void setStateInformation (const void *data, int sizeInBytes)
void getCurrentProgramStateInformation (MemoryBlock &destData)
void getStateInformation (MemoryBlock &destData)
void changeProgramName (int index, const String &newName)
void setCurrentProgram (int index)
const String getInputChannelName (int channelIndex) const
const String getOutputChannelName (int channelIndex) const
const String getParameterName (int parameterIndex)
const String getParameterText (int parameterIndex)
const String getProgramName (int index)
bool isInputChannelStereoPair (int index) const
bool isOutputChannelStereoPair (int index) const
bool acceptsMidi () const
bool producesMidi () const
bool isParameterAutomatable (int parameterIndex)
bool isMetaParameter (int parameterIndex)
int getNumParameters ()
int getNumPrograms ()
int getCurrentProgram ()
float getParameter (int parameterIndex)
ParametergetParameterByName (String parameterName)
ParametergetParameterReference (int parameterIndex)
virtual float getSampleRate ()
virtual float getDefaultSampleRate ()
virtual int getNumInputs ()
virtual int getNumOutputs ()
virtual int getDefaultNumOutputs ()
virtual float getDefaultBitVolts ()
virtual int getNextChannel (bool)
virtual void setCurrentChannel (int chan)
int getNodeId ()
void setNodeId (int id)
GenericProcessorgetSourceNode ()
GenericProcessorgetDestNode ()
virtual void switchIO (int)
virtual void switchIO ()
virtual void setPathToProcessor (GenericProcessor *p)
virtual void setSourceNode (GenericProcessor *sn)
virtual void setDestNode (GenericProcessor *dn)
virtual void setMergerSourceNode (GenericProcessor *sn)
virtual void setSplitterDestNode (GenericProcessor *dn)
virtual bool isSource ()
virtual bool isSink ()
virtual bool isSplitter ()
virtual bool isMerger ()
virtual bool canSendSignalTo (GenericProcessor *)
virtual bool isReady ()
virtual void enableEditor ()
virtual void disableEditor ()
virtual bool enabledState ()
virtual void enabledState (bool t)
virtual void enableCurrentChannel (bool)
virtual bool stillHasSource ()
virtual AudioSampleBuffer * getContinuousBuffer ()
virtual MidiBuffer * getEventBuffer ()
virtual int checkForEvents (MidiBuffer &mb)
virtual void addEvent (MidiBuffer &mb, uint8 type, int sampleNum, uint8 eventID=0, uint8 eventChannel=0, uint8 numBytes=0, uint8 *data=0)
virtual GenericEditorgetEditor ()
virtual void clearSettings ()
virtual void update ()
virtual void updateSettings ()
void setStartChannel (int i)
int getStartChannel ()
- Public Member Functions inherited from AccessClass
 AccessClass ()
 ~AccessClass ()
void setUIComponent (UIComponent *)
 Sets the object's UIComponent and copies all the necessary pointers from the UIComponent.
virtual void updateChildComponents ()
 Called within setUIComponent() to enable subclasses to update their members' pointers.
EditorViewportgetEditorViewport ()
 Returns a pointer to the application's EditorViewport.
DataViewportgetDataViewport ()
 Returns a pointer to the application's DataViewport.
ProcessorListgetProcessorList ()
 Returns a pointer to the application's ProcessorList.
ProcessorGraphgetProcessorGraph ()
 Returns a pointer to the application's ProcessorGraph.
ControlPanelgetControlPanel ()
 Returns a pointer to the application's DataViewport.
MessageCentergetMessageCenter ()
 Returns a pointer to the application's MessageCenter.
UIComponentgetUIComponent ()
 Returns a pointer to the application's UIComponent.
AudioComponentgetAudioComponent ()
 Returns a pointer to the application's AudioComponent.

Additional Inherited Members

- Public Types inherited from GenericProcessor
enum  eventTypes {
  TIMESTAMP = 0, BUFFER_SIZE = 1, PARAMETER_CHANGE = 2, TTL = 3,
  SPIKE = 4, EEG = 5, CONTINUOUS = 6
}
enum  eventChannelTypes { GENERIC_EVENT = 999, SINGLE_ELECTRODE = 1, STEREOTRODE = 2, TETRODE = 4 }
- Public Attributes inherited from GenericProcessor
GenericProcessorsourceNode
GenericProcessordestNode
bool isEnabled
bool wasConnected
int nextAvailableChannel
int saveOrder
int loadOrder
int currentChannel
ScopedPointer< GenericEditoreditor
OwnedArray< Channelchannels
OwnedArray< ChanneleventChannels
ProcessorSettings settings
int nodeId
Array< Parameterparameters
StringArray parameterNames
Parameter nullParam

Detailed Description

Receives inputs from all processors that want to save their data.

Writes data to disk using fwrite.

Receives a signal from the ControlPanel to begin recording.

See also:
GenericProcessor, ControlPanel

Constructor & Destructor Documentation

RecordNode::RecordNode ( )
RecordNode::~RecordNode ( )

Member Function Documentation

void RecordNode::process ( AudioSampleBuffer &  buffer,
MidiBuffer &  eventBuffer,
int &  nSamples 
)
virtual

Handle incoming data and decide which files and events to write to disk.

Implements GenericProcessor.

void RecordNode::setParameter ( int  parameterIndex,
float  newValue 
)
virtual

Overrides implementation in GenericProcessor; used to change recording parameters on the fly.

parameterIndex = 0: stop recording parameterIndex = 1: start recording parameterIndex = 2: newValue = 0: turn off recording for current channel newValue = 1: turn on recording for current channel

Reimplemented from GenericProcessor.

void RecordNode::addInputChannel ( GenericProcessor sourceNode,
int  chan 
)
bool RecordNode::enable ( )
virtual

Reimplemented from GenericProcessor.

bool RecordNode::disable ( )
virtual

Reimplemented from GenericProcessor.

float RecordNode::getFreeSpace ( )

Called by the ControlPanel to determine the amount of space left in the current dataDirectory.

void RecordNode::setChannel ( Channel ch)

Selects a channel relative to a particular processor with ID = id.

void RecordNode::setChannelStatus ( Channel ch,
bool  status 
)

Turns recording on and off for a particular channel.

Channel numbers are absolute (based on RecordNode channel mapping).

void RecordNode::resetConnections ( )
virtual

Used to clear all connections prior to the start of acquisition.

Reimplemented from GenericProcessor.

void RecordNode::filenameComponentChanged ( FilenameComponent *  )

Callback to indicate when user has chosen a new data directory.

void RecordNode::createNewDirectory ( )

Creates a new data directory in the location specified by the fileNameComponent.


The documentation for this class was generated from the following file: