RTXI  2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DataRecorder::Panel Class Reference

#include <data_recorder.h>

Inheritance diagram for DataRecorder::Panel:
Settings::ObjectEvent::HandlerEvent::RTHandlerRT::ThreadRT::List< T >::NodeRT::List< T >::Node

Classes

struct  file_t
 

Public Slots

void startRecordClicked (void)
 
void stopRecordClicked (void)
 
void updateDownsampleRate (int)
 

Public Member Functions

 Panel (QWidget *, size_t)
 
 ~Panel (void)
 
void execute (void)
 
void receiveEvent (const Event::Object *)
 
void receiveEventRT (const Event::Object *)
 
- Public Member Functions inherited from Settings::Object
 Object (void)
 
virtual ~Object (void)
 
ID getID (void) const
 
State save (void) const
 
void load (const State &)
 
void deferred (const State &)
 
- Public Member Functions inherited from Event::Handler
 Handler (void)
 
virtual ~Handler (void)
 
- Public Member Functions inherited from Event::RTHandler
 RTHandler (void)
 
virtual ~RTHandler (void)
 
- Public Member Functions inherited from RT::List< T >::Node
 Node (void)
 
virtual ~Node (void)
 
bool operator== (const Node &x) const
 
- Public Member Functions inherited from RT::Thread
 Thread (Priority p=DefaultPriority)
 
virtual ~Thread (void)
 
Priority getPriority (void) const
 
bool getActive (void) const
 
void setActive (bool)
 

Protected Member Functions

void customEvent (QEvent *)
 
virtual void doDeferred (const Settings::Object::State &)
 
virtual void doLoad (const Settings::Object::State &)
 
virtual void doSave (Settings::Object::State &) const
 

Private Slots

void buildChannelList (void)
 
void changeDataFile (void)
 
void insertChannel (void)
 
void removeChannel (void)
 
void addNewTag (void)
 

Private Member Functions

void processData (void)
 
int openFile (QString &)
 
void closeFile (bool=false)
 
int startRecording (long long)
 
void stopRecording (long long)
 

Static Private Member Functions

static void * bounce (void *)
 

Private Attributes

double prev_input
 
size_t counter
 
size_t downsample_rate
 
long long count
 
long long fixedcount
 
std::vector< std::string > dataTags
 
QMutex mutex
 
pthread_t thread
 
AtomicFifo fifo
 
data_token_t _token
 
bool tokenRetrieved
 
struct timespec sleep
 
struct DataRecorder::Panel::file_t file
 
bool recording
 
QMdiSubWindow * subWindow
 
QGroupBox * channelGroup
 
QGroupBox * stampGroup
 
QGroupBox * sampleGroup
 
QGroupBox * fileGroup
 
QGroupBox * buttonGroup
 
QGroupBox * listGroup
 
QComboBox * blockList
 
QComboBox * channelList
 
QComboBox * typeList
 
QListWidget * selectionBox
 
QLabel * recordStatus
 
QPushButton * rButton
 
QPushButton * lButton
 
QPushButton * addTag
 
QSpinBox * downsampleSpin
 
QLineEdit * fileNameEdit
 
QLineEdit * timeStampEdit
 
QLineEdit * fileFormatEdit
 
QLabel * fileSizeLbl
 
QLabel * fileSize
 
QLabel * trialLengthLbl
 
QLabel * trialLength
 
QLabel * trialNumLbl
 
QLabel * trialNum
 
QPushButton * startRecordButton
 
QPushButton * stopRecordButton
 
QPushButton * closeButton
 
RT::List< Channelchannels
 
std::vector< IO::Block * > blockPtrList
 

Additional Inherited Members

- Public Types inherited from Settings::Object
typedef unsigned long ID
 
- Public Types inherited from RT::Thread
typedef unsigned long Priority
 
- Static Public Attributes inherited from Settings::Object
static const ID INVALID = 0
 
- Static Public Attributes inherited from RT::Thread
static const Priority MinimumPriority = 0
 
static const Priority MaximumPriority = 100
 
static const Priority DefaultPriority = MaximumPriority/2
 

Detailed Description

Definition at line 95 of file data_recorder.h.

