summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-11-25 06:56:04 -0500
committerimarom <imarom@cisco.com>2015-11-25 06:56:04 -0500
commit92dea3787ab7b2c9877af9cd539d42a6957f7da6 (patch)
tree1cb27bc6eb3ffe3ea06609448e9dfb4dd47d1f5d /src
parent4a41c26a5cf23635a5b1332af6e806c915cf7e6c (diff)
added events log
Diffstat (limited to 'src')
-rwxr-xr-xsrc/main_dpdk.cpp1
-rw-r--r--src/publisher/trex_publisher.h5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp
index 57a87b71..3e5418b9 100755
--- a/src/main_dpdk.cpp
+++ b/src/main_dpdk.cpp
@@ -3274,6 +3274,7 @@ void CGlobalTRex::try_stop_all_dp(){
delay(100);
}
if ( all_core_finished ){
+ m_zmq_publisher.publish_event(TrexPublisher::EVENT_SERVER_STOPPED);
printf(" All cores stopped !! \n");
}else{
printf(" ERROR one of the DP core is stucked !\n");
diff --git a/src/publisher/trex_publisher.h b/src/publisher/trex_publisher.h
index 82603fda..89336735 100644
--- a/src/publisher/trex_publisher.h
+++ b/src/publisher/trex_publisher.h
@@ -39,10 +39,11 @@ public:
void publish_json(const std::string &s);
enum event_type_e {
- EVENT_PORT_STOPPED = 0
+ EVENT_PORT_STOPPED = 0,
+ EVENT_SERVER_STOPPED = 1
};
- void publish_event(event_type_e type, const Json::Value &data);
+ void publish_event(event_type_e type, const Json::Value &data = Json::nullValue);
private:
void show_zmq_last_error(const std::string &err);