summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/trex_rpc_server_api.h
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-09-10 07:54:05 +0300
committerHanoh Haim <hhaim@cisco.com>2015-09-10 07:54:05 +0300
commita360a1734c459d62bd4c204a6005214ce8944f85 (patch)
treee06cad6cf63a52701aff303c19024cde1d541ebd /src/rpc-server/trex_rpc_server_api.h
parent15b4f7cd7c3e9176c1f24fc632791e833cb588b8 (diff)
parente33befcf222fd2108d589dede11069d4256bb21a (diff)
Merge branch 'master' of csi-sceasr-b45:/auto/proj-pcube-b/apps/PL-b/tools/repo//trex-core
Conflicts: linux/ws_main.py
Diffstat (limited to 'src/rpc-server/trex_rpc_server_api.h')
-rw-r--r--src/rpc-server/trex_rpc_server_api.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/rpc-server/trex_rpc_server_api.h b/src/rpc-server/trex_rpc_server_api.h
index 6bb81c73..b4313670 100644
--- a/src/rpc-server/trex_rpc_server_api.h
+++ b/src/rpc-server/trex_rpc_server_api.h
@@ -115,6 +115,13 @@ protected:
*/
void verbose_msg(const std::string &msg);
+ /**
+ * prints a verbose message with a JSON to be converted to
+ * string
+ *
+ */
+ void verbose_json(const std::string &msg, const std::string &json_str);
+
TrexRpcServerConfig m_cfg;
bool m_is_running;
bool m_is_verbose;
@@ -156,10 +163,34 @@ public:
return s_server_uptime;
}
+
+ /**
+ * query for ownership
+ *
+ */
+ static const std::string &get_owner() {
+ return s_owner;
+ }
+
+ /**
+ * take ownership of the server array
+ * this is static
+ * ownership is total
+ *
+ */
+ static void set_owner(const std::string &owner) {
+ s_owner = owner;
+ }
+
+ static void clear_owner() {
+ s_owner = "none";
+ }
+
private:
std::vector<TrexRpcServerInterface *> m_servers;
bool m_verbose;
static const std::string s_server_uptime;
+ static std::string s_owner;
};
#endif /* __TREX_RPC_SERVER_API_H__ */