Constructor & Destructor Documentation

DataRecorder::Panel::Panel(QWidget * parent,
size_t buffersize 
)

Definition at line 385 of file data_recorder.cpp.

DataRecorder::Panel::~Panel(void )

Definition at line 602 of file data_recorder.cpp.

Member Function Documentation

void DataRecorder::Panel::addNewTag(void )
privateslot

Definition at line 925 of file data_recorder.cpp.

void * DataRecorder::Panel::bounce(void * param)
staticprivate

Definition at line 1079 of file data_recorder.cpp.

void DataRecorder::Panel::buildChannelList(void )
privateslot

Definition at line 759 of file data_recorder.cpp.

void DataRecorder::Panel::changeDataFile(void )
privateslot

Definition at line 803 of file data_recorder.cpp.

void DataRecorder::Panel::closeFile(bool shutdown = false)
private

Definition at line 1314 of file data_recorder.cpp.

void DataRecorder::Panel::customEvent(QEvent * e)
protected

Definition at line 965 of file data_recorder.cpp.

void DataRecorder::Panel::doDeferred(const Settings::Object::States)
protectedvirtual

Reimplemented from Settings::Object.

Definition at line 1016 of file data_recorder.cpp.

void DataRecorder::Panel::doLoad(const Settings::Object::States)
protectedvirtual

Reimplemented from Settings::Object.

Definition at line 1043 of file data_recorder.cpp.

void DataRecorder::Panel::doSave(Settings::Object::States)const
protectedvirtual

Reimplemented from Settings::Object.

Definition at line 1054 of file data_recorder.cpp.

void DataRecorder::Panel::execute(void )
virtual

Function called periodically by the realtime task.

See also
RT::System

Reimplemented from RT::Thread.

Definition at line 614 of file data_recorder.cpp.

void DataRecorder::Panel::insertChannel(void )
privateslot

Definition at line 841 of file data_recorder.cpp.

int DataRecorder::Panel::openFile(QString & filename)
private

Definition at line 1230 of file data_recorder.cpp.

void DataRecorder::Panel::processData(void )
private

Definition at line 1089 of file data_recorder.cpp.

void DataRecorder::Panel::receiveEvent(const Event::Objectevent)
virtual

Function that is called in non-realtime everytime an non-realtime event is posted.

Parameters
eventThe the event being posted.
See also
Event::Object
Event::Manager::postEvent()

Reimplemented from Event::Handler.

Definition at line 636 of file data_recorder.cpp.

void DataRecorder::Panel::receiveEventRT(const Event::Objectevent)
virtual

Function that is called in realtime everytime a realtime event is posted.

Parameters
nameThe the event being posted.
See also
Event::Object
Event::Manager::postEventRT()

Reimplemented from Event::RTHandler.

Definition at line 698 of file data_recorder.cpp.

void DataRecorder::Panel::removeChannel(void )
privateslot

Definition at line 898 of file data_recorder.cpp.

void DataRecorder::Panel::startRecordClicked(void )
slot

Definition at line 936 of file data_recorder.cpp.

int DataRecorder::Panel::startRecording(long long timestamp)
private

Definition at line 1368 of file data_recorder.cpp.

void DataRecorder::Panel::stopRecordClicked(void )
slot

Definition at line 952 of file data_recorder.cpp.

void DataRecorder::Panel::stopRecording(long long timestamp)
private

Definition at line 1544 of file data_recorder.cpp.

void DataRecorder::Panel::updateDownsampleRate(int r)
slot

Definition at line 959 of file data_recorder.cpp.

Member Data Documentation

data_token_t DataRecorder::Panel::_token
private

Definition at line 143 of file data_recorder.h.

QPushButton* DataRecorder::Panel::addTag
private

Definition at line 174 of file data_recorder.h.

QComboBox* DataRecorder::Panel::blockList
private

Definition at line 167 of file data_recorder.h.

std::vector<IO::Block *> DataRecorder::Panel::blockPtrList
private

Definition at line 193 of file data_recorder.h.

QGroupBox* DataRecorder::Panel::buttonGroup
private

Definition at line 164 of file data_recorder.h.

QGroupBox* DataRecorder::Panel::channelGroup
private

Definition at line 160 of file data_recorder.h.

QComboBox* DataRecorder::Panel::channelList
private

Definition at line 168 of file data_recorder.h.

RT::List<Channel> DataRecorder::Panel::channels
private

Definition at line 192 of file data_recorder.h.

QPushButton* DataRecorder::Panel::closeButton
private

Definition at line 190 of file data_recorder.h.

long long DataRecorder::Panel::count
private

Definition at line 135 of file data_recorder.h.

size_t DataRecorder::Panel::counter
private

Definition at line 133 of file data_recorder.h.

std::vector<std::string> DataRecorder::Panel::dataTags
private

Definition at line 137 of file data_recorder.h.

size_t DataRecorder::Panel::downsample_rate
private

Definition at line 134 of file data_recorder.h.

QSpinBox* DataRecorder::Panel::downsampleSpin
private

Definition at line 176 of file data_recorder.h.

AtomicFifo DataRecorder::Panel::fifo
private

Definition at line 142 of file data_recorder.h.

struct DataRecorder::Panel::file_t DataRecorder::Panel::file
private
QLineEdit* DataRecorder::Panel::fileFormatEdit
private

Definition at line 180 of file data_recorder.h.

QGroupBox* DataRecorder::Panel::fileGroup
private

Definition at line 163 of file data_recorder.h.

QLineEdit* DataRecorder::Panel::fileNameEdit
private

Definition at line 178 of file data_recorder.h.

QLabel* DataRecorder::Panel::fileSize
private

Definition at line 182 of file data_recorder.h.

QLabel* DataRecorder::Panel::fileSizeLbl
private

Definition at line 181 of file data_recorder.h.

long long DataRecorder::Panel::fixedcount
private

Definition at line 136 of file data_recorder.h.

QPushButton* DataRecorder::Panel::lButton
private

Definition at line 173 of file data_recorder.h.

QGroupBox* DataRecorder::Panel::listGroup
private

Definition at line 165 of file data_recorder.h.

QMutex DataRecorder::Panel::mutex
private

Definition at line 139 of file data_recorder.h.

double DataRecorder::Panel::prev_input
private

Definition at line 132 of file data_recorder.h.

QPushButton* DataRecorder::Panel::rButton
private

Definition at line 172 of file data_recorder.h.

bool DataRecorder::Panel::recording
private

Definition at line 156 of file data_recorder.h.

QLabel* DataRecorder::Panel::recordStatus
private

Definition at line 171 of file data_recorder.h.

QGroupBox* DataRecorder::Panel::sampleGroup
private

Definition at line 162 of file data_recorder.h.

QListWidget* DataRecorder::Panel::selectionBox
private

Definition at line 170 of file data_recorder.h.

struct timespec DataRecorder::Panel::sleep
private

Definition at line 145 of file data_recorder.h.

QGroupBox* DataRecorder::Panel::stampGroup
private

Definition at line 161 of file data_recorder.h.

QPushButton* DataRecorder::Panel::startRecordButton
private

Definition at line 188 of file data_recorder.h.

QPushButton* DataRecorder::Panel::stopRecordButton
private

Definition at line 189 of file data_recorder.h.

QMdiSubWindow* DataRecorder::Panel::subWindow
private

Definition at line 158 of file data_recorder.h.

pthread_t DataRecorder::Panel::thread
private

Definition at line 141 of file data_recorder.h.

QLineEdit* DataRecorder::Panel::timeStampEdit
private

Definition at line 179 of file data_recorder.h.

bool DataRecorder::Panel::tokenRetrieved
private

Definition at line 144 of file data_recorder.h.

QLabel* DataRecorder::Panel::trialLength
private

Definition at line 184 of file data_recorder.h.

QLabel* DataRecorder::Panel::trialLengthLbl
private

Definition at line 183 of file data_recorder.h.

QLabel* DataRecorder::Panel::trialNum
private

Definition at line 186 of file data_recorder.h.

QLabel* DataRecorder::Panel::trialNumLbl
private

Definition at line 185 of file data_recorder.h.

QComboBox* DataRecorder::Panel::typeList
private

Definition at line 169 of file data_recorder.h.


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