|
@@ -5731,7 +5731,7 @@ class DAQ : public QObject@;@/
|
5731
|
5731
|
Channel* newChannel(int units, int thermocouple);@/
|
5732
|
5732
|
@[Q_INVOKABLE@,@, void@]@, setClockRate(double Hz);@t\2\2@>@/
|
5733
|
5733
|
@[Q_INVOKABLE@,@, void@]@, start();@t\2\2@>@/
|
5734
|
|
- @[Q_INVOKABLE@]@, void stop();
|
|
5734
|
+ @[Q_INVOKABLE@,@, void@]@, stop();@t\2\2@>@/
|
5735
|
5735
|
enum ThermocoupleType@/
|
5736
|
5736
|
{
|
5737
|
5737
|
@!TypeJ = 10072,
|
|
@@ -5818,9 +5818,9 @@ void DAQImplementation::measure()@t\2@>@/
|
5818
|
5818
|
@t\4@>{@/
|
5819
|
5819
|
int samplesRead = 0;
|
5820
|
5820
|
double buffer[channels];
|
5821
|
|
- error = read((unsigned int)(handle), (signed long)(1), (double)(10.0),
|
5822
|
|
- (unsigned long)(0), buffer, (unsigned long)(channels),
|
5823
|
|
- &samplesRead, (signed long)(0));
|
|
5821
|
+ error = read((unsigned int)(handle), (signed long)(1), (double)(10.0),@|
|
|
5822
|
+ (unsigned long)(0), buffer, (unsigned long)(channels),@|
|
|
5823
|
+ &samplesRead, (signed long)(0));@/
|
5824
|
5824
|
if(error)@/
|
5825
|
5825
|
@t\1@>{@/
|
5826
|
5826
|
ready = false;@t\2@>@/
|
|
@@ -5969,13 +5969,13 @@ void DAQ::stop()
|
5969
|
5969
|
{
|
5970
|
5970
|
if(imp->useBase)
|
5971
|
5971
|
{
|
5972
|
|
- imp->ready = false;
|
|
5972
|
+ imp->ready = @[false@];
|
5973
|
5973
|
imp->wait(ULONG_MAX);
|
5974
|
5974
|
imp->stopTask(imp->handle);
|
5975
|
5975
|
}
|
5976
|
5976
|
else
|
5977
|
5977
|
{
|
5978
|
|
- imp->ready = false;
|
|
5978
|
+ imp->ready = @[false@];
|
5979
|
5979
|
imp->error = imp->stopTask(imp->handle);
|
5980
|
5980
|
if(imp->error)
|
5981
|
5981
|
{
|
|
@@ -6086,7 +6086,7 @@ attempted to use the device.
|
6086
|
6086
|
|
6087
|
6087
|
@<DAQ Implementation@>=
|
6088
|
6088
|
DAQ::~DAQ()@/
|
6089
|
|
-@t\4\4@>{@/
|
|
6089
|
+{
|
6090
|
6090
|
if(imp->useBase)
|
6091
|
6091
|
{
|
6092
|
6092
|
imp->resetDevice(imp->device.toAscii().data());
|
|
@@ -6096,7 +6096,7 @@ DAQ::~DAQ()@/
|
6096
|
6096
|
{
|
6097
|
6097
|
if(imp->ready)
|
6098
|
6098
|
{
|
6099
|
|
- imp->ready = false;
|
|
6099
|
+ imp->ready = @[false@];
|
6100
|
6100
|
imp->wait(ULONG_MAX);
|
6101
|
6101
|
imp->stopTask(imp->handle);
|
6102
|
6102
|
imp->resetDevice(imp->device.toAscii().data());
|
|
@@ -6104,7 +6104,7 @@ DAQ::~DAQ()@/
|
6104
|
6104
|
}
|
6105
|
6105
|
}
|
6106
|
6106
|
delete imp;
|
6107
|
|
-@t\4\4@>}
|
|
6107
|
+}
|
6108
|
6108
|
|
6109
|
6109
|
@ This just leaves the constructor and destructor for |DAQImplementation|. The
|
6110
|
6110
|
way the program is currently written, the number of channels available on the
|
|
@@ -6212,8 +6212,8 @@ QScriptValue constructDAQ(QScriptContext *context, QScriptEngine *engine);
|
6212
|
6212
|
QScriptValue DAQ_newChannel(QScriptContext *context, QScriptEngine *engine);
|
6213
|
6213
|
void setDAQProperties(QScriptValue value, QScriptEngine *engine);
|
6214
|
6214
|
|
6215
|
|
-@ First we make these functions known to the scripting engine. We also add
|
6216
|
|
-the values from |Units::Unit| as this was widely used in configurations
|
|
6215
|
+@ These functions and the values from |Units::Unit| must be made available to
|
|
6216
|
+the host environment. The latter because this was widely used in configurations
|
6217
|
6217
|
before this enumeration was removed from the |DAQ| class. As these properties
|
6218
|
6218
|
must be available without an instance, the properties must be added here.
|
6219
|
6219
|
|
|
@@ -6743,12 +6743,12 @@ interpolation may still be implemented in the future, but it is a low
|
6743
|
6743
|
priority.
|
6744
|
6744
|
|
6745
|
6745
|
@<Class declarations@>=
|
6746
|
|
-class LinearSplineInterpolator : public QObject
|
6747
|
|
-{
|
6748
|
|
- @[Q_OBJECT@]@/
|
|
6746
|
+class LinearSplineInterpolator : public QObject@/
|
|
6747
|
+{@/
|
|
6748
|
+ @[Q_OBJECT@]@;@/
|
6749
|
6749
|
public:@/
|
6750
|
6750
|
LinearSplineInterpolator(QObject *parent = NULL);
|
6751
|
|
- @[Q_INVOKABLE@]@, void add_pair(double source, double destination);
|
|
6751
|
+ @[Q_INVOKABLE@,@, void@]@, add_pair(double source, double destination);@t\2\2@>@/
|
6752
|
6752
|
@[public slots@]:@/
|
6753
|
6753
|
Measurement newMeasurement(Measurement measure);
|
6754
|
6754
|
@[signals@]:@/
|
|
@@ -6756,7 +6756,7 @@ class LinearSplineInterpolator : public QObject
|
6756
|
6756
|
private:@/
|
6757
|
6757
|
void make_interpolators();
|
6758
|
6758
|
QMap<double, double> *pairs;
|
6759
|
|
- QList<LinearCalibrator *> *interpolators;
|
|
6759
|
+ QList<LinearCalibrator *> *interpolators;@/
|
6760
|
6760
|
};
|
6761
|
6761
|
|
6762
|
6762
|
@ We take advantage of the fact that iterating over a QMap always returns
|