Commit 576df8ce authored by Locatelli's avatar Locatelli

Add proto message and add getPropertyType exception catch

parent 002d8eb5
......@@ -23,19 +23,19 @@ message Message {
message DataToFitMessage {
required FitType type = 1;
repeated float xdata = 2;
repeated float ydata = 3;
repeated double xdata = 2;
repeated double ydata = 3;
}
message FitDataMessage {
required FitType type = 1;
required bool converged = 2;
repeated float fitydata = 3;
optional float min = 4;
optional float max = 5;
optional float integral = 6;
optional float position = 7;
optional float amplitude = 8;
optional float fwhm = 9;
repeated double fitydata = 3;
optional double min = 4;
optional double max = 5;
optional double integral = 6;
optional double position = 7;
optional double amplitude = 8;
optional double fwhm = 9;
}
......@@ -54,21 +54,23 @@ message PlotPropertyDataMessage {
optional int32 use_grid_id = 33;
optional int32 use_log_id = 34;
optional int32 color_map_id = 35;
optional int32 nbRois_id = 36;
repeated int32 x0_parent_id = 37;
repeated int32 y0_parent_id = 38;
repeated int32 x1_parent_id = 39;
repeated int32 y1_parent_id = 40;
repeated int32 sum_parent_id = 41;
optional int32 selectedPlot_id = 42;
optional int32 selectedRoi_id = 43;
optional int32 selectedX0_id = 44;
optional int32 selectedY0_id = 45;
optional int32 selectedX1_id = 46;
optional int32 selectedY1_id = 47;
optional int32 commandRoiAdd_id = 48;
optional int32 commandRoiRaz_id = 49;
optional int32 countActivated_id = 50;
optional int32 min_color_limit_id = 36;
optional int32 max_color_limit_id = 37;
optional int32 nbRois_id = 38;
repeated int32 x0_parent_id = 39;
repeated int32 y0_parent_id = 40;
repeated int32 x1_parent_id = 41;
repeated int32 y1_parent_id = 42;
repeated int32 sum_parent_id = 43;
optional int32 selectedPlot_id = 44;
optional int32 selectedRoi_id = 45;
optional int32 selectedX0_id = 46;
optional int32 selectedY0_id = 47;
optional int32 selectedX1_id = 48;
optional int32 selectedY1_id = 49;
optional int32 commandRoiAdd_id = 50;
optional int32 commandRoiRaz_id = 51;
optional int32 countActivated_id = 52;
}
// Spy and multiplot message for ploty2
......
......@@ -629,7 +629,7 @@ void DatabaseResponder::processGetProperyTypeRequest(cameo::application::Request
responseMessage.set_value(propertyType);
}
catch (PropertyAccessorDirectImpl::NoSuchPropertyException& e) {
catch (...) {
responseMessage.set_error(common::Error::NO_SUCH_PROPERTY);
}
......
......@@ -2827,8 +2827,15 @@ bool Database::isProperty(unsigned long propertyID) {
std::string Database::getPropertyType(unsigned long propertyID) {
ScopedLock lock(_lockManager->lockPropertyForReading(propertyID, eol));
std::string propertyType;
return _keyIDPropertyMap.get(propertyID)->getType();
try {
propertyType = _keyIDPropertyMap.get(propertyID)->getType();
} catch (Exception const & e) {
throw NoSuchPropertyException(propertyID);
}
return propertyType;
}
PropertyHolder* Database::getPropertyHolder(unsigned long servantID) {
......
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