Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadSpecialModules
Commits
36f0b960
Commit
36f0b960
authored
Aug 03, 2016
by
Cristina Cocho
Browse files
Tests in spectrometer
parent
b3da8d8b
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/controllers/lss/d22special/CountWithSpectro.cpp
View file @
36f0b960
...
...
@@ -231,7 +231,7 @@ void CountWithSpectro::startSpectro() {
}
formerTime
=
time
;
sleep
(
sleepTime
);
//
sleep(sleepTime);
}
}
}
...
...
@@ -357,5 +357,14 @@ float64 CountWithSpectro::calculateWaitingTimeInSec() {
return
singleWaitTime
;
}
/*
* setDisabled
*/
void
CountWithSpectro
::
setDisabled
(
bool
all
)
{
addExcludeSetEnableController
(
count
.
getRole
());
ExperimentController
::
setDisabled
(
all
);
}
}
src/controllers/lss/d22special/CountWithSpectro.h
View file @
36f0b960
...
...
@@ -73,6 +73,7 @@ public:
void
updateProgression
();
void
updateSubtitle
();
void
update
();
virtual
void
setDisabled
(
bool
all
);
private:
void
saveSpectroData
();
...
...
src/controllers/spectrometer/QE65000Controller.cpp
View file @
36f0b960
...
...
@@ -19,6 +19,7 @@
#include "QE65000Controller.h"
#include "controllers/common/baselegacy/ExperimentControllerDef.h"
#include "controllers/common/family/Families.h"
#include <common/base/Date.h>
namespace
spectrometer
{
...
...
@@ -113,30 +114,57 @@ void QE65000Controller::start() {
if
(
isConnected
())
{
//Take into account number of scans to average
if
(
scansToAverage
()
==
1
)
{
cout
<<
"start "
<<
endl
;
common
::
Date
startTime
=
common
::
Date
();
commandProgression
=
50
;
spectroDriver
.
execute
(
"start"
,
false
);
commandProgression
=
75
;
cout
<<
"after start "
<<
endl
;
common
::
Date
time1
=
common
::
Date
();
common
::
Duration
duration
=
time1
-
startTime
;
cout
<<
"Time executing START command "
<<
duration
.
getMilliseconds
()
<<
endl
;
//x data
xData
.
update
(
spectroDriver
->
xData
());
xData
.
setSize
(
size
());
cout
<<
"after 2 "
<<
endl
;
common
::
Date
time2
=
common
::
Date
();
duration
=
time2
-
time1
;
cout
<<
"Time executing updating xdata command "
<<
duration
.
getMilliseconds
()
<<
endl
;
//y data
yData
.
update
(
spectroDriver
->
yData
());
yData
.
setSize
(
size
());
cout
<<
"after 3"
<<
endl
;
common
::
Date
time3
=
common
::
Date
();
duration
=
time3
-
time2
;
cout
<<
"Time executing updating ydata command "
<<
duration
.
getMilliseconds
()
<<
endl
;
//To take those changes into account do the following:
xData
.
sendEvent
();
yData
.
sendEvent
();
cout
<<
"after 4"
<<
endl
;
common
::
Date
time4
=
common
::
Date
();
duration
=
time4
-
time3
;
cout
<<
"Time executing updating sending both arrays command "
<<
duration
.
getMilliseconds
()
<<
endl
;
commandProgression
=
99
;
spectroDriver
.
execute
(
"stop"
,
false
);
cout
<<
"after 5"
<<
endl
;
common
::
Date
time5
=
common
::
Date
();
duration
=
time5
-
time4
;
cout
<<
"Time executing STOP command "
<<
duration
.
getMilliseconds
()
<<
endl
;
}
else
{
//REVISE THE USAGE OF THE ARRAYS HERE
float64
*
tempYData
;
...
...
src/drivers/oceanoptics/QE65000Driver.cpp
View file @
36f0b960
...
...
@@ -38,8 +38,8 @@ QE65000Driver::QE65000Driver(const std::string& name) : DeviceDriver(name) {
//Init Properties
integrationTime
.
init
(
this
,
SAVE
,
"integration_time"
);
isActive
.
init
(
this
,
SAVE
,
"isActive"
);
xData
.
init
(
this
,
SAVE
,
"x_data"
);
yData
.
init
(
this
,
SAVE
,
"y_data"
);
xData
.
init
(
this
,
NO
SAVE
,
"x_data"
);
yData
.
init
(
this
,
NO
SAVE
,
"y_data"
);
size
.
init
(
this
,
SAVE
,
"size"
);
//Init functions
...
...
src/drivers/oceanoptics/RealQE65000Driver.cpp
View file @
36f0b960
...
...
@@ -65,6 +65,7 @@ void RealQE65000Driver::start() {
delete
[]
owner
()
->
xData
();
delete
[]
owner
()
->
yData
();
cout
<<
"starting spectro "
<<
owner
()
->
integrationTime
()
<<
endl
;
//Get deviceID necessary to use library methods
sbapi_initialize
();
...
...
@@ -91,6 +92,8 @@ void RealQE65000Driver::start() {
sbapi_close_device
(
deviceId
,
&
error
);
}
cout
<<
"end of spectro "
<<
endl
;
}
...
...
@@ -155,6 +158,7 @@ void RealQE65000Driver::setIntegrationTime(int32 integrationTime) {
if
(
minimumIntegrationTime
>
integrationTime
)
{
integrationTime
=
minimumIntegrationTime
;
}
cout
<<
"in real qe65000 driver setting integration time to "
<<
integrationTime
<<
" minIntegration time "
<<
minimumIntegrationTime
<<
endl
;
//api: spectrometerSetIntegrationTimeMicros (long deviceID, long featureID, int *errorCode, unsigned long integrationTimeMicros)
sbapi_spectrometer_set_integration_time_micros
(
deviceId
,
spectrometerId
,
&
error
,
integrationTime
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment