// GetDeviceStatus provides size, mapped sectors
359388
func (devices *DeviceSet) GetDeviceStatus(hash string) (*DevStatus, error) {
	info, err := devices.lookupDeviceWithLock(hash)
	if err != nil {
		return nil, err
	}

	info.lock.Lock()
	defer info.lock.Unlock()

	devices.Lock()
	defer devices.Unlock()

	status := &DevStatus{
		DeviceID:      info.DeviceID,
		Size:          info.Size,
		TransactionID: info.TransactionID,
	}

	if err := devices.activateDeviceIfNeeded(info, false); err != nil {
		return nil, fmt.Errorf("devmapper: Error activating devmapper device for '%s': %s", hash, err)
	}

	sizeInSectors, mappedSectors, highestMappedSector, err := devices.deviceStatus(info.DevName())

	if err != nil {
		return nil, err
	}

	status.SizeInSectors = sizeInSectors
	status.MappedSectors = mappedSectors
	status.HighestMappedSector = highestMappedSector

	return status, nil
}
1145725
func (r Survey) GetStatus() (resp datatypes.Survey_Status, err error) {
	err = r.Session.DoRequest("SoftLayer_Survey", "getStatus", nil, &r.Options, &resp)
	return
}
661710
func (r Security_Certificate_Request) GetStatus() (resp datatypes.Security_Certificate_Request_Status, err error) {
	err = r.Session.DoRequest("SoftLayer_Security_Certificate_Request", "getStatus", nil, &r.Options, &resp)
	return
}
621940
func GetDeviceSession(p *redis.Pool, devEUI lorawan.EUI64) (DeviceSession, error) {
	var dsPB DeviceSessionPB

	c := p.Get()
	defer c.Close()

	val, err := redis.Bytes(c.Do("GET", fmt.Sprintf(deviceSessionKeyTempl, devEUI)))
	if err != nil {
		if err == redis.ErrNil {
			return DeviceSession{}, ErrDoesNotExist
		}
		return DeviceSession{}, errors.Wrap(err, "get error")
	}

	err = proto.Unmarshal(val, &dsPB)
	if err != nil {
		// fallback on old gob encoding
		var dsOld DeviceSessionOld
		err = gob.NewDecoder(bytes.NewReader(val)).Decode(&dsOld)
		if err != nil {
			return DeviceSession{}, errors.Wrap(err, "gob decode error")
		}

		return migrateDeviceSessionOld(dsOld), nil
	}

	return deviceSessionFromPB(dsPB), nil
}
155620
func (r Virtual_Guest) GetStatus() (resp datatypes.Virtual_Guest_Status, err error) {
	err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getStatus", nil, &r.Options, &resp)
	return
}
727266
func GetEncodedStatus(ctx context.Context, config libkbfs.Config) (
	data []byte, t time.Time, err error) {
	status, _, err := config.KBFSOps().Status(ctx)
	if err != nil {
		config.Reporter().ReportErr(ctx, "", tlf.Private, libkbfs.ReadMode, err)
	}
	data, err = PrettyJSON(status)
	return
}
819182
func (n *NetworkServerAPI) GetDeviceActivation(ctx context.Context, req *ns.GetDeviceActivationRequest) (*ns.GetDeviceActivationResponse, error) {
	var devEUI lorawan.EUI64
	copy(devEUI[:], req.DevEui)

	ds, err := storage.GetDeviceSession(storage.RedisPool(), devEUI)
	if err != nil {
		return nil, errToRPCError(err)
	}

	return &ns.GetDeviceActivationResponse{
		DeviceActivation: &ns.DeviceActivation{
			DevEui:        ds.DevEUI[:],
			DevAddr:       ds.DevAddr[:],
			SNwkSIntKey:   ds.SNwkSIntKey[:],
			FNwkSIntKey:   ds.FNwkSIntKey[:],
			NwkSEncKey:    ds.NwkSEncKey[:],
			FCntUp:        ds.FCntUp,
			NFCntDown:     ds.NFCntDown,
			AFCntDown:     ds.AFCntDown,
			SkipFCntCheck: ds.SkipFCntValidation,
		},
	}, nil
}
621277
func (c *Client) GetStatus() (result Status, err error) {
	call := c.object.Call(dbusInterface+".GetStatus", 0)
	err = call.Err
	if err != nil {
		return
	}

	result = NewStatus(call.Body)

	return
}
968529
func (ckf *ComputedKeyFamily) GetCurrentDevice(g *GlobalContext) (*Device, error) {
	did := g.Env.GetDeviceID()
	if did.IsNil() {
		return nil, NotProvisionedError{}
	}

	dev, ok := ckf.cki.Devices[did]
	if !ok {
		return nil, NotFoundError{}
	}

	return dev, nil
}
1027296
func (_m *DBClient) GetDeviceServiceByName(n string) (models.DeviceService, error) {
	ret := _m.Called(n)

	var r0 models.DeviceService
	if rf, ok := ret.Get(0).(func(string) models.DeviceService); ok {
		r0 = rf(n)
	} else {
		r0 = ret.Get(0).(models.DeviceService)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(n)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
977778
func (ch *CiliumHealth) GetStatus() *models.Status {
	ch.Mutex.RLock()
	status := ch.status
	ch.Mutex.RUnlock()
	return status
}
793852
func (r Virtual_Guest_Block_Device_Template_Group) GetStatus() (resp datatypes.Virtual_Guest_Block_Device_Template_Group_Status, err error) {
	err = r.Session.DoRequest("SoftLayer_Virtual_Guest_Block_Device_Template_Group", "getStatus", nil, &r.Options, &resp)
	return
}
478746
func (r Network_Gateway) GetStatus() (resp datatypes.Network_Gateway_Status, err error) {
	err = r.Session.DoRequest("SoftLayer_Network_Gateway", "getStatus", nil, &r.Options, &resp)
	return
}
210569
func (n *nvmlDriver) DeviceInfoAndStatusByIndex(index uint) (*DeviceInfo, *DeviceStatus, error) {
	device, err := nvml.NewDevice(index)
	if err != nil {
		return nil, nil, err
	}
	status, err := device.Status()
	if err != nil {
		return nil, nil, err
	}
	return &DeviceInfo{
			UUID:               device.UUID,
			Name:               device.Model,
			MemoryMiB:          device.Memory,
			PowerW:             device.Power,
			BAR1MiB:            device.PCI.BAR1,
			PCIBandwidthMBPerS: device.PCI.Bandwidth,
			PCIBusID:           device.PCI.BusID,
			CoresClockMHz:      device.Clocks.Cores,
			MemoryClockMHz:     device.Clocks.Memory,
		}, &DeviceStatus{
			TemperatureC:       status.Temperature,
			GPUUtilization:     status.Utilization.GPU,
			MemoryUtilization:  status.Utilization.Memory,
			EncoderUtilization: status.Utilization.Encoder,
			DecoderUtilization: status.Utilization.Decoder,
			UsedMemoryMiB:      status.Memory.Global.Used,
			ECCErrorsL1Cache:   status.Memory.ECCErrors.L1Cache,
			ECCErrorsL2Cache:   status.Memory.ECCErrors.L2Cache,
			ECCErrorsDevice:    status.Memory.ECCErrors.Device,
			PowerUsageW:        status.Power,
			BAR1UsedMiB:        status.PCI.BAR1Used,
		}, nil
}
912041
func (s *SHT3xDriver) getStatusRegister() (status uint16, err error) {
	ret, err := s.sendCommandDelayGetResponse([]byte{0xf3, 0x2d}, nil, 1)
	if nil == err {
		status = ret[0]
	}
	return
}
603138
func (i *Import) GetStatus() string {
	if i == nil || i.Status == nil {
		return ""
	}
	return *i.Status
}
435789
func (surface *Surface) GetDeviceOffset() (float64, float64) {
	var xOffset C.double
	var yOffset C.double

	C.cairo_surface_get_device_offset(surface.Ptr, &xOffset, &yOffset)
	if err := surface.status(); err != nil {
		panic(err)
	}
	return float64(xOffset), float64(yOffset)
}