Commit befcced2 authored by yannick legoc's avatar yannick legoc
Browse files

Updated request of D22AutoConfig

parent 86b1af46
......@@ -157,6 +157,11 @@ float64 AutoConfig::getSampleBackground() {
cout << "Model " << modelName << " found at index " << i << endl;
if (m_simulation->pnames.getSize() <= i) {
cout << "Background not found" << endl;
return 0;
}
int pnamesSize = m_simulation->pnames.getSize(i);
int j = 0;
......@@ -263,8 +268,13 @@ void AutoConfig::start() {
}
scatterModelType = autoConfigResponse.scattermodeltype();
sampleRadius = autoConfigResponse.sampleradius();
string sampleRadiusString;
for (int i = 0; i < autoConfigResponse.sampleradius_size() - 1; ++i) {
sampleRadiusString += to_string(autoConfigResponse.sampleradius(i)) + ", ";
}
sampleRadiusString += to_string(autoConfigResponse.sampleradius(autoConfigResponse.sampleradius_size() - 1));
sampleRadius = sampleRadiusString;
}
void AutoConfig::apply() {
......
......@@ -63,7 +63,7 @@ public:
Property<bool> initialized;
Property<std::string> scatterModelType;
Property<float64> sampleRadius;
Property<std::string> sampleRadius;
Property<int32> resultSize;
DynamicProperty<std::string> type;
......
......@@ -34,6 +34,6 @@ message Result {
message Response {
required string scatterModelType = 1;
required double sampleRadius = 2;
repeated double sampleRadius = 2;
repeated Result results = 3;
}
......@@ -3,7 +3,7 @@
<controller type="d22_auto_config">
<property name="scatter_model_type" type="string"/>
<property name="sample_radius" type="float64"/>
<property name="sample_radius" type="string"/>
<property name="result_size" type="int32"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment