mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-10-30 12:31:27 +01:00
Get parameters type fix
This commit is contained in:
1 parent
22c86c4071
commit
00d44fb71c
1 file changed
+2
-4
@@ -70,12 +70,10 @@ void start_rest_api(WriterManager& writer_manager, uint16_t port)
|
||||
try {
|
||||
auto parameter_type = parameters_type->at(parameter_name);
|
||||
|
||||
if (parameter_type == NX_FLOAT) {
|
||||
if (parameter_type == NX_FLOAT || parameter_type == NX_NUMBER) {
|
||||
result[parameter_name] = boost::any_cast<double>(parameter_value);
|
||||
} else if (parameter_type == NX_CHAR) {
|
||||
result[parameter_name] = boost::any_cast<string>(parameter_value);
|
||||
|
||||
} else if (parameter_type == NX_DATE_TIME) {
|
||||
} else if (parameter_type == NX_CHAR || parameter_type == NXnote || parameter_type == NX_DATE_TIME) {
|
||||
result[parameter_name] = boost::any_cast<string>(parameter_value);
|
||||
|
||||
} else if (parameter_type == NX_INT) {
|
||||
|
||||
Reference in new issue
Block a user