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
70cb400f
Commit
70cb400f
authored
Dec 15, 2017
by
Locatelli
Browse files
controller Cyclops data header now is a controller not inheritance from
count spy. it caused problem with spy
parent
d3801c07
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/controllers/dif/cyclops/CyclopsDataHeader.cpp
View file @
70cb400f
...
...
@@ -32,7 +32,7 @@ const string CyclopsDataHeader::END = "*";
* Constructor
*/
CyclopsDataHeader
::
CyclopsDataHeader
(
const
string
&
name
)
:
utilities
::
Co
u
nt
Spy
(
name
)
{
Experiment
Cont
roller
(
name
)
{
setFamily
(
family
::
HIDDEN
);
...
...
@@ -40,6 +40,7 @@ CyclopsDataHeader::CyclopsDataHeader(const string& name) :
m_CamDriver
.
init
(
this
,
"cammeraDriver"
);
m_Title
.
init
(
this
,
"title"
);
m_CountSpy
.
init
(
this
,
"count_spy"
);
m_SampleSettings
.
init
(
this
,
"sample_settings"
);
m_ScanInfo
.
init
(
this
,
"scan_info"
);
m_CyclopsSetting
.
init
(
this
,
"cyclops_setting"
);
...
...
@@ -66,30 +67,17 @@ CyclopsDataHeader::~CyclopsDataHeader() {
* postConfiguration
*/
void
CyclopsDataHeader
::
postConfiguration
()
{
utilities
::
CountSpy
::
postConfiguration
(
);
registerUpdater
(
m_CountSpy
->
statusMessage
,
&
CyclopsDataHeader
::
updateStatusMessage
,
this
);
}
/*
* updateProperty
*/
void
CyclopsDataHeader
::
updateProperty
(
ChangeAspect
*
aChangeAspect
)
{
string
propertyName
=
aChangeAspect
->
getStringParam
();
string
controllername
=
aChangeAspect
->
getControllerName
();
int32
i
;
for
(
i
=
0
;
i
<
(
int32
)
m_CountControllers
.
size
();
++
i
)
{
if
(
m_CountControllers
[
i
]
->
getName
()
==
controllername
)
{
break
;
}
}
if
(
i
<
(
int32
)
m_CountControllers
.
size
())
{
if
(
propertyName
==
statusMessage
.
getName
())
{
boost
::
any
propvalue
=
dynamic_cast
<
AbstractController
*>
(
m_CountControllers
[
i
])
->
getValue
(
propertyName
);
if
(
any_cast
<
string
>
(
propvalue
)
==
"Writing parameters"
)
{
createHeader
();
}
}
void
CyclopsDataHeader
::
updateStatusMessage
()
{
if
(
m_CountSpy
->
statusMessage
()
==
"Writing parameters"
)
{
createHeader
();
}
utilities
::
CountSpy
::
updateProperty
(
aChangeAspect
);
}
/*
...
...
@@ -115,7 +103,7 @@ void CyclopsDataHeader::createHeader() {
create_i
(
header
,
"nbang"
,
m_ScanInfo
->
nbController
(),
0
);
create_i
(
header
,
"nkmes"
,
m_ScanInfo
->
nbStep
(),
0
);
create_i
(
header
,
"npmes"
,
m_ScanInfo
->
actualStep
(),
0
);
create_i
(
header
,
"jcode"
,
modeint
(),
0
);
create_i
(
header
,
"jcode"
,
m_CountSpy
->
modeint
(),
0
);
create_i
(
header
,
"count"
,
0
,
0
);
create_i
(
header
,
"gain"
,
m_CyclopsSetting
->
gain
(),
0
);
create_i
(
header
,
"mode"
,
m_CyclopsSetting
->
mode
(),
0
);
...
...
src/controllers/dif/cyclops/CyclopsDataHeader.h
View file @
70cb400f
...
...
@@ -41,7 +41,7 @@ namespace cyclops {
* \class cyclops data server path setiing
* \brief Configure data path and name for cyclops data server
*/
class
CyclopsDataHeader
:
public
utilities
::
Co
u
nt
Spy
{
class
CyclopsDataHeader
:
public
Experiment
Cont
roller
{
public:
...
...
@@ -59,12 +59,6 @@ public:
*/
virtual
~
CyclopsDataHeader
();
virtual
void
updateProperty
(
ChangeAspect
*
aChangeAspect
);
/*!
* Properties
*/
private:
/*!
...
...
@@ -73,8 +67,11 @@ private:
*/
virtual
void
postConfiguration
();
void
updateStatusMessage
();
DriverPtr
<
psl
::
PslDriver
>
m_CamDriver
;
ControllerPtr
<
acquisition
::
ExperimentData
>
m_Title
;
ControllerPtr
<
utilities
::
CountSpy
>
m_CountSpy
;
ControllerPtr
<
sample_environment
::
SampleSettings
>
m_SampleSettings
;
ControllerPtr
<
scan
::
ScanInfo
>
m_ScanInfo
;
ControllerPtr
<
CyclopsSetting
>
m_CyclopsSetting
;
...
...
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