Relacs  0.9.8
Public Types | Public Member Functions | Static Public Attributes | Protected Slots | Protected Member Functions | Friends | List of all members
RePro Class Referenceabstract

#include <repro.h>

Inheritance diagram for RePro:
Inheritance graph
[legend]
Collaboration diagram for RePro:
Collaboration graph
[legend]

Public Types

enum  DoneState { Completed, Aborted, Failed, Continue }
 
- Public Types inherited from ConfigClass
enum  Action { Save =1, Dialog =2, Help =4, Menu =8 }
 
- Public Types inherited from Options
enum  SaveFlags {
  NoName = 1, NoType = 2, NoInclude = 4, SwitchNameType = 8,
  Embrace = 16, PrintRequest = 32, FirstOnly = 64, PrintType = 128,
  PrintStyle = 256, DontCloseSection = 512, AlwaysQuote = 1024, EscapeQuotes = 2048
}
 
typedef deque< Parameter >
::iterator 
iterator
 
typedef deque< Parameter >
::const_iterator 
const_iterator
 
typedef deque< Options * >
::iterator 
section_iterator
 
typedef deque< Options * >
::const_iterator 
const_section_iterator
 

Public Member Functions

 RePro (const string &name, const string &pluginset="", const string &author="unknown", const string &version="unknown", const string &date=__DATE__)
 
virtual ~RePro (void)
 
virtual void setName (const string &name)
 
virtual void readConfig (StrQueue &sq)
 
virtual void saveConfig (ofstream &str)
 
virtual int main (void)=0
 
bool interrupt (void) const
 
void start (QThread::Priority priority=QThread::InheritPriority)
 
virtual void requestStop (void)
 
bool isRunning (void) const
 
bool wait (double time=-1.0)
 
bool sleep (double t, double tracetime=-1.0)
 
void timeStamp (void)
 
bool sleepOn (double t)
 
bool sleepWait (double time=-1.0)
 
void wake (void)
 
void enable (void)
 
void disable (void)
 
virtual void sessionStarted (void)
 
virtual void sessionStopped (bool saved)
 
bool completed (void) const
 
bool aborted (void) const
 
bool failed (void) const
 
int completeRuns (void) const
 
int totalRuns (void) const
 
int allRuns (void) const
 
int failedRuns (void) const
 
double reproTime (void) const
 
string reproTimeStr (void) const
 
double reproStartTime (void) const
 
int testWrite (OutData &signal)
 
int testWrite (OutList &signal)
 
int write (OutData &signal, bool setsignaltime=true)
 
int write (OutList &signal, bool setsignaltime=true)
 
int startWrite (OutData &signal, bool setsignaltime=true)
 
int startWrite (OutList &signal, bool setsignaltime=true)
 
int directWrite (OutData &signal, bool setsignaltime=true)
 
int directWrite (OutList &signal, bool setsignaltime=true)
 
int writeZero (int channel, int device)
 
int writeZero (int index)
 
int writeZero (const string &trace)
 
int stopWrite (void)
 
double minLevel (int trace) const
 
double minLevel (const string &trace) const
 
double maxLevel (int trace) const
 
double maxLevel (const string &trace) const
 
void levels (int trace, vector< double > &l) const
 
void levels (const string &trace, vector< double > &l) const
 
double minIntensity (int trace, double frequency=0.0) const
 
double minIntensity (const string &trace, double frequency=0.0) const
 
double maxIntensity (int trace, double frequency=0.0) const
 
double maxIntensity (const string &trace, double frequency=0.0) const
 
void intensities (int trace, vector< double > &ints, double frequency=0.0) const
 
void intensities (const string &trace, vector< double > &ints, double frequency=0.0) const
 
void setMessage (bool message=true)
 
void noMessage (void)
 
void message (const string &msg)
 
string addPath (const string &file) const
 
void keepFocus (void)
 
void grabKey (int key)
 
void releaseKey (int key)
 
void releaseKeys (void)
 
int softStop (void)
 
void setSoftStop (int s=1)
 
void clearSoftStop (void)
 
void setSoftStopKey (int keycode)
 
void tracePlotOn (bool on=true)
 
void tracePlotOff (void)
 
void tracePlotSignal (double length, double offs=0.0)
 
void tracePlotSignal (void)
 
void tracePlotContinuous (double length)
 
void tracePlotContinuous (void)
 
string macroName (void)
 
string macroParam (void)
 
string reproPath (bool version=true)
 
string addReProPath (const string &file, bool version=true)
 
virtual void dialog (void)
 
OptionsoverwriteOptions (void)
 
string checkOptions (const string &opttxt)
 
virtual void setSaving (bool saving)
 
void noSaving (void)
 
virtual bool eventFilter (QObject *watched, QEvent *e)
 
- Public Member Functions inherited from RELACSPlugin
 RELACSPlugin (const string &configident="", int configgroup=0, const string &name="", const string &pluginset="", const string &author="unknown", const string &version="unknown", const string &date=__DATE__)
 
virtual ~RELACSPlugin (void)
 
QWidget * widget (void)
 
void setWidget (QWidget *widget)
 
void setLayout (QLayout *layout)
 
int desktopWidth (void) const
 
int desktopHeight (void) const
 
string pluginSet (void) const
 
string uniqueName (void) const
 
void setShortUniqueName (void)
 
void setLongUniqueName (void)
 
void updateUniqueName (void)
 
const Optionssettings (void) const
 
Optionssettings (void)
 
void setSettings (void)
 
virtual void modeChanged (void)
 
virtual void notifyMetaData (void)
 
virtual void notifyStimulusData (void)
 
void setRELACSWidget (RELACSWidget *rw)
 
virtual string helpFileName (void) const
 
const InListtraces (void) const
 
const InDatatrace (int index) const
 
const InDatatrace (const string &ident) const
 
int traceIndex (const string &ident) const
 
string traceNames (void) const
 
string rawTraceNames (void) const
 
const EventListevents (void) const
 
const EventDataevents (int index) const
 
const EventDataevents (const string &ident) const
 
const EventDatastimulusEvents (void) const
 
const EventDatarestartEvents (void) const
 
const EventDatarecordingEvents (void) const
 
int traceInputTrace (int trace) const
 
int traceInputTrace (const string &ident) const
 
int traceInputEvent (int trace) const
 
int traceInputEvent (const string &ident) const
 
int eventInputTrace (int event) const
 
int eventInputTrace (const string &ident) const
 
int eventInputEvent (int event) const
 
int eventInputEvent (const string &ident) const
 
double signalTime (void) const
 
double currentTime (void) const
 
double currentTimeRaw (void) const
 
void addTracesEvents (deque< InList * > &data, deque< EventList * > &events)
 
void setTracesEvents (const InList &data, const EventList &event)
 
void assignTracesEvents (const InList &data, const EventList &events)
 
void assignTracesEvents (void)
 
void updateDerivedTracesEvents (void)
 
int getData (double mintracetime=0.0, double prevsignal=-1000.0)
 
int outTracesSize (void) const
 
int outTraceIndex (const string &name) const
 
string outTraceName (int index) const
 
string outTraceNames (void) const
 
const TraceSpecoutTrace (int index) const
 
const TraceSpecoutTrace (const string &name) const
 
void setSignalDelay (int device, double delay)
 
bool acquisition (void) const
 
bool simulation (void) const
 
bool analysis (void) const
 
bool idle (void) const
 
string modeStr (void) const
 
OptionsrelacsSettings (void)
 
const OptionsrelacsSettings (void) const
 
void lockRelacsSettings (void) const
 
