diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-11 19:06:13 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-19 11:23:46 +0200 |
commit | e4c8e44b0842093ce2a245e863a8db7f4c2ae9ff (patch) | |
tree | f1c92ff366088eb5250d56d22058cb6db7f41aeb /src/rpc-server | |
parent | 057a1ec1e70584f3598e9980bb44f70f73065bac (diff) |
add min_ipg to push_pcaps
Change-Id: I353f8903c40963517fd2fed721cc0671d9f6dc4b
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src/rpc-server')
-rw-r--r-- | src/rpc-server/commands/trex_rpc_cmd_general.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_general.cpp b/src/rpc-server/commands/trex_rpc_cmd_general.cpp index f936f946..b3b1b3b4 100644 --- a/src/rpc-server/commands/trex_rpc_cmd_general.cpp +++ b/src/rpc-server/commands/trex_rpc_cmd_general.cpp @@ -631,6 +631,10 @@ TrexRpcCmdPushRemote::_run(const Json::Value ¶ms, Json::Value &result) { uint8_t port_id = parse_port(params, result); std::string pcap_filename = parse_string(params, "pcap_filename", result); double ipg_usec = parse_double(params, "ipg_usec", result); + double min_ipg_sec = 0; + if (params.isMember("min_ipg_usec")) { + min_ipg_sec = usec_to_sec(parse_double(params, "min_ipg_usec", result)); + } double speedup = parse_double(params, "speedup", result); uint32_t count = parse_uint32(params, "count", result); double duration = parse_double(params, "duration", result); @@ -649,7 +653,7 @@ TrexRpcCmdPushRemote::_run(const Json::Value ¶ms, Json::Value &result) { try { - port->push_remote(pcap_filename, ipg_usec, speedup, count, duration, is_dual); + port->push_remote(pcap_filename, ipg_usec, min_ipg_sec, speedup, count, duration, is_dual); } catch (const TrexException &ex) { generate_execute_err(result, ex.what()); } |