summaryrefslogtreecommitdiffstats
path: root/src/rpc-server
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-12-11 19:06:13 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-12-19 11:23:46 +0200
commite4c8e44b0842093ce2a245e863a8db7f4c2ae9ff (patch)
treef1c92ff366088eb5250d56d22058cb6db7f41aeb /src/rpc-server
parent057a1ec1e70584f3598e9980bb44f70f73065bac (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.cpp6
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 &params, 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 &params, 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());
}