// Start initializes the driver.
198449
func (d *MCP3004Driver) Start() (err error) {
	bus := d.GetBusOrDefault(d.connector.GetSpiDefaultBus())
	chip := d.GetChipOrDefault(d.connector.GetSpiDefaultChip())
	mode := d.GetModeOrDefault(d.connector.GetSpiDefaultMode())
	bits := d.GetBitsOrDefault(d.connector.GetSpiDefaultBits())
	maxSpeed := d.GetSpeedOrDefault(d.connector.GetSpiDefaultMaxSpeed())

	d.connection, err = d.connector.GetSpiConnection(bus, chip, mode, bits, maxSpeed)
	if err != nil {
		return err
	}
	return nil
}
1056868
func (d *TSL2561Driver) Start() (err error) {
	bus := d.GetBusOrDefault(d.connector.GetDefaultBus())
	address := d.GetAddressOrDefault(TSL2561AddressFloat)

	if d.connection, err = d.connector.GetConnection(address, bus); err != nil {
		return err
	}

	if err = d.enable(); err != nil {
		return err
	}

	var initialized byte
	if initialized, err = d.connection.ReadByteData(tsl2561RegisterID); err != nil {
		return err
	} else if (initialized & 0x0A) == 0 {
		return fmt.Errorf("TSL2561 device not found (0x%X)", initialized)
	}

	if err = d.SetIntegrationTime(d.integrationTime); err != nil {
		return err
	}

	if err = d.SetGain(d.gain); err != nil {
		return err
	}

	if err = d.disable(); err != nil {
		return err
	}

	return nil
}
798774
func (h *MPL115A2Driver) Start() (err error) {
	if err := h.initialization(); err != nil {
		return err
	}

	return
}
393994
func (t *TM1638Driver) Start() (err error) {

	t.pinStrobe.On()
	t.pinClock.On()

	t.sendCommand(TM1638DataCmd)
	t.sendCommand(TM1638DispCtrl | 8 | 7)

	t.pinStrobe.Off()
	t.send(TM1638AddrCmd)
	for i := 0; i < 16; i++ {
		t.send(TM1638WriteDisp)
	}
	t.pinStrobe.On()

	return
}
778632
func Start(logDir string, driver db.DB) error {
	e := echo.New()
	e.Debug = config.Conf.Debug

	// Middleware
	e.Use(middleware.Logger())
	e.Use(middleware.Recover())

	// setup access logger
	logPath := filepath.Join(logDir, "access.log")
	if _, err := os.Stat(logPath); os.IsNotExist(err) {
		if _, err := os.Create(logPath); err != nil {
			return err
		}
	}
	f, err := os.OpenFile(logPath, os.O_APPEND|os.O_WRONLY, 0600)
	if err != nil {
		return err
	}
	defer f.Close()
	e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
		Output: f,
	}))

	// Routes
	e.GET("/health", health())
	e.GET("/cves/:id", getCve(driver))
	e.POST("/cpes", getCveByCpeName(driver))

	bindURL := fmt.Sprintf("%s:%s", config.Conf.Bind, config.Conf.Port)
	log.Infof("Listening on %s", bindURL)

	e.Start(bindURL)
	return nil
}
1148900
func (h *BH1750Driver) Start() (err error) {
	bus := h.GetBusOrDefault(h.connector.GetDefaultBus())
	address := h.GetAddressOrDefault(bh1750Address)

	h.connection, err = h.connector.GetConnection(address, bus)
	if err != nil {
		return err
	}

	err = h.connection.WriteByte(h.mode)
	time.Sleep(10 * time.Microsecond)
	if err != nil {
		return err
	}

	return
}
326797
func (s *Server) Start() error {
	if !atomic.CompareAndSwapUint32(&s.started, 0, 1) {
		return nil
	}

	return nil
}
1000581
func (n *Driver) Start() (err error) {
	go func() {
		for {
			buff := make([]byte, 1024)
			_, err := n.adaptor().sp.Read(buff[:])
			if err != nil {
				n.Publish(n.Event("error"), err)
			} else {
				n.parse(bytes.NewBuffer(buff))
			}
		}
	}()
	return
}
1305188
func (sim *simra) Start(driver Driver) {
	simlog.FuncIn()

	gl := peer.NewGLPeer()
	sc := peer.GetSpriteContainer()
	sc.Initialize(gl)
	sim.gl = gl
	sim.spritecontainer = sc
	sim.driver = driver
	gomo := peer.GetGomo()
	gomo.Initialize(sim.onGomoStart, sim.onGomoStop, sim.onUpdate)
	gomo.Start()

	simlog.FuncOut()
}
504566
func (c *Connect) Start() error {
	c.cmd = exec.Command(c.Path, c.Args...)
	if c.UserName != "" {
		c.cmd.Args = append(c.cmd.Args, "--user", c.UserName)
	}
	if c.AccessKey != "" {
		c.cmd.Args = append(c.cmd.Args, "--api-key", c.AccessKey)
	}
	if c.SeleniumPort > 0 {
		c.cmd.Args = append(c.cmd.Args, "--se-port", strconv.Itoa(c.SeleniumPort))
	}
	if c.ExtraVerbose {
		c.cmd.Args = append(c.cmd.Args, "-vv")
	} else if c.Verbose {
		c.cmd.Args = append(c.cmd.Args, "-v")
	}
	if c.ExtraVerbose || c.Verbose {
		c.cmd.Stdout = os.Stdout
		c.cmd.Stderr = os.Stderr
	}
	if c.LogFile != "" {
		c.cmd.Args = append(c.cmd.Args, "--logfile", c.LogFile)
	}
	if c.QuitProcessUponExit && runtime.GOOS == "linux" {
		c.cmd.SysProcAttr = &syscall.SysProcAttr{
			// Deliver SIGTERM to process when we die.
			Pdeathsig: syscall.SIGTERM,
		}
	}

	dir, err := ioutil.TempDir("", "selenium-sauce-connect")
	if err != nil {
		return err
	}
	defer func() {
		os.RemoveAll(dir) // ignore error.
	}()

	var pidFilePath string
	if c.PIDFile != "" {
		pidFilePath = c.PIDFile
	} else {
		f, err := ioutil.TempFile("", "selenium-sauce-connect-pid.")
		if err != nil {
			return err
		}
		pidFilePath = f.Name()
		f.Close() // ignore the error.
	}

	// The path specified here will be touched by the proxy process when it is
	// ready to accept connections.
	readyPath := filepath.Join(dir, "ready")
	c.cmd.Args = append(c.cmd.Args, "--readyfile", readyPath)
	c.cmd.Args = append(c.cmd.Args, "--pidfile", pidFilePath)

	if err := c.cmd.Start(); err != nil {
		return err
	}

	// Wait for the Proxy to accept connections.
	var started bool
	for i := 0; i < 60; i++ {
		time.Sleep(time.Second)
		if _, err := os.Stat(readyPath); err == nil {
			started = true
			break
		}
	}
	if !started {
		c.Stop() // ignore error.
		return fmt.Errorf("proxy process did not become ready before the timeout")
	}
	return nil
}
229515
func (s *Server) Start() error {
	if atomic.AddInt32(&s.started, 1) != 1 {
		return nil
	}

	return s.manager.Start()
}
1239404
func (conn *OCI8Conn) Begin() (driver.Tx, error) {
	return conn.BeginTx(context.Background(), driver.TxOptions{})
}
906887
func (b *ButtonDriver) Start() (err error) {
	state := b.DefaultState
	go func() {
		for {
			newValue, err := b.connection.DigitalRead(b.Pin())
			if err != nil {
				b.Publish(Error, err)
			} else if newValue != state && newValue != -1 {
				state = newValue
				b.update(newValue)
			}
			select {
			case <-time.After(b.interval):
			case <-b.halt:
				return
			}
		}
	}()
	return
}
190374
func (u *uidProcessor) Start(ctx context.Context, eventInfo *common.EventInfo) error {

	return u.createAndStart(ctx, eventInfo, false)
}
511063
func (b *AccelerometerDriver) Start() (err error) {
	// subscribe to accelerometer notifications
	b.adaptor().Subscribe(accelerometerCharacteristic, func(data []byte, e error) {
		a := &RawAccelerometerData{X: 0, Y: 0, Z: 0}

		buf := bytes.NewBuffer(data)
		binary.Read(buf, binary.LittleEndian, &a.X)
		binary.Read(buf, binary.LittleEndian, &a.Y)
		binary.Read(buf, binary.LittleEndian, &a.Z)

		result := &AccelerometerData{
			X: float32(a.X) / 1000.0,
			Y: float32(a.Y) / 1000.0,
			Z: float32(a.Z) / 1000.0}

		b.Publish(b.Event(Accelerometer), result)
	})

	return
}
763781
func (h *MPU6050Driver) Start() (err error) {
	if err := h.initialize(); err != nil {
		return err
	}

	return
}
149055
func (c *client) Start(ctx context.Context, mysqldArgs ...string) error {
	return c.withRetry(ctx, func() error {
		_, err := c.c.Start(ctx, &mysqlctlpb.StartRequest{
			MysqldArgs: mysqldArgs,
		})
		return err
	})
}