summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/commands
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-15 18:17:13 +0200
committerimarom <imarom@cisco.com>2015-11-15 18:17:13 +0200
commitf9365e5150f9479dfbf4436d22874f121afbb5c8 (patch)
treef97b9dfd52b880eeab0aba631e74231abdb851f1 /src/rpc-server/commands
parent8017ebe740a1c1d138559795aea9d8ee72236da2 (diff)
parent94b1238942da24e47fb3e689bf695e815a604eb0 (diff)
Merge branch 'rpc_intg1'
Diffstat (limited to 'src/rpc-server/commands')
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_stream.cpp7
-rw-r--r--src/rpc-server/commands/trex_rpc_cmds.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
index e32073b0..5ec92afc 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
@@ -458,8 +458,9 @@ TrexRpcCmdGetStream::_run(const Json::Value &params, Json::Value &result) {
trex_rpc_cmd_rc_e
TrexRpcCmdStartTraffic::_run(const Json::Value &params, Json::Value &result) {
- uint8_t port_id = parse_byte(params, "port_id", result);
- double mul = parse_double(params, "mul", result);
+ uint8_t port_id = parse_byte(params, "port_id", result);
+ double mul = parse_double(params, "mul", result);
+ double duration = parse_double(params, "duration", result);
if (port_id >= get_stateless_obj()->get_port_count()) {
std::stringstream ss;
@@ -470,7 +471,7 @@ TrexRpcCmdStartTraffic::_run(const Json::Value &params, Json::Value &result) {
TrexStatelessPort *port = get_stateless_obj()->get_port_by_id(port_id);
try {
- port->start_traffic(mul);
+ port->start_traffic(mul, duration);
} catch (const TrexRpcException &ex) {
generate_execute_err(result, ex.what());
}
diff --git a/src/rpc-server/commands/trex_rpc_cmds.h b/src/rpc-server/commands/trex_rpc_cmds.h
index d7265ff2..b4f37e3b 100644
--- a/src/rpc-server/commands/trex_rpc_cmds.h
+++ b/src/rpc-server/commands/trex_rpc_cmds.h
@@ -105,7 +105,7 @@ TREX_RPC_CMD_DEFINE(TrexRpcCmdGetStream, "get_stream", 3, true);
-TREX_RPC_CMD_DEFINE(TrexRpcCmdStartTraffic, "start_traffic", 2, true);
+TREX_RPC_CMD_DEFINE(TrexRpcCmdStartTraffic, "start_traffic", 3, true);
TREX_RPC_CMD_DEFINE(TrexRpcCmdStopTraffic, "stop_traffic", 1, true);
TREX_RPC_CMD_DEFINE(TrexRpcCmdPauseTraffic, "pause_traffic", 1, true);
TREX_RPC_CMD_DEFINE(TrexRpcCmdResumeTraffic, "resume_traffic", 1, true);