Commit 25a15890 authored by Carla Guillen Carias's avatar Carla Guillen Carias
Browse files

Merge branch 'development' of https://gitlab.lrz.de/dcdb/dcdb into development

parents 0c3afa7e d7409c12
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/json_parser.hpp>
#include <boost/algorithm/string/trim.hpp> #include <boost/algorithm/string/trim.hpp>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <sstream>
#include "globalconfiguration.h" #include "globalconfiguration.h"
using namespace std; using namespace std;
...@@ -196,6 +197,8 @@ protected: ...@@ -196,6 +197,8 @@ protected:
// Dumps the contents of "s" in "config" // Dumps the contents of "s" in "config"
void _dumpPTREE(boost::property_tree::ptree& config) const { void _dumpPTREE(boost::property_tree::ptree& config) const {
std::ostringstream scaleStream;
scaleStream << this->scale;
config.clear(); config.clear();
config.push_back(boost::property_tree::ptree::value_type("isVirtual", boost::property_tree::ptree(this->isVirtual ? "true" : "false"))); config.push_back(boost::property_tree::ptree::value_type("isVirtual", boost::property_tree::ptree(this->isVirtual ? "true" : "false")));
config.push_back(boost::property_tree::ptree::value_type("monotonic", boost::property_tree::ptree(this->monotonic ? "true" : "false"))); config.push_back(boost::property_tree::ptree::value_type("monotonic", boost::property_tree::ptree(this->monotonic ? "true" : "false")));
...@@ -203,7 +206,7 @@ protected: ...@@ -203,7 +206,7 @@ protected:
config.push_back(boost::property_tree::ptree::value_type("unit", boost::property_tree::ptree(this->unit))); config.push_back(boost::property_tree::ptree::value_type("unit", boost::property_tree::ptree(this->unit)));
config.push_back(boost::property_tree::ptree::value_type("publicName", boost::property_tree::ptree(this->publicName))); config.push_back(boost::property_tree::ptree::value_type("publicName", boost::property_tree::ptree(this->publicName)));
config.push_back(boost::property_tree::ptree::value_type("pattern", boost::property_tree::ptree(this->pattern))); config.push_back(boost::property_tree::ptree::value_type("pattern", boost::property_tree::ptree(this->pattern)));
config.push_back(boost::property_tree::ptree::value_type("scale", boost::property_tree::ptree(to_string(this->scale)))); config.push_back(boost::property_tree::ptree::value_type("scale", boost::property_tree::ptree(scaleStream.str())));
config.push_back(boost::property_tree::ptree::value_type("interval", boost::property_tree::ptree(to_string(this->interval / 1000000)))); config.push_back(boost::property_tree::ptree::value_type("interval", boost::property_tree::ptree(to_string(this->interval / 1000000))));
config.push_back(boost::property_tree::ptree::value_type("ttl", boost::property_tree::ptree(to_string(this->ttl / 1000000)))); config.push_back(boost::property_tree::ptree::value_type("ttl", boost::property_tree::ptree(to_string(this->ttl / 1000000))));
config.push_back(boost::property_tree::ptree::value_type("operations", boost::property_tree::ptree(this->operations))); config.push_back(boost::property_tree::ptree::value_type("operations", boost::property_tree::ptree(this->operations)));
......
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