void unlockRelacsSettings (void) const
 
QMutex * relacsSettingsMutex (void)
 
string path (void) const
 
string addPath (const string &file) const
 
string defaultPath (void) const
 
string addDefaultPath (const string &file) const
 
bool saving (void) const
 
OptionsstimulusData (void)
 
const OptionsstimulusData (void) const
 
int stimulusDataTraceFlag (void) const
 
void lockStimulusData (void) const
 
void unlockStimulusData (void) const
 
QMutex * stimulusDataMutex (void)
 
MetaDatametaData (void)
 
const MetaDatametaData (void) const
 
void lockMetaData (void) const
 
void unlockMetaData (void) const
 
QMutex * metaDataMutex (void)
 
AllDevicesdevices (void) const
 
Devicedevice (const string &ident)
 
void updateDeviceMenu (void)
 
DigitalIOdigitalIO (const string &ident)
 
Triggertrigger (const string &ident)
 
Attenuateattenuator (const string &name)
 
Filterfilter (const string &name)
 
FilterfilterTrace (int index)
 
FilterfilterTrace (const string &name)
 
OptionsfilterOpts (const string &name)
 
OptionsfilterTraceOpts (int index)
 
OptionsfilterTraceOpts (const string &name)
 
void lockFilter (const string &name)
 
void lockFilterTrace (int index)
 
void lockFilterTrace (const string &name)
 
void unlockFilter (const string &name)
 
void unlockFilterTrace (int index)
 
void unlockFilterTrace (const string &name)
 
void autoConfigureFilter (Filter *filter, double tbegin, double tend)
 
void autoConfigureFilter (Filter *filter, double duration)
 
void autoConfigureFilter (double tbegin, double tend)
 
void autoConfigureFilter (double duration)
 
Filterdetector (const string &name)
 
FilterdetectorEvents (int index)
 
FilterdetectorEvents (const string &name)
 
OptionsdetectorOpts (const string &name)
 
OptionsdetectorEventsOpts (int index)
 
OptionsdetectorEventsOpts (const string &name)
 
void lockDetector (const string &name)
 
void lockDetectorEvents (int index)
 
void lockDetectorEvents (const string &name)
 
void unlockDetector (const string &name)
 
void unlockDetectorEvents (int index)
 
void unlockDetectorEvents (const string &name)
 
void autoConfigureDetector (Filter *detector, double tbegin, double tend)
 
void autoConfigureDetector (Filter *detector, double duration)
 
void autoConfigureDetectors (double tbegin, double tend)
 
void autoConfigureDetectors (double duration)
 
double sessionTime (void) const
 
string sessionTimeStr (void) const
 
bool sessionRunning (void) const
 
int reproCount (void) const
 
bool globalKeyEvents (void)
 
void setGlobalKeyEvents (bool global=true)
 
- Public Member Functions inherited from ConfigDialog
 ConfigDialog (const string &configident="", int configgroup=0, const string &name="", const string &author="", const string &version="", const string &date=__DATE__)
 
virtual ~ConfigDialog (void)
 
string name (void) const
 
string author (void) const
 
virtual void setAuthor (const string &author)
 
string version (void) const
 
virtual void setVersion (const string &version)
 
string date (void) const
 
virtual void setDate (const string &date)
 
virtual OptWidgetdialogOptions (OptDialog *od, string *tabhotkeys=0)
 
virtual void dialogButtons (OptDialog *od)
 
virtual void dialogEmptyMessage (OptDialog *od)
 
int dialogSelectMask (void) const
 
void setDialogSelectMask (int mask)
 
void addDialogSelectMask (int mask)
 
int dialogReadOnlyMask (void) const
 
void setDialogReadOnlyMask (int mask)
 
void addDialogReadOnlyMask (int mask)
 
int dialogStyle (void) const
 
void setDialogStyle (int style)
 
void addDialogStyle (int style)
 
string dialogCaption (void) const
 
void setDialogCaption (const string &caption)
 
bool dialogHeader (void) const
 
void setDialogHeader (bool d)
 
string headerBackgroundColor (void) const
 
void setHeaderBackgroundColor (const string &color)
 
string headerForegroundColor (void) const
 
void setHeaderForegroundColor (const string &color)
 
string headerImageFile (void) const
 
void setHeaderImageFile (const string &file)
 
virtual void dialogHeaderWidget (OptDialog *od)
 
bool dialogHelp (void) const
 
void setDialogHelp (bool d)
 
string helpCaption (void) const
 
void setHelpCaption (const string &caption)
 
string helpPath (int inx=0) const
 
int helpPathes (void) const
 
void clearHelpPathes (void)
 
void setHelpPath (const string &path)
 
void addHelpPath (const string &path)
 
bool dialogOpen (void) const
 
bool helpOpen (void) const
 
QWidget * mainWidget (void)
 
virtual void setMainWidget (QWidget *widget)
 
void lock () const
 
void unlock () const
 
bool tryLock (int timeout=1)
 
QMutex * mutex (void)
 
- Public Member Functions inherited from ConfigClass
 ConfigClass (const string &ident, int group=0, int mode=0xffff, int selectmask=0)
 
 ConfigClass (const ConfigClass &C)
 
virtual ~ConfigClass (void)
 
const string & configIdent (void) const
 
void setConfigIdent (const string &ident)
 
int configGroup (void) const
 
void setConfigGroup (int group)
 
int configMode (void) const
 
void setConfigMode (int mode)
 
void addConfigMode (int mode)
 
void delConfigMode (int mode)
 
int configSelectMask (void) const
 
void setConfigSelectMask (int mask)
 
void addConfig (void)
 
void readConfig (void)
 
virtual int configSize (void) const
 
virtual void config (void)
 
virtual void preConfig (void)
 
