summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-25 04:46:56 -0500
committerimarom <imarom@cisco.com>2015-11-25 04:46:56 -0500
commit4a41c26a5cf23635a5b1332af6e806c915cf7e6c (patch)
tree35e77fb81f60e5b6537d865760ea1d8f6f485c99 /src
parentb0446de90c05d0a129fc38e6aef981dff243ccb7 (diff)
support for "total" flag for start
also fixed a bug in mpps (trex console)
Diffstat (limited to 'src')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_stream.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
index d22fda7d..f148261c 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
@@ -475,25 +475,21 @@ TrexRpcCmdStartTraffic::_run(const Json::Value &params, Json::Value &result) {
const Json::Value &mul = parse_object(params, "mul", result);
+
std::string mul_type = parse_string(mul, "type", result);
+ double max_rate = parse_double(mul, "max", result);
/* dispatch according to type of multiplier */
try {
if (mul_type == "raw") {
-
- double m = parse_double(mul, "factor", result);
- port->start_traffic(m, duration);
+ port->start_traffic(max_rate, duration);
} else if (mul_type == "max_bps") {
-
- double max_bps = parse_double(mul, "max", result);
- port->start_traffic_max_bps(max_bps, duration);
+ port->start_traffic_max_bps(max_rate, duration);
} else if (mul_type == "max_pps") {
-
- double max_pps = parse_double(mul, "max", result);
- port->start_traffic_max_pps(max_pps, duration);
+ port->start_traffic_max_pps(max_rate, duration);
}
} catch (const TrexRpcException &ex) {