zhangmeng
2020-01-21 9d9cd1d3b93613071d1dffc1c82c4515d2a65af6
util/data.go
@@ -1,67 +1,24 @@
package util
// FetchServerInfo 从sqlite的服务器获取同步信息的服务
// FetchServerInfo 从sqlite的服务器获取SDK信息的服务器信息
type FetchServerInfo struct {
   IP       string
   HTTPort  int
   HBPort   int //心跳端口
   DataPort int //数据端口
}
// SDKFaceInfo face
type SDKFaceInfo struct {
   DetectThrd    int
   DetectNum     int
   DetectAngle   int
   PropThrd      int
   ExtractThrd   int
   TrackInterval int
   SampleSize    int
}
// SDKCarInfo car
type SDKCarInfo struct {
   LicenseServerPath string
   Model             string
   MaxImageWidth     int
   MaxImageHeight    int
}
var (
   // FSI 同步服务器信息
   // FSI SDK信息服务器IP/Port
   FSI = &FetchServerInfo{
      IP:       "127.0.0.1",
      HTTPort:  8001,
      HBPort:   40007,
      DataPort: 50007,
   }
   // SFI 人脸信息
   SFI = &SDKFaceInfo{
      DetectThrd:    16,
      DetectNum:     30,
      DetectAngle:   60,
      PropThrd:      16,
      ExtractThrd:   16,
      TrackInterval: 3,
      SampleSize:    720,
   }
   // SCI sdkcarinfo
   SCI = &SDKCarInfo{
      LicenseServerPath: "./vrt.key",
      Model:             "./data/model",
      MaxImageWidth:     4096,
      MaxImageHeight:    2160,
      HBPort:   5005,
      DataPort: 4005,
   }
   // ToRuleIPC to ruleprocess
   ToRuleIPC = "ipc:///tmp/sdk-2-rules-process.ipc"
   // RunParams slave进程需要的参数,从master传入
   RunParams []string
   // MapParames 保存参数map,备更新
   // MapParames map params
   MapParames = make(map[string]string)
   // LogFile log
@@ -77,23 +34,14 @@
)
const (
   RuleIPC = "rule-ipc"
   GPU        = "gpu"
   SHM        = "shm"
   LogIt      = "logit"
   ConfigPath = "config-path"
   FetchSrvIP            = "fetch-server-ip"
   FetchSrvPort          = "fetch-server-port"
   FetchSrvHeartbeatPort = "fetch-server-heartbeat-port"
   FetchSrvDataPort      = "fetch-server-data-port"
   FaceDetectThread   = "face-detect-thread"
   FaceDetectNum      = "face-detect-num"
   FaceDetectAngle    = "face-detect-angle"
   FacePropertyThread = "face-property-thread"
   FaceExtractThread  = "face-extract-thread"
   FaceTrackInterval  = "face-track-interval"
   FaceTrackSample    = "face-track-sample"
   CarSDKLicense     = "car-sdk-license"
   CarMaxImageWidth  = "car-max-image-width"
   CarMaxImageHeight = "car-max-image-height"
   CarSDKModel       = "car-sdk-model"
   RuleIPC = "rule-ipc"
)