Relacs
0.9.8
|
#include <control.h>
Public Member Functions | |
Control (const string &name, const string &pluginset="", const string &author="unknown", const string &version="unknown", const string &date=__DATE__) | |
virtual | ~Control (void) |
virtual void | setName (const string &name) |
virtual void | initDevices (void) |
void | start (void) |
virtual void | requestStop (void) |
bool | wait (double time=-1.0) |
virtual void | addActions (QMenu *menu, bool doxydoc) |
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 Options & | settings (void) const |
Options & | settings (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 InList & | traces (void) const |
const InData & | trace (int index) const |
const InData & | trace (const string &ident) const |
int | traceIndex (const string &ident) const |
string | traceNames (void) const |
string | rawTraceNames (void) const |
const EventList & | events (void) const |
const EventData & | events (int index) const |
const EventData & | events (const string &ident) const |
const EventData & | stimulusEvents (void) const |
const EventData & | restartEvents (void) const |
const EventData & | recordingEvents (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 TraceSpec & | outTrace (int index) const |
const TraceSpec & | outTrace (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 |
Options & | relacsSettings (void) |
const Options & | relacsSettings (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 |
Options & | stimulusData (void) |
const Options & | stimulusData (void) const |
int | stimulusDataTraceFlag (void) const |
void | lockStimulusData (void) const |
void | unlockStimulusData (void) const |
QMutex * | stimulusDataMutex (void) |
MetaData & | metaData (void) |
const MetaData & | metaData (void) const |
void | lockMetaData (void) const |
void | unlockMetaData (void) const |
QMutex * | metaDataMutex (void) |
AllDevices * | devices (void) const |
Device * | device (const string &ident) |
void | updateDeviceMenu (void) |
DigitalIO * | digitalIO (const string &ident) |
Trigger * | trigger (const string &ident) |
Attenuate * | attenuator (const string &name) |
Filter * | filter (const string &name) |
Filter * | filterTrace (int index) |
Filter * | filterTrace (const string &name) |
Options & | filterOpts (const string &name) |
Options & | filterTraceOpts (int index) |
Options & | filterTraceOpts (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) |
Filter * | detector (const string &name) |
Filter * | detectorEvents (int index) |
Filter * | detectorEvents (const string &name) |
Options & | detectorOpts (const string &name) |
Options & | detectorEventsOpts (int index) |
Options & | detectorEventsOpts (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 |
virtual void | sessionStarted (void) |
virtual void | sessionStopped (bool saved) |
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 OptWidget * | dialogOptions (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 void | readConfig (StrQueue &sq) |
virtual void | saveConfig (ofstream &str) |
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) |
Options & | operator= (const Options &o) |
Options & | assign (const Options &o) |
Options & | append (const Options &o) |
Options & | add (const Options &o) |
Options & | insert (const Options &o, const string &atname="") |
Options & | assign (const Options &o, int flags) |
Options & | copy (Options &o, int flags) |
Options & | append (const Options &o, int flags) |
Options & | add (const Options &o, int flags) |
Options & | insert (const Options &o, int flags, const string &atname="") |
Parameter * | assign (const string &name, const string &value) |
Options * | parentSection (void) |
const Options * | parentSection (void) const |
void | setParentSection (Options *parentsection) |
void | resetParents (void) |
Options * | rootSection (void) |
const Options * | rootSection (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 |
Options & | setFlag (int flag) |
Options & | addFlag (int flag) |
Options & | delFlag (int flag) |
Options & | clearFlag (void) |
int | style (void) const |
Options & | setStyle (int style) |
Options & | addStyle (int style) |
Options & | delStyle (int style) |
Options & | clearStyle (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 Parameter & | operator[] (int i) const |
Parameter & | operator[] (int i) |
const Parameter & | operator[] (const string &name) const |
Parameter & | operator[] (const string &name) |
const Options & | section (int i) const |
Options & | section (int i) |
const Options & | section (const string &name) const |
Options & | section (const string &name) |
Str | request (const string &name) const |
Parameter & | setRequest (const string &name, const string &request) |
Parameter::ValueType | valueType (const string &name) const |
Parameter & | setValueType (const string &name, Parameter::ValueType type) |
int | flags (const string &name) const |
bool | flags (const string &name, int flag) const |
Parameter & | setFlags (const string &name, int flags) |
Parameter & | addFlags (const string &name, int flags) |
Parameter & | delFlags (const string &name, int flags) |
Parameter & | clearFlags (const string &name) |
bool | changed (const string &name) |
int | style (const string &name) const |
Parameter & | setStyle (const string &name, int style) |
Parameter & | addStyle (const string &name, int style) |
Parameter & | delStyle (const string &name, int style) |
Str | format (const string &name) const |
Parameter & | setFormat (const string &name, int width=0, int prec=-1, char fmt='g') |
Parameter & | setFormat (const string &name, const string &format) |
int | formatWidth (const string &name) const |
int | size (const string &name) const |
Parameter & | add (const Parameter &np) |
Parameter & | insert (const Parameter &np, const string &atname="") |
Parameter & | addText (const string &name, const string &request, const string &dflt, int flags=0, int style=0) |
Parameter & | addText (const string &name, const string &dflt="", int flags=0, int style=0) |
Parameter & | insertText (const string &name, const string &atname, const string &request, const string &dflt, int flags=0, int style=0) |
Parameter & | insertText (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 |
Parameter & | setText (const string &name, const string &strg) |
Parameter & | setText (const string &name, const Parameter &p) |
Parameter & | pushText (const string &name, const string &strg) |
Str | defaultText (const string &name, const string &format="", const string &unit="") const |
Parameter & | setDefaultText (const string &name, const string &dflt) |
Parameter & | addSelection (const string &name, const string &request, const string &selection, int flags=0, int style=0) |
Parameter & | addSelection (const string &name, const string &selection="", int flags=0, int style=0) |
Parameter & | insertSelection (const string &name, const string &atname, const string &request, const string &selection, int flags=0, int style=0) |
Parameter & | insertSelection (const string &name, const string &atname="", const string &selection="", int flags=0, int style=0) |
Parameter & | selectText (const string &name, const string &strg, int add=0) |
Parameter & | selectText (const string &name, int index) |
int | index (const string &name) const |
int | index (const string &name, const string &strg) const |
Parameter & | addNumber (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) |
Parameter & | addNumber (const string &name, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, double dflt, const string &unit, int flags, int style=0) |
Parameter & | addNumber (const string &name, double dflt, double error, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (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) |
Parameter & | insertNumber (const string &name, const string &atname, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (const string &name, const string &atname, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (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 |
Parameter & | setNumber (const string &name, double number, double error, const string &unit="") |
Parameter & | setNumber (const string &name, double number, const string &unit="") |
Parameter & | pushNumber (const string &name, double number, double error=-1.0, const string &unit="") |
Parameter & | pushNumber (const string &name, double number, const string &unit) |
Parameter & | setNumber (const string &name, const Parameter &p) |
double | defaultNumber (const string &name, const string &unit="") const |
Parameter & | setDefaultNumber (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 |
Parameter & | setStep (const string &name, double step, const string &unit="") |
Parameter & | setMinMax (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 |
Parameter & | setUnit (const string &name, const string &internunit, const string &outunit="") |
Parameter & | setOutUnit (const string &name, const string &outputunit) |
Parameter & | changeUnit (const string &name, const string &internunit) |
Parameter & | addInteger (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) |
Parameter & | addInteger (const string &name, long dflt, const string &unit="", int width=0, int flags=0, int style=0) |
Parameter & | addInteger (const string &name, const string &unit="") |
Parameter & | insertInteger (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) |
Parameter & | insertInteger (const string &name, const string &atname, long dflt, const string &unit="", int width=0, int flags=0, int style=0) |
Parameter & | insertInteger (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 |
Parameter & | setInteger (const string &name, long number, long error, const string &unit="") |
Parameter & | setInteger (const string &name, long number, const string &unit="") |
Parameter & | pushInteger (const string &name, long number, long error, const string &unit="") |
Parameter & | pushInteger (const string &name, long number, const string &unit="") |
Parameter & | setInteger (const string &name, const Parameter &p) |
long | defaultInteger (const string &name, const string &unit="") const |
Parameter & | setDefaultInteger (const string &name, long dflt, const string &unit="") |
Parameter & | setMinMax (const string &name, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="") |
Parameter & | setMinMax (const string &name, int minimum, int maximum, int step=1, const string &unit="") |
Parameter & | addBoolean (const string &name, const string &request, bool dflt, int flags=0, int style=0) |
Parameter & | addBoolean (const char *name, const char *request, bool dflt, int flags=0, int style=0) |
Parameter & | addBoolean (const string &name, bool dflt, int flags=0, int style=0) |
Parameter & | addBoolean (const char *name, bool dflt, int flags=0, int style=0) |
Parameter & | insertBoolean (const string &name, const string &atname="", const string &request="", bool dflt=false, int flags=0, int style=0) |
Parameter & | insertBoolean (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 |
Parameter & | setBoolean (const string &name, bool b) |
Parameter & | setBoolean (const string &name, const Parameter &p) |
bool | defaultBoolean (const string &name) const |
Parameter & | setDefaultBoolean (const string &name, bool dflt) |
Parameter & | addDate (const string &name, const string &request, int year=0, int month=0, int day=0, int flags=0, int style=0) |
Parameter & | addDate (const string &name, int year, int month, int day, int flags=0, int style=0) |
Parameter & | addDate (const string &name, int flags=0, int style=0) |
Parameter & | insertDate (const string &name, const string &atname="", const string &request="", int year=0, int month=0, int day=0, int flags=0, int style=0) |
Parameter & | insertDate (const string &name, const string &atname, int year=0, int month=0, int day=0, int flags=0, int style=0) |
Parameter & | insertDate (const string &name, const string &atname, int flags=0, int style=0) |
const Parameter & | date (const string &name, int index, int &year, int &month, int &day) const |
Parameter & | setDate (const string &name, int year, int month, int day) |
Parameter & | setDate (const string &name, const string &date) |
Parameter & | setDate (const string &name, const struct tm &date) |
Parameter & | setDate (const string &name, const time_t &time) |
Parameter & | setCurrentDate (const string &name) |
Parameter & | setDate (const string &name, const Parameter &p) |
const Parameter & | defaultDate (const string &name, int index, int &year, int &month, int &day) const |
Parameter & | setDefaultDate (const string &name, int year, int month, int day) |
Parameter & | addTime (const string &name, const string &request, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0) |
Parameter & | addTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0, int flags=0, int style=0) |
Parameter & | addTime (const string &name, int flags=0, int style=0) |
Parameter & | insertTime (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) |
Parameter & | insertTime (const string &name, const string &atname, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0) |
Parameter & | insertTime (const string &name, const string &atname, int flags=0, int style=0) |
const Parameter & | time (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const |
Parameter & | setTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0) |
Parameter & | setTime (const string &name, const string &time) |
Parameter & | setTime (const string &name, const struct tm &time) |
Parameter & | setTime (const string &name, const time_t &time) |
Parameter & | setCurrentTime (const string &name) |
Parameter & | setTime (const string &name, const Parameter &p) |
const Parameter & | defaultTime (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const |
Parameter & | setDefaultTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0) |
Options & | newSection (int level, const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSection (int level, const string &name, int flag, int style=0) |
Options & | newSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSection (const string &name, int flag, int style=0) |
Options & | newSubSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSubSection (const string &name, int flag, int style=0) |
Options & | newSubSubSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSubSubSection (const string &name, int flag, int style=0) |
Options & | addSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | addSection (const string &name, int flag, int style=0) |
Options & | insertSection (const string &name, const string &atpattern, const string &type="", int flag=0, int style=0) |
Options & | insertSection (const string &name, const string &atpattern, int flag, int style=0) |
Options & | newSection (int level, const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (int level, const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (int level, const Options &opt, const string &name, int flag, int style=0) |
Options & | newSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | newSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | newSubSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSubSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | addSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | addSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | addSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | insertSection (const Options &opt, int selectmask, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0) |
Options & | insertSection (const Options &opt, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0) |
Options & | insertSection (const Options &opt, const string &name, const string &atpattern, int flag, int style=0) |
Options & | newSection (Options *opt, bool newparent=false) |
Options & | addSection (Options *opt, bool newparent=false) |
Options & | insertSection (Options *opt, const string &atpattern, bool newparent=false) |
Options & | newSections (Options *opt, bool newparent=false) |
void | endSection (void) |
void | clearSections (void) |
void | setSection (Options &opt) |
void | lastSection (void) |
int | up (void) |
int | down (void) |
Parameter & | setDefault (const string &name) |
Options & | setDefaults (int flags=0) |
Parameter & | setToDefault (const string &name) |
Options & | setToDefaults (int flags=0) |
Options & | erase (iterator p) |
Options & | erase (section_iterator p) |
Options & | erase (Options *s) |
Options & | erase (const string &pattern) |
Options & | erase (int selectflag) |
Options & | pop (void) |
Options & | popSection (void) |
Options & | flatten (Options *root=0) |
Options & | clear (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 |
Options & | setFlags (int flags, int selectflag=0) |
Options & | addFlags (int flags, int selectflag=0) |
Options & | delFlags (int flags, int selectflag=0) |
Options & | setValueTypeFlags (int flags, int typemask) |
Options & | addValueTypeFlags (int flags, int typemask) |
Options & | delValueTypeFlags (int flags, int typemask) |
Options & | setStyles (int style, int selectflag=0) |
Options & | addStyles (int style, int selectflag=0) |
Options & | delStyles (int style, int selectflag=0) |
int | styleSize (int style) const |
Options & | setValueTypeStyles (int style, int typemask) |
Options & | addValueTypeStyles (int style, int typemask) |
Options & | delValueTypeStyles (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 §ionformat="%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 |
Options & | read (const string &opttxt, int flag, const string &assignment=":=", const string &separator=",;", int *indent=0) |
Options & | read (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) |
Options & | read (const StrQueue &sq, int flag=0, const string &assignment=":=") |
bool | read (const Parameter &p, int flag=0) |
Options & | read (const Options &o, int flags=0, int flag=0) |
bool | readAppend (const Parameter &p) |
Options & | readAppend (const Options &o, int flags=0) |
Options & | load (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) |
Options & | load (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 |
Protected Member Functions | |
virtual void | main (void) |
bool | interrupt (void) const |
bool | waitOnData (double time=MAXDOUBLE) |
bool | waitOnReProSleep (double time=MAXDOUBLE) |
bool | waitOnReProFinished (double time=MAXDOUBLE) |
bool | waitOnSessionStart (double time=MAXDOUBLE) |
bool | waitOnSessionPrestop (double time=MAXDOUBLE) |
bool | waitOnSessionStop (double time=MAXDOUBLE) |
bool | sleep (double t) |
void | timeStamp (void) |
bool | sleepOn (double t) |
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) |
Control * | control (int index) |
Control * | control (const string &name) |
Options & | controlOpts (int index) |
Options & | controlOpts (const string &name) |
void | lockControl (int index) |
void | lockControl (const string &name) |
void | unlockControl (int index) |
void | unlockControl (const string &name) |
Model * | model (void) |
Options & | modelOpts (void) |
void | lockModel (void) |
void | unlockModel (void) |
RePros * | repros (void) |
Options & | reprosDialogOpts (void) |
RePro * | repro (int index) |
RePro * | repro (const string &name) |
Options & | reproOpts (int index) |
Options & | reproOpts (const string &name) |
void | lockRePro (int index) |
void | lockRePro (const string &name) |
void | unlockRePro (int index) |
void | unlockRePro (const string &name) |
RePro * | currentRePro (void) |
Options & | currentReProOpts (void) |
void | lockCurrentRePro (void) |
void | unlockCurrentRePro (void) |
virtual void | keyPressEvent (QKeyEvent *event) |
virtual void | keyReleaseEvent (QKeyEvent *event) |
virtual bool | eventFilter (QObject *obj, QEvent *event) |
void | setWaitMouseCursor (void) |
void | restoreMouseCursor (void) |
Protected Member Functions inherited from ConfigDialog | |
void | setDialogOpen (bool open=true) |
void | setHelpOpen (bool open=true) |
Friends | |
class | ControlThread |
Additional Inherited Members | |
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 Slots inherited from RELACSPlugin | |
virtual void | saveDoxygenOptions (void) |
virtual void | saveWidget (void) |
Public Slots inherited from ConfigDialog | |
virtual void | dialog (void) |
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) |
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 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 Attributes inherited from RELACSPlugin | |
RELACSWidget * | RW |
Protected Attributes inherited from ConfigDialog | |
Options | DialogOptions |
Base class for widgets that control hardware or analyze data.
A Control widget can be used to control some hardware or analyze data independently and in parallel to the RePros. Use it to implement things that do not fit in the RePro, Session, or EventDetector concepts.
A Control widget has a name(), the last version() was written by author() on date(). This information is set either by the constructor or by setName(), setAuthor(), setVersion(), and setDate().
The Control is initialized by reimplementing preConfig(), config(), and initDevices().
For continuosly doing something use the Control thread by reimplementing main(). For synchronization with data, repros or sessions use waitOnData(), waitOnReProSleep(), waitOnReProFinished(), waitOnSessionStart(), waitOnSessionPrestop(), waitOnSessionStop(). Simply sleeping is possible with sleep(), timeStamp(), and sleepOn(). Within main() access to the Control is locked (via lock()), during the waitOn*(), sleep(), and sleepOn() functions access is unlocked (via unlock() ). You need to return from the thread if interrupt() returns true
. If you want the thread to be stopped in a different way, reimplement requestStop(). Use lockGUI() and unlockGUI() to encapsulate code that directly or indirectly draws something on the screen.
A separate window displaying a warning message can be opened with warning(), a window displaying some information with info().
You are able to set the input gain for the data acquisition with setGain(), adjustGain(), adjust(), and activateGains(). Beware that a RePro may also set the gains.
addPath() prepends the current directory for data storage to a filename.
Access to other RELACS plugins is provided by devices(), device(), manipulator(), attenuator(), detector(), detectorOpts(), session(), sessionOpts(), sessionData(), sessionInfo(), sessionTime(), sessionTimeStr(), sessionRunning(), control(), controlOpts(), repro(), reproOpts(), currentRePro(), currentReProOpts().
You can define some Options (inherited via Config) that are stored in the relacsplugins.cfg file and that can be edited with the Control dialog(). You can select a subset of the Options for the dialog by defining a dialogSelectMask() with setDialogSelectMask() and addDialogSelectMask(). Likewise, some Options can be marked as read-only with dialogReadOnlyMask(), setDialogReadOnlyMask(), and addDialogReadOnlyMask(). The appearance of the dialog can be controlled with dialogStyle(), setDialogStyle(), and addDialogStyle(). dialogOpen() returns true
if the dialog is already displayed.
Control | ( | const string & | name, |
const string & | pluginset = "" , |
||
const string & | author = "unknown" , |
||
const string & | version = "unknown" , |
||
const string & | date = __DATE__ |
||
) |
Construct a control widget 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 Control has the version version and was written by author on date.
References Control::ControlThread.
|
virtual |
Set the name of this Control to name and its identifier for the configuration file to "Control: \a name".
Reimplemented from RELACSPlugin.
References ConfigClass::setConfigIdent(), and RELACSPlugin::setName().
|
virtual |
This function is called AFTER the configuration parameters are read in and all the devices are initialized.. Implement this function to check for devices.
void start | ( | void | ) |
Start execution of the Control thread. Reimplement main() to make the thread do something.
|
virtual |
Kindly ask the Control thread to stop by setting interrupt() to true
and interrupt a possible sleep().
bool wait | ( | double | time = -1.0 | ) |
Wait for the thread to finish execution (time < 0, returns true
) or for time seconds to be elapsed (returns false
).
References relacs::floor().
|
virtual |
Add specific actions to the RELACS File-menu. This implementation adds a "Dialog" and a "Help" menu entry.
References ConfigDialog::dialog(), ConfigDialog::help(), RELACSPlugin::saveDoxygenOptions(), RELACSPlugin::saveWidget(), and RELACSPlugin::uniqueName().
|
protectedvirtual |
Reimplement this function if you want to analyze input data traces and events. This function is executed as a thread. Within this thread the Control is locked (via lock() ). Access to those data is unlocked during sleep(), sleepOn(), and the waitOn* functions. To synchronize with the data, repros, or session use waitOnData(), waitOnReProSleep(), waitOnReProFinished(), waitOnSessionStart(), waitOnSessionPrestop(), waitOnSessionStop(). You need to return from main() if the waitOn*(), sleep(), or interrupt() functions return true
.
|
protected |
Returns true
if the thread should be stopped. Use this from within main()
Referenced by Control::sleep(), Control::waitOnData(), Control::waitOnReProFinished(), Control::waitOnReProSleep(), Control::waitOnSessionPrestop(), Control::waitOnSessionStart(), and Control::waitOnSessionStop().
|
protected |
Wait until new data are available or time seconds have been elapsed. Returns true if the thread needs to be stopped.
References RELACSPlugin::getData(), Control::interrupt(), ConfigDialog::mutex(), and RELACSPlugin::RW.
|
protected |
Wait until the current RePro goes to sleep or time seconds have been elapsed. Returns true if the thread needs to be stopped.
References RELACSPlugin::getData(), Control::interrupt(), ConfigDialog::mutex(), and RELACSPlugin::RW.
|
protected |
Wait until the current RePro has finished or time seconds have been elapsed. Returns true if the thread needs to be stopped.
References RELACSPlugin::getData(), Control::interrupt(), ConfigDialog::mutex(), and RELACSPlugin::RW.
|
protected |
Wait until a new session starts or time seconds have been elapsed. Returns true if the thread needs to be stopped.
References RELACSPlugin::getData(), Control::interrupt(), ConfigDialog::mutex(), and RELACSPlugin::RW.
|
protected |
Wait until a session might be stopped or time seconds have been elapsed. Returns true if the thread needs to be stopped.
References RELACSPlugin::getData(), Control::interrupt(), ConfigDialog::mutex(), and RELACSPlugin::RW.
|
protected |
Wait until a session is stopped or time seconds have been elapsed. Returns true if the thread needs to be stopped.
References RELACSPlugin::getData(), Control::interrupt(), ConfigDialog::mutex(), and RELACSPlugin::RW.
|
protected |
Sleep for t seconds. Returns true if the thread needs to be stopped.
References RELACSPlugin::getData(), Control::interrupt(), ConfigDialog::lock(), ConfigDialog::mutex(), ConfigDialog::unlock(), and ControlThread::usleep().
Referenced by Control::sleepOn().
|
protected |
|
protected |
Sleep for t seconds relative to the last call of timeStamp(). Returns true if the thread needs to be stopped.
References Control::sleep().
|
friend |
Referenced by Control::Control().