- Public Member Functions inherited from Options
 Options (void)
 
 Options (const Options &o)
 
 Options (const Options &o, int flags)
 
 Options (const string &name, const string &type, int flags, int style)
 
 Options (const Str &opttxt, const string &assignment=":=", const string &separator=",;")
 
 Options (const StrQueue &sq, const string &assignment=":=")
 
 Options (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", string *line=0)
 
virtual ~Options (void)
 
Optionsoperator= (const Options &o)
 
Optionsassign (const Options &o)
 
Optionsappend (const Options &o)
 
Optionsadd (const Options &o)
 
Optionsinsert (const Options &o, const string &atname="")
 
Optionsassign (const Options &o, int flags)
 
Optionscopy (Options &o, int flags)
 
Optionsappend (const Options &o, int flags)
 
Optionsadd (const Options &o, int flags)
 
Optionsinsert (const Options &o, int flags, const string &atname="")
 
Parameterassign (const string &name, const string &value)
 
OptionsparentSection (void)
 
const OptionsparentSection (void) const
 
void setParentSection (Options *parentsection)
 
void resetParents (void)
 
OptionsrootSection (void)
 
const OptionsrootSection (void) const
 
string name (void) const
 
virtual void setName (const string &name, const string &type)
 
string type (void) const
 
void setType (const string &type)
 
string include (void) const
 
void setInclude (const string &include)
 
void setInclude (const string &url, const string &name)
 
int flag (void) const
 
bool flag (int selectflag) const
 
OptionssetFlag (int flag)
 
OptionsaddFlag (int flag)
 
OptionsdelFlag (int flag)
 
OptionsclearFlag (void)
 
int style (void) const
 
OptionssetStyle (int style)
 
OptionsaddStyle (int style)
 
OptionsdelStyle (int style)
 
OptionsclearStyle (void)
 
bool checkType (int mask) const
 
Str warning (void) const
 
iterator begin (void)
 
iterator end (void)
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
section_iterator sectionsBegin (void)
 
section_iterator sectionsEnd (void)
 
const_section_iterator sectionsBegin (void) const
 
const_section_iterator sectionsEnd (void) const
 
const_iterator find (const string &pattern, int level=-1) const
 
iterator find (const string &pattern, int level=-1)
 
const_iterator rfind (const string &pattern, int level=-1) const
 
iterator rfind (const string &pattern, int level=-1)
 
const_section_iterator findSection (const string &pattern, int level=-1) const
 
section_iterator findSection (const string &pattern, int level=-1)
 
const_section_iterator rfindSection (const string &pattern, int level=-1) const
 
section_iterator rfindSection (const string &pattern, int level=-1)
 
const Parameteroperator[] (int i) const
 
Parameteroperator[] (int i)
 
const Parameteroperator[] (const string &name) const
 
Parameteroperator[] (const string &name)
 
const Optionssection (int i) const
 
Optionssection (int i)
 
const Optionssection (const string &name) const
 
Optionssection (const string &name)
 
Str request (const string &name) const
 
ParametersetRequest (const string &name, const string &request)
 
Parameter::ValueType valueType (const string &name) const
 
ParametersetValueType (const string &name, Parameter::ValueType type)
 
int flags (const string &name) const
 
bool flags (const string &name, int flag) const
 
ParametersetFlags (const string &name, int flags)
 
ParameteraddFlags (const string &name, int flags)
 
ParameterdelFlags (const string &name, int flags)
 
ParameterclearFlags (const string &name)
 
bool changed (const string &name)
 
int style (const string &name) const
 
ParametersetStyle (const string &name, int style)
 
ParameteraddStyle (const string &name, int style)
 
ParameterdelStyle (const string &name, int style)
 
Str format (const string &name) const
 
ParametersetFormat (const string &name, int width=0, int prec=-1, char fmt='g')
 
ParametersetFormat (const string &name, const string &format)
 
int formatWidth (const string &name) const
 
int size (const string &name) const
 
Parameteradd (const Parameter &np)
 
Parameterinsert (const Parameter &np, const string &atname="")
 
ParameteraddText (const string &name, const string &request, const string &dflt, int flags=0, int style=0)
 
ParameteraddText (const string &name, const string &dflt="", int flags=0, int style=0)
 
ParameterinsertText (const string &name, const string &atname, const string &request, const string &dflt, int flags=0, int style=0)
 
ParameterinsertText (const string &name, const string &atname="", const string &dflt="", int flags=0, int style=0)
 
Str text (const string &name, int index, const string &dflt="", const string &format="", const string &unit="") const
 
Str text (const string &name, const string &dflt="", const string &format="", const string &unit="") const
 
void texts (const string &name, vector< string > &s, const string &format="", const string &unit="") const
 
Str allText (const string &name, const string &dflt="", const string &format="", const string &unit="", const string &separator=", ") const
 
ParametersetText (const string &name, const string &strg)
 
ParametersetText (const string &name, const Parameter &p)
 
ParameterpushText (const string &name, const string &strg)
 
Str defaultText (const string &name, const string &format="", const string &unit="") const
 
ParametersetDefaultText (const string &name, const string &dflt)
 
ParameteraddSelection (const string &name, const string &request, const string &selection, int flags=0, int style=0)
 
ParameteraddSelection (const string &name, const string &selection="", int flags=0, int style=0)
 
ParameterinsertSelection (const string &name, const string &atname, const string &request, const string &selection, int flags=0, int style=0)
 
ParameterinsertSelection (const string &name, const string &atname="", const string &selection="", int flags=0, int style=0)
 
ParameterselectText (const string &name, const string &strg, int add=0)
 
ParameterselectText (const string &name, int index)
 
int index (const string &name) const
 
int index (const string &name, const string &strg) const
 
ParameteraddNumber (const string &name, const string &request, double dflt, double minimum, double maximum=MAXDOUBLE, double step=1.0, const string &unit="", const string &outputunit="", const string &format="", int flags=0, int style=0)
 
ParameteraddNumber (const string &name, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameteraddNumber (const string &name, double dflt, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameteraddNumber (const string &name, double dflt, const string &unit, int flags, int style=0)
 
ParameteraddNumber (const string &name, double dflt, double error, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameteraddNumber (const string &name, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameterinsertNumber (const string &name, const string &atname, const string &request, double dflt, double minimum, double maximum=MAXDOUBLE, double step=1.0, const string &unit="", const string &outputunit="", const string &format="", int flags=0, int style=0)
 
ParameterinsertNumber (const string &name, const string &atname, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameterinsertNumber (const string &name, const string &atname, double dflt, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameterinsertNumber (const string &name, const string &atname, const string &unit="", const string &format="", int flags=0, int style=0)
 
double number (const string &name, double dflt=0.0, const string &unit="", int index=0) const
 
double number (const string &name, const string &unit, double dflt=0.0, int index=0) const
 
double number (const string &name, int index, double dflt=0.0, const string &unit="") const
 
double number (const string &name, int index, const string &unit, double dflt=0.0) const
 
void numbers (const string &name, vector< double > &n, const string &unit="") const
 
double error (const string &name, const string &unit="", int index=0) const
 
double error (const string &name, int index, const string &unit="") const
 
void errors (const string &name, vector< double > &n, const string &unit="") const
 
ParametersetNumber (const string &name, double number, double error, const string &unit="")
 
ParametersetNumber (const string &name, double number, const string &unit="")
 
ParameterpushNumber (const string &name, double number, double error=-1.0, const string &unit="")
 
ParameterpushNumber (const string &name, double number, const string &unit)
 
ParametersetNumber (const string &name, const Parameter &p)
 
double defaultNumber (const string &name, const string &unit="") const
 
ParametersetDefaultNumber (const string &name, double dflt, const string &unit="")
 
double minimum (const string &name, const string &unit="") const
 
double maximum (const string &name, const string &unit="") const
 
double step (const string &name, const string &unit="") const
 
ParametersetStep (const string &name, double step, const string &unit="")
 
ParametersetMinMax (const string &name, double minimum=-MAXDOUBLE, double maximum=MAXDOUBLE, double step=1.0, const string &unit="")
 
Str unit (const string &name) const
 
Str outUnit (const string &name) const
 
ParametersetUnit (const string &name, const string &internunit, const string &outunit="")
 
ParametersetOutUnit (const string &name, const string &outputunit)
 
ParameterchangeUnit (const string &name, const string &internunit)
 
ParameteraddInteger (const string &name, const string &request, long dflt, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="", const string &outputunit="", int width=0, int flags=0, int style=0)
 
ParameteraddInteger (const string &name, long dflt, const string &unit="", int width=0, int flags=0, int style=0)
 
ParameteraddInteger (const string &name, const string &unit="")
 
ParameterinsertInteger (const string &name, const string &atname, const string &request, long dflt, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="", const string &outputunit="", int width=0, int flags=0, int style=0)
 
ParameterinsertInteger (const string &name, const string &atname, long dflt, const string &unit="", int width=0, int flags=0, int style=0)
 
ParameterinsertInteger (const string &name, const string &atname, const string &unit="", int width=0, int flags=0, int style=0)
 
long integer (const string &name, const string &unit="", long dflt=0, int index=0) const
 
long integer (const string &name, int index, long dflt=0, const string &unit="") const
 
long integer (const string &name, int index, const string &unit, long dflt=0) const
 
void integers (const string &name, vector< long > &n, const string &unit="") const
 
void integers (const string &name, vector< int > &n, const string &unit="") const
 
ParametersetInteger (const string &name, long number, long error, const string &unit="")
 
ParametersetInteger (const string &name, long number, const string &unit="")
 
ParameterpushInteger (const string &name, long number, long error, const string &unit="")
 
ParameterpushInteger (const string &name, long number, const string &unit="")
 
ParametersetInteger (const string &name, const Parameter &p)
 
long defaultInteger (const string &name, const string &unit="") const
 
ParametersetDefaultInteger (const string &name, long dflt, const string &unit="")
 
ParametersetMinMax (const string &name, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="")
 
ParametersetMinMax (const string &name, int minimum, int maximum, int step=1, const string &unit="")
 
ParameteraddBoolean (const string &name, const string &request, bool dflt, int flags=0, int style=0)
 
ParameteraddBoolean (const char *name, const char *request, bool dflt, int flags=0, int style=0)
 
ParameteraddBoolean (const string &name, bool dflt, int flags=0, int style=0)
 
ParameteraddBoolean (const char *name, bool dflt, int flags=0, int style=0)
 
ParameterinsertBoolean (const string &name, const string &atname="", const string &request="", bool dflt=false, int flags=0, int style=0)
 
ParameterinsertBoolean (const string &name, const string &atname, int flags=0, int style=0)
 
bool boolean (const string &name, bool dflt=false, int index=0) const
 
bool boolean (const string &name, int index, bool dflt=false) const
 
void booleans (const string &name, vector< bool > &n) const
 
ParametersetBoolean (const string &name, bool b)
 
ParametersetBoolean (const string &name, const Parameter &p)
 
bool defaultBoolean (const string &name) const
 
ParametersetDefaultBoolean (const string &name, bool dflt)
 
ParameteraddDate (const string &name, const string &request, int year=0, int month=0, int day=0, int flags=0, int style=0)
 
ParameteraddDate (const string &name, int year, int month, int day, int flags=0, int style=0)
 
ParameteraddDate (const string &name, int flags=0, int style=0)
 
ParameterinsertDate (const string &name, const string &atname="", const string &request="", int year=0, int month=0, int day=0, int flags=0, int style=0)
 
ParameterinsertDate (const string &name, const string &atname, int year=0, int month=0, int day=0, int flags=0, int style=0)
 
ParameterinsertDate (const string &name, const string &atname, int flags=0, int style=0)
 
const Parameterdate (const string &name, int index, int &year, int &month, int &day) const
 
ParametersetDate (const string &name, int year, int month, int day)
 
ParametersetDate (const string &name, const string &date)
 
ParametersetDate (const string &name, const struct tm &date)
 
ParametersetDate (const string &name, const time_t &time)
 
ParametersetCurrentDate (const string &name)
 
ParametersetDate (const string &name, const Parameter &p)
 
const ParameterdefaultDate (const string &name, int index, int &year, int &month, int &day) const
 
ParametersetDefaultDate (const string &name, int year, int month, int day)
 
ParameteraddTime (const string &name, const string &request, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0)
 
ParameteraddTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0, int flags=0, int style=0)
 
ParameteraddTime (const string &name, int flags=0, int style=0)
 
ParameterinsertTime (const string &name, const string &atname="", const string &request="", int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0)
 
ParameterinsertTime (const string &name, const string &atname, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0)
 
ParameterinsertTime (const string &name, const string &atname, int flags=0, int style=0)
 
const Parametertime (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const
 
ParametersetTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0)
 
ParametersetTime (const string &name, const string &time)
 
ParametersetTime (const string &name, const struct tm &time)
 
ParametersetTime (const string &name, const time_t &time)
 
ParametersetCurrentTime (const string &name)
 
ParametersetTime (const string &name, const Parameter &p)
 
const ParameterdefaultTime (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const
 
ParametersetDefaultTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0)
 
OptionsnewSection (int level, const string &name, const string &type="", int flag=0, int style=0)
 
OptionsnewSection (int level, const string &name, int flag, int style=0)
 
OptionsnewSection (const string &name, const string &type="", int flag=0, int style=0)
 
OptionsnewSection (const string &name, int flag, int style=0)
 
OptionsnewSubSection (const string &name, const string &type="", int flag=0, int style=0)
 
OptionsnewSubSection (const string &name, int flag, int style=0)
 
OptionsnewSubSubSection (const string &name, const string &type="", int flag=0, int style=0)
 
OptionsnewSubSubSection (const string &name, int flag, int style=0)
 
OptionsaddSection (const string &name, const string &type="", int flag=0, int style=0)
 
OptionsaddSection (const string &name, int flag, int style=0)
 
OptionsinsertSection (const string &name, const string &atpattern, const string &type="", int flag=0, int style=0)
 
OptionsinsertSection (const string &name, const string &atpattern, int flag, int style=0)
 
OptionsnewSection (int level, const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSection (int level, const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSection (int level, const Options &opt, const string &name, int flag, int style=0)
 
OptionsnewSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSection (const Options &opt, const string &name, int flag, int style=0)
 
OptionsnewSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSubSection (const Options &opt, const string &name, int flag, int style=0)
 
OptionsnewSubSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSubSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSubSubSection (const Options &opt, const string &name, int flag, int style=0)
 
OptionsaddSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsaddSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsaddSection (const Options &opt, const string &name, int flag, int style=0)
 
OptionsinsertSection (const Options &opt, int selectmask, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0)
 
OptionsinsertSection (const Options &opt, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0)
 
OptionsinsertSection (const Options &opt, const string &name, const string &atpattern, int flag, int style=0)
 
OptionsnewSection (Options *opt, bool newparent=false)
 
OptionsaddSection (Options *opt, bool newparent=false)
 
OptionsinsertSection (Options *opt, const string &atpattern, bool newparent=false)
 
OptionsnewSections (Options *opt, bool newparent=false)
 
void endSection (void)
 
void clearSections (void)
 
void setSection (Options &opt)
 
void lastSection (void)
 
int up (void)
 
int down (void)
 
ParametersetDefault (const string &name)
 
OptionssetDefaults (int flags=0)
 
ParametersetToDefault (const string &name)
 
OptionssetToDefaults (int flags=0)
 
Optionserase (iterator p)
 
Optionserase (section_iterator p)
 
Optionserase (Options *s)
 
Optionserase (const string &pattern)
 
Optionserase (int selectflag)
 
Optionspop (void)
 
OptionspopSection (void)
 
Optionsflatten (Options *root=0)
 
Optionsclear (bool revert=true)
 
int size (void) const
 
int size (int selectflag) const
 
bool empty (void) const
 
int parameterSize (void) const
 
int parameterSize (int flags) const
 
int sectionsSize (void) const
 
int sectionsSize (int flags) const
 
bool exist (const string &pattern) const
 
bool existSection (const string &pattern) const
 
OptionssetFlags (int flags, int selectflag=0)
 
OptionsaddFlags (int flags, int selectflag=0)
 
OptionsdelFlags (int flags, int selectflag=0)
 
OptionssetValueTypeFlags (int flags, int typemask)
 
OptionsaddValueTypeFlags (int flags, int typemask)
 
OptionsdelValueTypeFlags (int flags, int typemask)
 
OptionssetStyles (int style, int selectflag=0)
 
OptionsaddStyles (int style, int selectflag=0)
 
OptionsdelStyles (int style, int selectflag=0)
 
int styleSize (int style) const
 
OptionssetValueTypeStyles (int style, int typemask)
 
OptionsaddValueTypeStyles (int style, int typemask)
 
OptionsdelValueTypeStyles (int style, int typemask)
 
int nameWidth (int selectmask=0, bool detailed=false, bool escape=false) const
 
string save (int selectmask=0, int flags=0) const
 
ostream & save (ostream &str, const string &start="", int selectmask=0, int flags=0, int width=-1) const
 
ostream & save (ostream &str, const string &textformat, const string &numberformat, const string &boolformat="%i=%b", const string &dateformat="%i=%04Y-%02m-%02d", const string &timeformat="%i=%02H:%02M:%02S", const string &sectionformat="%i", int selectmask=0, const string &start="") const
 
ostream & saveXML (ostream &str, int selectmask=0, int flags=0, int level=0, int indent=4) const
 
Optionsread (const string &opttxt, int flag, const string &assignment=":=", const string &separator=",;", int *indent=0)
 
Optionsread (const string &opttxt, const string &assignment=":=", const string &separator=",;")
 
istream & read (istream &str, int flag, const string &assignment=":=", const string &comment="#", const string &stop="", Str *line=0)
 
istream & read (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", Str *line=0)
 
Optionsread (const StrQueue &sq, int flag=0, const string &assignment=":=")
 
bool read (const Parameter &p, int flag=0)
 
Optionsread (const Options &o, int flags=0, int flag=0)
 
bool readAppend (const Parameter &p)
 
OptionsreadAppend (const Options &o, int flags=0)
 
Optionsload (const Str &opttxt, const string &assignment=":=", const string &separator=",;", int *indent=0, int *indentspacing=0, int *level=0)
 
istream & load (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", string *line=0)
 
Optionsload (const StrQueue &sq, const string &assignment=":=")
 
virtual void notify (void)
 
void callNotifies (void)
 
bool setNotify (bool notify=true)
 
bool unsetNotify (void)
 
bool notifying (void) const
 

Static Public Attributes

static const int MacroFlag = Parameter::ChangedFlag >> 1
 
static const int OverwriteFlag = Parameter::ChangedFlag >> 2
 
static const int CurrentFlag = Parameter::ChangedFlag >> 3
 
- Static Public Attributes inherited from RELACSPlugin
static const int DeviceId = 0x0001
 
static const int AnalogInputId = 0x0002
 
static const int AnalogOutputId = 0x0004
 
static const int DigitalIOId = 0x0008
 
static const int TriggerId = 0x0010
 
static const int AttenuatorId = 0x0020
 
static const int AttenuateId = 0x0040
 
static const int ModelId = 0x0080
 
static const int FilterId = 0x0100
 
static const int ReProId = 0x0200
 
static const int ControlId = 0x0400
 
static const int Core = 0
 
static const int Plugins = 1
 
- Static Public Attributes inherited from Options
static const int NonDefault = Parameter::NonDefault
 
static const long TabSection = 0x04000000
 

Protected Slots

virtual void customEvent (QEvent *qce)
 
- Protected Slots inherited from RELACSPlugin
void startTheSession (void)
 
void stopTheSession (void)
 
void toggleSession (void)
 
void removeFocus (void)
 
void muteAudioMonitor (void)
 
void unmuteAudioMonitor (void)
 
virtual void customEvent (QEvent *qce)
 
void widgetDestroyed (QObject *obj)
 
- Protected Slots inherited from ConfigDialog
void notificationFromDialog (const Parameter &p)
 
virtual void dClosed (int r)
 
virtual void hClosed (int r)
 

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
- Protected Member Functions inherited from RELACSPlugin
virtual void setPluginSet (const string &pluginset)
 
void printlog (const string &s) const
 
void warning (const string &s, double timeout=0.0)
 
void info (const string &s, double timeout=0.0)
 
void postCustomEvent (int type=0)
 
int maxVoltages (const InData &data, vector< double > &ranges) const
 
int maxValues (const InData &data, vector< double > &ranges) const
 
void setGain (const InData &data, int gainindex)
 
void adjustGain (const InData &data, double maxvalue)
 
void adjustGain (const InData &data, double minvalue, double maxvalue)
 
void adjust (const InData &data, double tbegin, double tend, double threshold)
 
void adjust (const InData &data, double duration, double threshold)
 
int activateGains (void)
 
Controlcontrol (int index)
 
Controlcontrol (const string &name)
 
OptionscontrolOpts (int index)
 
OptionscontrolOpts (const string &name)
 
void lockControl (int index)
 
void lockControl (const string &name)
 
void unlockControl (int index)
 
void unlockControl (const string &name)
 
Modelmodel (void)
 
OptionsmodelOpts (void)
 
void lockModel (void)
 
void unlockModel (void)
 
ReProsrepros (void)
 
OptionsreprosDialogOpts (void)
 
ReProrepro (int index)
 
ReProrepro (const string &name)
 
OptionsreproOpts (int index)
 
OptionsreproOpts (const string &name)
 
void lockRePro (int index)
 
void lockRePro (const string &name)
 
void unlockRePro (int index)
 
void unlockRePro (const string &name)
 
ReProcurrentRePro (void)
 
OptionscurrentReProOpts (void)
 
void lockCurrentRePro (void)
 
void unlockCurrentRePro (void)
 
void setWaitMouseCursor (void)
 
void restoreMouseCursor (void)
 
- Protected Member Functions inherited from ConfigDialog
void setDialogOpen (bool open=true)
 
void setHelpOpen (bool open=true)
 

Friends

class ReProThread
 

Additional Inherited Members

- Public Slots inherited from RELACSPlugin
virtual void saveDoxygenOptions (void)
 
virtual void saveWidget (void)
 
- Public Slots inherited from ConfigDialog
virtual void help (void)
 
virtual void notifyDialog (const Options &opt)
 
- Signals inherited from ConfigDialog
void dialogAccepted (void)
 
void dialogAction (int r)
 
void dialogClosed (int r)
 
- Static Public Member Functions inherited from ConfigClass
static void setConfigureClasses (ConfigureClasses *cfg)
 
- Static Public Member Functions inherited from Options
static double floorLog10 (double v)
 
static double floor10 (double v, double scale=1.0)
 
static double ceil10 (double v, double scale=1.0)
 
- Protected Attributes inherited from RELACSPlugin
RELACSWidgetRW
 
- Protected Attributes inherited from ConfigDialog
Options DialogOptions
 

Detailed Description

Parent class of all research programs.

Author
Jan Benda
Christian Machens
Todo:

~RePro: auto remove from RePros?

addPath: something with a format string giving the RePro's name, totalRuns, etc.

Member Enumeration Documentation

enum DoneState

Different return values for the main() function.

Enumerator
Completed 

The RePro completed its job and terminated normally.

Aborted 

The RePro terminated before completing its job (usually due to a request by the user).

Failed 

The RePro was not able to do its job properly.

Continue 

Keep executing the RePro. Don't use this as a return value for main().

Constructor & Destructor Documentation

RePro ( const string &  name,
const string &  pluginset = "",
const string &  author = "unknown",
const string &  version = "unknown",
const string &  date = __DATE__ 
)

Constructs a RePro with name name (has to be identical to the class name) that belongs to the set of plugins named pluginset. The implementation of a class derived from RePro has the version version and was written by author on date. The date defaults to the date of compilation.

References ConfigDialog::addDialogStyle(), RePro::Continue, OptWidget::HideStyle, RePro::ReProThread, and OptWidget::TabSectionStyle.

~RePro ( void  )
virtual

Destructs a RePro.

Member Function Documentation

void setName ( const string &  name)
virtual

Set the name of the RePro to name.

Reimplemented from RELACSPlugin.

References ConfigClass::setConfigIdent(), and RELACSPlugin::setName().

void readConfig ( StrQueue sq)
virtual

Read the RePro's default settings from the config file.

Reimplemented from ConfigClass.

References ConfigClass::readConfig(), and Options::setToDefaults().

void saveConfig ( ofstream &  str)
virtual

Saves the RePro's default settings to the config file.

Reimplemented from ConfigClass.

References ConfigClass::saveConfig(), and Options::setDefaults().

virtual int main ( void  )
pure virtual

This function is called when the RePro is started. You need to implement this function with some useful code, e.g. read options, create and play stimulus, analyze the read voltage traces and events, etc. This function is executed as a thread. Within this thread the RePro is locked (via lock()). Access to those data is unlocked during sleep(), sleepOn(), and sleepWait(). Beware that main() is executed in a thread different from the GUI thread. Use postCustomEvent() to call some functions that eventually paint something on the screen. The function should return one of the DoneStates except Continue. After main() terminated a message is written ( "Repro succesfully completed", "RePro stopped" or "RePro interupted", depending on the return value) and RELACS is informed. You need to return from main() if the sleep(), sleepOn(), or interrupt() functions return true. Also, if you lock() and unlock() the RePro manually, you should check interrupt() directly after each unlock(). If interrupt() returns true, you should be careful with posting custom events via postCustomEvent, since they might be executed after the RePro terminated. This includes calling message() and Plot::draw() or MultiPlot::draw(). The RePro's widget is enabled during execution of main().

See Also
interrupt(), sleep(), timeStamp(), sleepOn(), sleepWait(), enable()

Implemented in DefaultRePro.

bool interrupt ( void  ) const

Returns true if the RePro thread should be stopped immediately. Use this from within main()

int main( void )
{
...
if ( interrupt() )
return Aborted;
...
}

Referenced by RePro::sleep().

void start ( QThread::Priority  priority = QThread::InheritPriority)

Start execution of the RePro thread. Reimplement main() to make the thread do something.

Referenced by RELACSWidget::startRePro().

void requestStop ( void  )
virtual

Kindly ask the RePro to stop. Sets interrupt() to true and terminates all sleeps. You still need to wait on the RePro thread to finish.

References RePro::stopWrite().

Referenced by RELACSWidget::stopRePro().

bool isRunning ( void  ) const

Returns true if the RePro therad is running.

Referenced by RELACSWidget::stopRePro().

bool wait ( double  time = -1.0)

Wait on the RePro's thread to terminate or at most time seconds, if time is greater than zero.

References relacs::floor().

Referenced by RELACSWidget::stopRePro().

bool sleep ( double  t,
double  tracetime = -1.0 
)

Sleep for some time. Right before returning, the data and event buffers are updated.

Parameters
[in]tthe time to sleep in seconds.
[in]tracetimethe size the input data should have after the sleep. For internal use only!
Returns
true if the main() thread needs to be stopped.
See Also
sleepOn(), timeStamp(), sleepWait(), interrupt()

References RELACSPlugin::currentTime(), RELACSPlugin::getData(), RePro::interrupt(), ConfigDialog::mutex(), RELACSPlugin::RW, and RELACSWidget::updateRePro().

Referenced by DefaultRePro::main(), and RePro::sleepOn().

void timeStamp ( void  )

Memorize the current time. This time is used by sleepOn() to calculate the remaining time to sleep.

See Also
sleepOn(), sleep(), sleepWait()

References RELACSPlugin::currentTime().

bool sleepOn ( double  t)

Sleep for t seconds relative to the last call of timeStamp(). Right before returning, the data and event buffers are updated.

Parameters
[in]tthe time to sleep since the last call to timeStamp() in seconds.
Returns
true if the main() thread needs to be stopped.
See Also
sleep(), sleepWait(), timeStamp(), interrupt()

References RePro::sleep().

bool sleepWait ( double  time = -1.0)

Wait on the RePro's waitcondition for sleeping or sleep for the specified time. The data and event buffers are NOT updated after sleeping.

Parameters
[in]timethe maximum time to be waiting for, i.e. the time to sleep in seconds. If time is smaller than zero, sleepWait() waits forever.
Returns
false if sleepWait() slept for the specified time, true if sleeping was interrupted by wake().
See Also
wake()

References RELACSPlugin::getData(), and ConfigDialog::mutex().

void wake ( void  )

Wake all threads that wait on the RePro's waitcondition for sleeping. In particular, interrupt a sleep(), sleepOn(), or sleepWait().

See Also
sleepWait()
void enable ( void  )

Enable the RePro's widget, i.e. allow inputs to its GUI elements.

See Also
disable()

References RELACSPlugin::postCustomEvent().

void disable ( void  )

Disable the RePro's widget, i.e. do not allow inputs to its GUI elements.

See Also
enable()

References RELACSPlugin::postCustomEvent().

Referenced by ReProData::reload(), and RePros::RePros().

void sessionStarted ( void  )
virtual

Reimplement this function to reset or initialize your RePro when a new session is started. The current implementation resets the counters completeRuns(), totalRuns(), allRuns(), failedRuns(). So you should call from your implementation RePro::sessionStarted().

Reimplemented from RELACSPlugin.

Referenced by RePros::sessionStarted().

void sessionStopped ( bool  saved)
virtual

Reimplement this function to reset your RePro after a session is stopped. If the session was saved saved is set to true. The current implementation resets the counters completeRuns(), totalRuns(), allRuns(), failedRuns(). So you should call from your implementation RePro::sessionStopped( saved ).

Reimplemented from RELACSPlugin.

Referenced by RePros::sessionStopped().

bool completed ( void  ) const

In main(): true if previous call of this RePro was completed, i.e. main() returned Completed.

See Also
aborted(), failed(), completeRuns()

References RePro::Completed.

bool aborted ( void  ) const

In main(): true if previous call of this RePro was aborted by the user, i.e. main() returned Aborted.

See Also
completed(), failed(), totalRuns()

References RePro::Aborted.

bool failed ( void  ) const

In main(): true if previous call of this RePro failed, i.e. main() returned Failed.

See Also
completed(), aborted(), failedRuns()

References RePro::Failed.

int completeRuns ( void  ) const

Number of completed runs of this RePro (main() returned Completed) since last call of sessionStarted() or sessionStopped().

See Also
completed(), totalRuns(), allRuns(), failedRuns()
int totalRuns ( void  ) const

Number of runs of this RePro which did not fail since last call of sessionStarted() or sessionStopped(). i.e. where main() returned Aborted or Completed.

See Also
completeRuns(), allRuns(), failedRuns()
int allRuns ( void  ) const

Number of runs of this RePro since last call of sessionStarted() or sessionStopped().

See Also
completeRuns(), totalRuns(), failedRuns()

Referenced by SaveFiles::save().

int failedRuns ( void  ) const

Number of runs of this RePro which failed (main() returned Failed) since last call of sessionStarted() or sessionStopped().

See Also
completeRuns(), totalRuns(), allRuns()
double reproTime ( void  ) const

Time in seconds this RePro is currently running.

See Also
reproTimeStr()

Referenced by RePro::reproTimeStr().

string reproTimeStr ( void  ) const
double reproStartTime ( void  ) const

The time of the session when the RePro was started in seconds.

int testWrite ( OutData signal)

Test of a single output signal signal for validity. Returns 0 on success or a negative number if signal is not valid. The error state of signal is set appropriately.

References RELACSPlugin::RW, and Acquire::testWrite().

int testWrite ( OutList signal)

Test of a multiple output signals signal for validity. Returns 0 on success or a negative number if signal is not valid. The error state of signal is set appropriately.

References RELACSPlugin::RW, and Acquire::testWrite().

int write ( OutData signal,
bool  setsignaltime = true 
)

Blocking output of a signal signal. The function blocks until the output of the signal finished. See OutData about how to specify output channel, sampling rate, intensity, delay, etc.

Parameters
[in]signalThe signal to be written out on an analog output.
[in]setsignalif set true (default) then the start time of this signal is recorded.
Returns
0 on success. If the output of the signal failed, a negative number is returned and the reason is specified in the error state of signal.

References RELACSPlugin::getData(), SampleData< T >::length(), ConfigDialog::lock(), RELACSPlugin::RW, RELACSPlugin::signalTime(), ConfigDialog::unlock(), and RELACSWidget::write().

int write ( OutList signal,
bool  setsignaltime = true 
)

Blocking output of multiple signals signal. The function blocks until the output of the signal finished. See OutList about how to specify output channel, sampling rate, intensity, delay, etc.

Parameters
[in]signalThe signals to be written out on analog outputs.
[in]setsignalif set true (default) then the start time of this signal is recorded.
Returns
0 on success. If the output of the signal failed, a negative number is returned and the reason is specified in the error state of signal.

References RELACSPlugin::getData(), ConfigDialog::lock(), OutList::maxLength(), RELACSPlugin::RW, RELACSPlugin::signalTime(), ConfigDialog::unlock(), and RELACSWidget::write().

int startWrite ( OutData signal,
bool  setsignaltime = true 
)

Non-blocking output of a signal signal. The function returns immediately after signal output has been initiated. See OutData about how to specify output channel, sampling rate, intensity, delay, etc.

Parameters
[in]signalThe signal to be written out on an analog output.
[in]setsignalif set true (default) then the start time of this signal is recorded.
Returns
0 on success. If the output of the signal failed, a negative number is returned and the reason is specified in the error state of signal.
Note
During the output of the stimulus, signal must exist and must not be modified!

References RELACSPlugin::RW, and RELACSWidget::write().

int startWrite ( OutList signal,
bool  setsignaltime = true 
)

Non-blocking output of multiple signals signal. The function returns immediately after signal output has been initiated. See OutList about how to specify output channel, sampling rate, intensity, delay, etc.

Parameters
[in]signalThe signals to be written out on analog outputs.
[in]setsignalif set true (default) then the start time of the signals is recorded.
Returns
0 on success. If the output of the signal failed, a negative number is returned and the reason is specified in the error state of signal.
Note
During the output of the stimulus, signal must exist and must not be modified!

References RELACSPlugin::RW, and RELACSWidget::write().

int directWrite ( OutData signal,
bool  setsignaltime = true 
)

Direct output of a single data value as specified by signal to the DAQ board. Only the output trace ( OutData::setTrace() ) or the the name of the output trace ( OutData::setTraceName() ), as well as the single data value need to be specified. If setsignal is set true (default) then the start time of this signal is recorded.

Returns
0 on success, a negative number if the output of the signal failed. The reason for the failure is specified in the error state of signal.

References RELACSWidget::directWrite(), and RELACSPlugin::RW.

int directWrite ( OutList signal,
bool  setsignaltime = true 
)

Direct output of single data values as specified by signal to different channels of the DAQ board. Only the output traces ( OutData::setTrace() ) or the the name of the output traces ( OutData::setTraceName() ), as well as the single data values need to be specified. If setsignal is set true (default) then the start time of this signal is recorded.

Returns
0 on success, a negative number if the output of the signals failed. The reason for the failure is specified in the error state of signal.

References RELACSWidget::directWrite(), and RELACSPlugin::RW.

int writeZero ( int  channel,
int  device 
)

Set the output of channel channel on device device to zero. Returns 0 on success or a negative number on error. If device is negative, the default device is used.

References RELACSPlugin::RW, and Acquire::writeZero().

int writeZero ( int  index)

Set the output of the trace with index index to zero. Returns 0 on success or a negative number on error.

References RELACSPlugin::RW, and Acquire::writeZero().

int writeZero ( const string &  trace)

Set the output of the trace with name trace to zero. Returns 0 on success or a negative number on error.

References RELACSPlugin::RW, and Acquire::writeZero().

int stopWrite ( void  )

Stop analog output of all analog output devices.

References RELACSPlugin::RW, and RELACSWidget::stopWrite().

Referenced by RePro::requestStop().

double minLevel ( int  trace) const

Returns the minimum possible attenuation level for the output trace at index trace. If trace is invalid or trace is not connected to an attenuator then OutData::NoLevel is returned.

See Also
maxLevel()

References Acquire::minLevel(), and RELACSPlugin::RW.

double minLevel ( const string &  trace) const

Returns the minimum possible attenuation level for output trace with name trace.

References Acquire::minLevel(), and RELACSPlugin::RW.

double maxLevel ( int  trace) const

Returns the maximum possible attenuation level for the output trace at index trace. If trace is invalid or trace is not connected to an attenuator then OutData::NoLevel is returned.

See Also
minLevel()

References Acquire::maxLevel(), and RELACSPlugin::RW.

double maxLevel ( const string &  trace) const

Returns the maximum possible attenuation level for output trace with name trace.

References Acquire::maxLevel(), and RELACSPlugin::RW.

void levels ( int  trace,
vector< double > &  l 
) const

Returns in l all possible attenuation levels sorted by increasing attenuation levels (highest last) for the output trace at index trace. If trace is invalid or trace is not connected to an attenuator then l is returned empty.

See Also
minLevel(), maxLevel()

References Acquire::levels(), and RELACSPlugin::RW.

void levels ( const string &  trace,
vector< double > &  l 
) const

Returns in l all possible attenuation levels sorted by increasing attenuation levels (highest last) for the output trace with name trace.

References Acquire::levels(), and RELACSPlugin::RW.

double minIntensity ( int  trace,
double  frequency = 0.0 
) const

Returns the minimum possible intensity at the given stimulus frequency for the output trace at index trace. If trace is invalid or trace is not connected to an attenuator then OutData::NoIntensity is returned.

See Also
maxIntensity(), minLevel(), maxLevel()

References Acquire::minIntensity(), and RELACSPlugin::RW.

double minIntensity ( const string &  trace,
double  frequency = 0.0 
) const

Returns the minimum possible intensity for output trace with name trace.

References Acquire::minIntensity(), and RELACSPlugin::RW.

double maxIntensity ( int  trace,
double  frequency = 0.0 
) const

Returns the maximum possible intensity at the given stimulus frequency for the output trace at index trace. If trace is invalid or trace is not connected to an attenuator then OutData::NoIntensity is returned.

See Also
minIntensity(), minLevel(), maxLevel()

References Acquire::maxIntensity(), and RELACSPlugin::RW.

double maxIntensity ( const string &  trace,
double  frequency = 0.0 
) const

Returns the maximum possible intensity for output trace with name trace.

References Acquire::maxIntensity(), and RELACSPlugin::RW.

void intensities ( int  trace,
vector< double > &  ints,
double  frequency = 0.0 
) const

Returns in ints all possible intensities at the given stimulus frequency sorted by increasing intensities for the output trace at index trace. If trace is invalid or trace is not connected to an attenuator then intens is returned empty.

See Also
minIntensity(), maxIntensity()

References Acquire::intensities(), and RELACSPlugin::RW.

void intensities ( const string &  trace,
vector< double > &  ints,
double  frequency = 0.0 
) const

Returns in ints all possible intensities at the given stimulus frequency sorted by increasing intensities for the output trace with name trace.

References Acquire::intensities(), and RELACSPlugin::RW.

void setMessage ( bool  message = true)

Print the default messages if message is true. This is the default.

See Also
noMessage(), message()

References RePro::message().

void noMessage ( void  )

Do not print any of the default messages.

See Also
setMessage(), message()

Referenced by DefaultRePro::main().

void message ( const string &  msg)

Write a message msg in the right half of the status line.

See Also
setMessage(), noMessage()

References RePros::message(), and RELACSPlugin::repros().

Referenced by RePro::setMessage().

string addPath ( const string &  file) const

Stores file in the list of files for this run of the RePro.

Returns
file added to the base path for the current session.

References SaveFiles::addPath(), RELACSPlugin::RW, and SaveFiles::storeFile().

void keepFocus ( void  )

Call this function in the beginning of the main() function, if your implementation includes some interactive widgets and you do not want RELACS to automatically remove the keyboard focus from these widgets after some timeout.

References RELACSPlugin::RW, KeyTimeOut::setNoFocusWidget(), and RELACSPlugin::widget().

void grabKey ( int  key)

Add key to the list of keys that are forced to be passed to keyPressEvent(). You need to handle this key event in a reimplementation of keyPressEvent().

void releaseKey ( int  key)

Remove key from the list of keys that are forced to be passed to keyPressEvent().

References Options::empty(), and RePro::releaseKeys().

void releaseKeys ( void  )

Empty the list of keys that are forced to be passed to keyPressEvent().

Referenced by RePro::customEvent(), and RePro::releaseKey().

int softStop ( void  )

How many requests to stop the repro are there since the RePro was started?

See Also
setSoftStop(), clearSoftStop(), setSoftStopKey()
void setSoftStop ( int  s = 1)

Set the number of requested stops for the repro to s.

See Also
softStop(), clearSoftStop(), setSoftStopKey()
void clearSoftStop ( void  )

Set the number of requested stops for the repro to zero.

See Also
softStop(), setSoftStop(), setSoftStopKey()
void setSoftStopKey ( int  keycode)

Set the keycode initiating a soft stop to keycode.

See Also
softStop(), setSoftStop(), clearSoftStop()
void tracePlotOn ( bool  on = true)

Switch plotting of raw traces on (on = true, default) or off (off = false).

See Also
tracePlotOff(), tracePlotSignal(), tracPlotContinuous()

References RELACSPlugin::RW, and PlotTrace::setPlotOn().

void tracePlotOff ( void  )

Switch plotting of raw traces off.

See Also
tracePlotOn(), tracePlotSignal(), tracPlotContinuous()

References RELACSPlugin::RW, and PlotTrace::setPlotOff().

void tracePlotSignal ( double  length,
double  offs = 0.0 
)

Raw traces are plotted relative to the beginning of the last output signal in a window of length seconds width. The start time of the signal is offs seconds from the left margin of that window.

See Also
tracePlotOn(), tracPlotContinuous()

References RELACSPlugin::RW, and PlotTrace::setPlotNextSignal().

void tracePlotSignal ( void  )

Raw traces are plotted relative to the beginning of the last output signal. The width of the plot window is not changed.

See Also
tracePlotOn(), tracPlotContinuous()

References RELACSPlugin::RW, and PlotTrace::setPlotNextSignal().

void tracePlotContinuous ( double  length)

Raw traces are plotted continuously in a window of length seconds width.

See Also
tracePlotOn(), tracPlotSignal()

References RELACSPlugin::RW, and PlotTrace::setPlotContinuous().

void tracePlotContinuous ( void  )

Raw traces are plotted continuously. The width of the plot window is not changed.

See Also
tracePlotOn(), tracPlotSignal()

References RELACSPlugin::RW, and PlotTrace::setPlotContinuous().

Referenced by DefaultRePro::main().

string macroName ( void  )

Return the name of the currently running macro. If the RePro was called from the RePro menu then "RePro" is returned.

References RePros::macroName(), and RELACSPlugin::repros().

string macroParam ( void  )

Return the parameters of the currently running macro.

References RePros::macroParam(), and RELACSPlugin::repros().

string reproPath ( bool  version = true)

Return a path where the RePro can store some global stuff. This is the repropath from the RELACS settings plus the name of the RePro. If version is true, a subdirectory is created for each version of the RePro.

See Also
addReProPath()

References Str::find(), Str::left(), RELACSPlugin::lockRelacsSettings(), Str::lower(), ConfigDialog::name(), RELACSPlugin::path(), Str::provideSlash(), RELACSPlugin::relacsSettings(), Options::text(), RELACSPlugin::unlockRelacsSettings(), and ConfigDialog::version().

Referenced by RePro::addReProPath().

string addReProPath ( const string &  file,
bool  version = true 
)

Returns file added to the reproPath().

See Also
reProPath()

References RePro::reproPath().

void dialog ( void  )
virtual
Options & overwriteOptions ( void  )
string checkOptions ( const string &  opttxt)

Check for valid options.

Parameters
[in]opttxtstring with options that are tesed for validity
Returns
error message

References Options::read(), and Options::warning().

Referenced by MacroCommand::checkOptions().

void setSaving ( bool  saving)
virtual

Determine whether data (voltage traces and event lists) of this run of the RePro should be saved to disk. Only during a running session, data can be saved to disk. By default, data are saved to disk.

Note
Call this function at the very beginning of your main() code, i.e. before writing any stimulus, if you want to save nothing during the run of the RePro.
See Also
SaveFiles::writing(), noSaving()

References RELACSPlugin::RW, and SaveFiles::save().

Referenced by RePro::noSaving(), RELACSWidget::startRePro(), and RELACSWidget::stopSession().

void noSaving ( void  )

Indicate that the data of this RePro don't have to be saved to disk.

Note
Call this function at the very beginning of your main() code, i.e. before writing any stimulus, if you want to save nothing during the run of the RePro. Shortcut for setSaving( false ).

References RePro::setSaving().

bool eventFilter ( QObject *  watched,
QEvent *  e 
)
virtual

The eventfilter that is used to grab keys.

See Also
grabKey()

Reimplemented from RELACSPlugin.

References RELACSPlugin::eventFilter(), RePro::keyPressEvent(), and RELACSPlugin::widget().

void keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Reimplement this function to handle key-press events. This implementation handles softStop()

Reimplemented from RELACSPlugin.

Referenced by RePro::eventFilter().

void keyReleaseEvent ( QKeyEvent *  event)
protectedvirtual

Reimplement this function to handle key-release events.

Reimplemented from RELACSPlugin.

void customEvent ( QEvent *  qce)
protectedvirtualslot

If you reimplement this event handler, don't forget to call this implementation via RePro::customEvent().

Note
Make sure that you do not block this forever! This will freeze the GUI! Better use tryLock() and if this fails, post the event again.
See Also
RELACSPlugin::postCustomEvent()

References RELACSPlugin::customEvent(), RePro::releaseKeys(), and RELACSPlugin::widget().

Friends And Related Function Documentation

friend class ReProThread
friend

Referenced by RePro::RePro().

Member Data Documentation

const int MacroFlag = Parameter::ChangedFlag >> 1
static
const int OverwriteFlag = Parameter::ChangedFlag >> 2
static
const int CurrentFlag = Parameter::ChangedFlag >> 3
static

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