diff options
author | imarom <imarom@cisco.com> | 2015-11-25 07:39:39 -0500 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2015-11-25 07:39:39 -0500 |
commit | b6ec2066653319b60385de1d4117165eb88890a1 (patch) | |
tree | 582bda39a6d04641b3fd9481ca23d6ede53e5a17 /src/stateless/cp/trex_stateless_port.cpp | |
parent | 92dea3787ab7b2c9877af9cd539d42a6957f7da6 (diff) |
fixed a bug with default start command in the console
also added clear events and more types of events
Diffstat (limited to 'src/stateless/cp/trex_stateless_port.cpp')
-rw-r--r-- | src/stateless/cp/trex_stateless_port.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/stateless/cp/trex_stateless_port.cpp b/src/stateless/cp/trex_stateless_port.cpp index 5f1a3bca..2fd948fd 100644 --- a/src/stateless/cp/trex_stateless_port.cpp +++ b/src/stateless/cp/trex_stateless_port.cpp @@ -139,6 +139,9 @@ TrexStatelessPort::start_traffic(double mul, double duration) { send_message_to_dp(start_msg); + Json::Value data; + data["port_id"] = m_port_id; + get_stateless_obj()->get_publisher()->publish_event(TrexPublisher::EVENT_PORT_STARTED, data); } void @@ -194,6 +197,10 @@ TrexStatelessPort::stop_traffic(void) { change_state(PORT_STATE_STREAMS); + Json::Value data; + data["port_id"] = m_port_id; + get_stateless_obj()->get_publisher()->publish_event(TrexPublisher::EVENT_PORT_STOPPED, data); + } void @@ -366,7 +373,7 @@ TrexStatelessPort::on_dp_event_occured(TrexDpPortEvent::event_e event_type) { /* send a ZMQ event */ data["port_id"] = m_port_id; - get_stateless_obj()->get_publisher()->publish_event(TrexPublisher::EVENT_PORT_STOPPED, data); + get_stateless_obj()->get_publisher()->publish_event(TrexPublisher::EVENT_PORT_FINISHED_TX, data); break; default: |