// Start calls Start on each Device in d
333161
func (d *Devices) Start() (err error) {
	log.Println("Starting devices...")
	for _, device := range *d {
		info := "Starting device " + device.Name()

		if pinner, ok := device.(Pinner); ok {
			info = info + " on pin " + pinner.Pin()
		}

		log.Println(info + "...")
		if derr := device.Start(); derr != nil {
			err = multierror.Append(err, derr)
		}
	}
	return err
}
342541
func (s *Service) Start(ctx context.Context) error {
	return s.collectContainersAndDo(ctx, func(c *container.Container) error {
		if err := s.connectContainerToNetworks(ctx, c, false); err != nil {
			return err
		}
		return c.Start(ctx)
	})
}
1346278
func (vm *VM) Start() error {
	id := fmt.Sprintf("%v", vm.Droplet.ID)
	if id == "" {
		return ErrNoInstanceID
	}

	client := &http.Client{}
	req, err := BuildRequest(vm.APIToken, "POST", apiBaseURL+apiDropletURL+"/"+id+"/actions", strings.NewReader(`{"type": "power_on"}`))
	if err != nil {
		return err
	}
	rsp, err := client.Do(req)
	if err != nil {
		return err
	}
	defer rsp.Body.Close()
	b, err := ioutil.ReadAll(rsp.Body)
	if err != nil {
		return err
	}
	if rsp.Status[0] != StatusOk {
		return fmt.Errorf("Error: %s: %s", rsp.Status, string(b))
	}

	return nil
}
286236
func (e *emitter) Start() {
	if !e.started {
		e.started = true
		e.wg.Add(1)
		go e.startEventListener(&e.wg)
	}
}
1061485
func (it *invDatastoreIter) start(c context.Context, query *datastore.Query) {
	it.results = make(chan *Invocation)
	it.done = make(chan struct{})
	go func() {
		defer close(it.results)
		err := datastore.Run(c, query, func(obj *Invocation, cb datastore.CursorCB) error {
			select {
			case it.results <- obj:
				return nil
			case <-it.done:
				return datastore.Stop
			}
		})
		// Let 'next' and 'stop' know about the error. They look here if they
		// receive 'nil' from the results channel (which happens if it is closed).
		it.err = err
	}()
}
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
}
1015938
func (prg *Program) Start(srv service.Service) error {
	os.Exit(0)
	return nil
}
1340977
func (b *Driver) Start() (err error) {
	b.Init()

	// send commands
	go func() {
		for {
			packet := <-b.packetChannel
			err := b.write(packet)
			if err != nil {
				b.Publish(b.Event(Error), err)
			}
		}
	}()

	go func() {
		for {
			b.adaptor().ReadCharacteristic(responseCharacteristic)
			time.Sleep(100 * time.Millisecond)
		}
	}()

	b.ConfigureCollisionDetection(DefaultCollisionConfig())

	return
}
141905
func (s *Service) Start() error {
	logger.Infof("Starting service %q", s.Service.Name)
	running, err := s.Running()
	if err != nil {
		return errors.Trace(err)
	}
	if running {
		logger.Infof("Service %q already running", s.Service.Name)
		return nil
	}
	err = s.manager.Start(s.Name())
	return err
}
51054
func (linux *systemDRecord) Start() (string, error) {
	startAction := "Starting " + linux.description + ":"

	if ok, err := checkPrivileges(); !ok {
		return startAction + failed, err
	}

	if !linux.isInstalled() {
		return startAction + failed, ErrNotInstalled
	}

	if _, ok := linux.checkRunning(); ok {
		return startAction + failed, ErrAlreadyRunning
	}

	if err := exec.Command("systemctl", "start", linux.name+".service").Run(); err != nil {
		return startAction + failed, err
	}

	return startAction + success, nil
}
261999
func (m *Monitor) Start() {
	monitorStopFunc := func(monitorFunc func() error) func(stopSignal chan struct{}) {
		return func(stopSignal chan struct{}) {
			for {
				select {
				case <-stopSignal:
					return
				default:
					monitorFunc()
				}
			}
		}
	}

	monitorSerial := monitorStopFunc(m.serialDiscover)
	monitorNetwork := monitorStopFunc(m.networkDiscover)

	m.stoppable = cc.Run(monitorSerial, monitorNetwork)
}
289788
func Start(timeout uint8) (e error) {
	const errLoc = "daemonigo.Start()"
	cmd, err := StartCommand()
	if err != nil {
		return fmt.Errorf(
			"%s: failed to create daemon start command, reason -> %s",
			errLoc, err.Error(),
		)
	}
	if err = cmd.Start(); err != nil {
		return fmt.Errorf(
			"%s: failed to start %s, reason -> %s",
			errLoc, AppName, err.Error(),
		)
	}
	select {
	case <-func() chan bool {
		ch := make(chan bool)
		go func() {
			if err := cmd.Wait(); err != nil {
				e = fmt.Errorf(
					"%s: %s running failed, reason -> %s",
					errLoc, AppName, err.Error(),
				)
			} else {
				e = fmt.Errorf(
					"%s: %s stopped and not running", errLoc, AppName,
				)
			}
			ch <- true
		}()
		return ch
	}():
	case <-time.After(time.Duration(timeout) * time.Second):
	}
	return
}
849064
func (q *Query) Start(start int) {
	q.params.Set("start", fmt.Sprintf("%d", start))
}
1245979
func (task *UDPListenerTask) Start(wg *sync.WaitGroup) StopChan {
	return task.ExtendedStart(nil, wg)
}
1146776
func (a *AdafruitMotorHatDriver) Start() (err error) {
	bus := a.GetBusOrDefault(a.connector.GetDefaultBus())

	if a.servoHatConnection, err = a.connector.GetConnection(servoHatAddress, bus); err != nil {
		return
	}

	if err = a.startDriver(a.servoHatConnection); err != nil {
		return
	}

	if a.motorHatConnection, err = a.connector.GetConnection(motorHatAddress, bus); err != nil {
		return
	}

	if err = a.startDriver(a.motorHatConnection); err != nil {
		return
	}

	return
}
387848
func (i *INA3221Driver) Start() error {
	var err error
	bus := i.GetBusOrDefault(i.connector.GetDefaultBus())
	address := i.GetAddressOrDefault(int(ina3221Address))

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

	if err := i.initialize(); err != nil {
		return err
	}

	return nil
}
1199250
func (imu *IMUDriver) Start() (err error) {
	imu.connection.On("SysexResponse", func(res interface{}) {
		data := res.([]byte)
		imu.handleEvent(data)
	})
	return
}