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
286cec64
Commit
286cec64
authored
Jan 07, 2020
by
yannick legoc
Browse files
Separated results from type list in D22AutoConfig
parent
4274a5a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/controllers/lss/d22autoconfig/D22AutoConfig.cpp
View file @
286cec64
...
...
@@ -50,6 +50,9 @@ AutoConfig::AutoConfig(const std::string& name) :
scatterModelType
.
init
(
this
,
NOSAVE
|
SPY
,
"scatter_model_type"
,
"Model"
);
sampleParameters
.
init
(
this
,
NOSAVE
|
SPY
,
"sample_parameters"
,
"Sample"
);
calcTypeSize
.
init
(
this
,
NOSAVE
,
"calc_type_size"
);
calcType
.
init
(
this
,
NOSAVE
,
"calc_type"
);
resultSize
.
init
(
this
,
NOSAVE
,
"result_size"
);
type
.
init
(
this
,
NOSAVE
,
"type"
);
distance
.
init
(
this
,
NOSAVE
,
"distance"
);
...
...
@@ -61,8 +64,8 @@ AutoConfig::AutoConfig(const std::string& name) :
wantedWavelength
.
init
(
this
,
SAVE
|
SPY
,
"wanted_wavelength"
,
"Wavelength"
);
wantedCollimation
.
init
(
this
,
SAVE
|
SPY
,
"wanted_collimation"
,
"Collimation"
);
wantedType
.
setEnumeratedValues
(
t
ype
);
wantedType
.
setEnumeratedLabels
(
t
ype
);
wantedType
.
setEnumeratedValues
(
calcT
ype
);
wantedType
.
setEnumeratedLabels
(
calcT
ype
);
m_d22settings
.
init
(
this
,
"settings"
);
m_simulation
.
init
(
this
,
"simulation"
);
...
...
@@ -164,22 +167,23 @@ bool AutoConfig::initApplication() {
autoConfigResponse
.
ParseFromString
(
response
);
int
size
=
autoConfigResponse
.
types_size
();
resultSize
=
size
;
type
.
resize
(
size
);
distance
.
resize
(
size
);
wavelength
.
resize
(
size
);
collimation
.
resize
(
size
);
calcTypeSize
=
size
;
calcType
.
resize
(
size
);
for
(
int
i
=
0
;
i
<
size
;
++
i
)
{
t
ype
.
set
(
i
,
autoConfigResponse
.
types
(
i
));
calcT
ype
.
set
(
i
,
autoConfigResponse
.
types
(
i
));
}
// Set default value.
if
(
size
>
0
)
{
wantedType
=
t
ype
.
get
(
0
);
wantedType
=
calcT
ype
.
get
(
0
);
}
type
.
resize
(
1
);
distance
.
resize
(
1
);
wavelength
.
resize
(
1
);
collimation
.
resize
(
1
);
// Application initialized
initialized
=
true
;
...
...
src/controllers/lss/d22autoconfig/D22AutoConfig.h
View file @
286cec64
...
...
@@ -53,6 +53,9 @@ public:
Property
<
std
::
string
>
scatterModelType
;
Property
<
std
::
string
>
sampleParameters
;
Property
<
int32
>
calcTypeSize
;
DynamicProperty
<
std
::
string
>
calcType
;
Property
<
int32
>
resultSize
;
DynamicProperty
<
std
::
string
>
type
;
DynamicProperty
<
float64
>
distance
;
...
...
src/controllers/lss/d22autoconfig/gui/d22_auto_configProperties.xml
View file @
286cec64
...
...
@@ -4,9 +4,11 @@
<property
name=
"scatter_model_type"
type=
"string"
/>
<property
name=
"sample_parameters"
type=
"string"
/>
<property
name=
"calc_type_size"
type=
"int32"
/>
<dynamic_property
name=
"calc_type"
type=
"string"
size_property=
"result_size"
/>
<property
name=
"result_size"
type=
"int32"
/>
<dynamic_property
name=
"type"
type=
"string"
size_property=
"result_size"
/>
<dynamic_property
name=
"distance"
type=
"float64"
size_property=
"result_size"
/>
<dynamic_property
name=
"wavelength"
type=
"float64"
size_property=
"result_size"
/>
...
...
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