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
9c1e97f6
Commit
9c1e97f6
authored
Dec 12, 2019
by
yannick legoc
Browse files
D22AutoConfig updated
parent
7adf010e
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/controllers/lss/d22autoconfig/D22AutoConfig.cpp
View file @
9c1e97f6
...
...
@@ -48,7 +48,7 @@ AutoConfig::AutoConfig(const std::string& name) :
initialized
.
init
(
this
,
NOSAVE
,
"initialized"
);
scatterModelType
.
init
(
this
,
NOSAVE
,
"scatter_model_type"
);
sample
Radiu
s
.
init
(
this
,
NOSAVE
,
"sample_
radiu
s"
);
sample
Parameter
s
.
init
(
this
,
NOSAVE
,
"sample_
parameter
s"
);
resultSize
.
init
(
this
,
NOSAVE
,
"result_size"
);
type
.
init
(
this
,
NOSAVE
,
"type"
);
...
...
@@ -269,12 +269,13 @@ void AutoConfig::start() {
scatterModelType
=
autoConfigResponse
.
scattermodeltype
();
string
sample
Radiu
sString
;
for
(
int
i
=
0
;
i
<
autoConfigResponse
.
sample
radiu
s_size
()
-
1
;
++
i
)
{
sample
Radiu
sString
+=
to_string
(
autoConfigResponse
.
sample
radius
(
i
))
+
", "
;
string
sample
Parameter
sString
;
for
(
int
i
=
0
;
i
<
autoConfigResponse
.
sample
parameter
s_size
()
-
1
;
++
i
)
{
sample
Parameter
sString
+=
autoConfigResponse
.
sampleparameters
(
i
).
type
()
+
" "
+
to_string
(
autoConfigResponse
.
sample
parameters
(
i
).
value
(
))
+
", "
;
}
sampleRadiusString
+=
to_string
(
autoConfigResponse
.
sampleradius
(
autoConfigResponse
.
sampleradius_size
()
-
1
));
sampleRadius
=
sampleRadiusString
;
int
i
=
autoConfigResponse
.
sampleparameters_size
()
-
1
;
sampleParametersString
+=
autoConfigResponse
.
sampleparameters
(
i
).
type
()
+
" "
+
to_string
(
autoConfigResponse
.
sampleparameters
(
i
).
value
());
sampleParameters
=
sampleParametersString
;
}
void
AutoConfig
::
apply
()
{
...
...
src/controllers/lss/d22autoconfig/D22AutoConfig.h
View file @
9c1e97f6
...
...
@@ -63,7 +63,7 @@ public:
Property
<
bool
>
initialized
;
Property
<
std
::
string
>
scatterModelType
;
Property
<
std
::
string
>
sample
Radiu
s
;
Property
<
std
::
string
>
sample
Parameter
s
;
Property
<
int32
>
resultSize
;
DynamicProperty
<
std
::
string
>
type
;
...
...
src/controllers/lss/d22autoconfig/NumorMessages.proto
View file @
9c1e97f6
...
...
@@ -10,6 +10,12 @@ message InstrumentParameters {
required
double
collimation
=
3
;
}
message
SampleParameters
{
required
string
type
=
1
;
required
double
value
=
2
;
}
message
NumorRequest
{
required
string
instrumentName
=
1
;
...
...
@@ -34,6 +40,6 @@ message Result {
message
Response
{
required
string
scatterModelType
=
1
;
repeated
double
sampleRadiu
s
=
2
;
repeated
SampleParameters
sampleParameter
s
=
2
;
repeated
Result
results
=
3
;
}
src/controllers/lss/d22autoconfig/gui/d22_auto_config.properties
View file @
9c1e97f6
...
...
@@ -3,7 +3,7 @@ d22_auto_config.wavelengthPrefix=Wavelength
d22_auto_config.collimationPrefix
=
Collimation
d22_auto_config.scatter_model_typePrefix
=
Scatter Model Type
d22_auto_config.typePrefix
=
Type
d22_auto_config.sample_
radiu
sPrefix
=
Sample
Radiu
s
d22_auto_config.sample_
parameter
sPrefix
=
Sample
Parameter
s
d22_auto_config.resultsPrefix
=
Results
d22_auto_config.applyPrefix
=
Apply
d22_auto_config.wantedTypePrefix
=
Type
\ No newline at end of file
src/controllers/lss/d22autoconfig/gui/d22_auto_configProperties.xml
View file @
9c1e97f6
...
...
@@ -3,7 +3,7 @@
<controller
type=
"d22_auto_config"
>
<property
name=
"scatter_model_type"
type=
"string"
/>
<property
name=
"sample_
radiu
s"
type=
"string"
/>
<property
name=
"sample_
parameter
s"
type=
"string"
/>
<property
name=
"result_size"
type=
"int32"
/>
...
...
src/controllers/lss/d22autoconfig/gui/d22_auto_configView.xml
View file @
9c1e97f6
...
...
@@ -6,8 +6,8 @@
<table_composite
nbColumns=
"2"
>
<simple_label
prefix=
"d22_auto_config.scatter_model_typePrefix"
/>
<label
role=
"d22_auto_config1"
property=
"scatter_model_type"
/>
<simple_label
prefix=
"d22_auto_config.sample_
radiu
sPrefix"
/>
<label
role=
"d22_auto_config1"
property=
"sample_
radiu
s"
/>
<simple_label
prefix=
"d22_auto_config.sample_
parameter
sPrefix"
/>
<label
role=
"d22_auto_config1"
property=
"sample_
parameter
s"
/>
</table_composite>
<newLine/>
...
...
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