From fa7e820c7715eb9294c9bae62c6f75fd3bda4f0d Mon Sep 17 00:00:00 2001
From: zhangjixing <775834166@qq.com>
Date: 星期二, 15 一月 2019 17:28:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/ywv1.2' into ywv1.2

---
 QiaoJiaSystem/YoloServer/main.cpp |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/QiaoJiaSystem/YoloServer/main.cpp b/QiaoJiaSystem/YoloServer/main.cpp
index 79a0345..a69beb9 100644
--- a/QiaoJiaSystem/YoloServer/main.cpp
+++ b/QiaoJiaSystem/YoloServer/main.cpp
@@ -23,10 +23,21 @@
 //    adapter->add(new YoloDetectServerI(), Ice::stringToIdentity(identity));
 //    adapter->activate();
 //    ich->waitForShutdown();
-    appPref.setIntData("gpu.index", 0);
-    appPref.setFloatData("thresh.detect", 0.7);
 
-    IceRpcServer<YoloDetectServerI> server("yoloServer", 10003, "tcp");
+    if (argc < 3) {
+        ERR("argc error");
+        return -1;
+    }
+
+    int gpuindex = atoi(argv[1]);
+    int poolNum = atoi(argv[2]);
+    int portNum = atoi(argv[3]);
+
+    appPref.setIntData("gpu.index", gpuindex);
+    appPref.setFloatData("thresh.detect", 0.7);
+    appPref.setIntData("poolNum", poolNum);
+
+    IceRpcServer<YoloDetectServerI> server("yoloServer", portNum, "tcp");
     server.setMessageSizeMax(1024 * 1024 * 50);
     server.setPoolInitSize(1);
     server.setPoolMaxSize(1);

--
Gitblit v1.8.0