+std::vector<double> surf_parse_get_bandwidths(const char* string, const char* entity_kind, const std::string& name)
+{
+ static const unit_scale units{std::make_tuple("bps", 0.125, 2, true), std::make_tuple("bps", 0.125, 10, true),
+ std::make_tuple("Bps", 1.0, 2, true), std::make_tuple("Bps", 1.0, 10, true)};
+
+ std::vector<double> bandwidths;
+ std::vector<std::string> tokens;
+ boost::split(tokens, string, boost::is_any_of(";"));
+ for (auto token : tokens) {
+ bandwidths.push_back(surf_parse_get_value_with_unit(
+ token.c_str(), units, entity_kind, name,
+ "Append 'Bps' to get bytes per second (or 'bps' for bits but 1Bps = 8bps)", "Bps"));
+ }
+
+ return bandwidths;
+}
+