// Initialize performs protocol-specific initialization for the device
// service.
Initialize performs protocol-specific initialization for the device
service.
// Initialize performs protocol - specific initialization for the device // service .
func (w *WebcamDriver) Initialize(lc logger.LoggingClient, asyncCh chan<- *dsModels.AsyncValues) error {
	w.lc = lc
	w.asyncCh = asyncCh
	w.lc.Debug("WebcamDriver.Initialize called")
	dc := map[string]string{
		"RedisURL":        "redis://localhost:6379",
		"RAIModelKey":     "redisai:model:yolo",
		"RAIModelPath":    "res/models/tiny-yolo-voc.pb",
		"RAIModelBackend": "TF",
		"RAIModelDevice":  "CPU",
		"RAIScriptKey":    "redisai:script:yolo-boxes",
		"RAIScriptPath":   "res/scripts/yolo-boxes.py",
		"RAIScriptDevice": "CPU",
	}
	re, err := redisedge.Initialize(dc, lc)
	if err != nil {
		w.lc.Error(fmt.Sprintf("WebcamDriver.Initialize: Error while initializing RedisEdge - %v", err))
		return err
	}
	w.re = re
	w.lc.Debug("WebcamDriver.Initialize exited")
	return nil
}
func ( w * WebcamDriver ) Initialize ( lc logger . LoggingClient , asyncCh chan <- * dsModels . AsyncValues ) error { w . lc = lc w . asyncCh = asyncCh w . lc . Debug ( " " ) dc := map [ string ] string { " " : " " , " " : " " , " " : " " , " " : " " , " " : " " , " " : " " , " " : " " , " " : " " , } re , err := redisedge . Initialize ( dc , lc ) if err != nil { w . lc . Error ( fmt . Sprintf ( " " , err ) ) return err } w . re = re w . lc . Debug ( " " ) return nil }
Initialize performs protocol-specific initialization for the device
service.
Initialize performs protocol - specific initialization for the device service .
// TODO: Device Configuration should be begotten from Config.Device