Get current power.
550931
def get_power(self):
        """"""
        self.get_status()
        try:
            self.consumption = self.data['power']
        except TypeError:
            self.consumption = 0

        return self.consumption
1253411
def current(self, fields=None):
        """"""
        if fields is None:
            fields = self.fields

        return dict((f, self.get_field_value(f)) for f in fields)
262753
function(){
            if(!this.current){
                return this.getCurrent();
            }

            var index = this.targets.indexOf(this.current);
            if(index === 0){
                index = this.targets.length - 1;
            } else {
                index--;
            }
            this.setCurrent(this.targets[index]);

            return this.current;
        }
989544
async def set_power(self, value: bool):
        """"""
        if value:
            status = "active"
        else:
            status = "off"
        # TODO WoL works when quickboot is not enabled
        return await self.services["system"]["setPowerStatus"](status=status)
59776
public function current()
    {
        if ($this->_callback === null) {
            return parent::current();
        }

        return call_user_func_array($this->_callback, parent::current());
    }
1194867
def get_power(self):
        """"""
        power_dict = self.get_power_all()
        for device in power_dict.keys():
            power_dict[device] = float(power_dict[device]) / 1000.0
        return power_dict
337584
def get_power_state(self, userid):
        """"""
        LOG.debug('Querying power stat of %s' % userid)
        requestData = "PowerVM " + userid + " status"
        action = "query power state of '%s'" % userid
        with zvmutils.log_and_reraise_smt_request_failed(action):
            results = self._request(requestData)
        with zvmutils.expect_invalid_resp_data(results):
            status = results['response'][0].partition(': ')[2]
        return status
396287
async def query_power_state(self):
        
        power_data = await self._handler.query_power_state(
            system_id=self.system_id)
        # Update the internal state of this object as well, since we have the
        # updated power state from the BMC directly. MAAS server does this as
        # well, just do it client side to make it nice for a developer.
        self._data['power_state'] = power_data['state']
        return PowerState(power_data['state'])
1190368
private void returnArduinoPowerState(Buffer buffer) {
        Callback<Boolean> callback = getFirstCallback(BeanMessageID.CC_GET_AR_POWER);
        if (callback != null) {
            callback.onResult((buffer.readByte() & 0xff) == 1);
        }
    }
1071503
def get_time_remaining_estimate(self):
        
        power_status = SYSTEM_POWER_STATUS()
        if not GetSystemPowerStatus(pointer(power_status)):
            raise WinError()

        if POWER_TYPE_MAP[power_status.ACLineStatus] == common.POWER_TYPE_AC:
            return common.TIME_REMAINING_UNLIMITED
        elif power_status.BatteryLifeTime == -1:
            return common.TIME_REMAINING_UNKNOWN
        else:
            return float(power_status.BatteryLifeTime) / 60.0
811776
def get_current(self, channel):
        
        ret = self.ask("I%dO?" % channel)
        if ret[-1] != "A":
            print("ttiQl355tp.get_current() format error", ret)
            return None
        return float(ret[:-1])
931021
public function getCurrent()
    {
        if ($this->_current === null) {
            $this->_current = $this->resolveCurrent();
            $this->trigger(self::EVENT_AFTER_RESOLVE_CURRENT);
        }

        return $this->_current;
    }
1229263
def current_state(self):
        """"""
        state = {}
        for s in self._state:
            state[s] = getattr(self, s)
        return state
935824
def gotoNext(self):
        
        index = self._currentPanel.currentIndex() + 1
        if ( self._currentPanel.count() == index ):
            index = 0
            
        self._currentPanel.setCurrentIndex(index)
224709
def powerUp(self):
        """"""
        print '%s call powerUp' % self.port
        if not self.handle:
            self._connect()

        self.isPowerDown = False

        if not self.__isOpenThreadRunning():
            self.__startOpenThread()
656749
def get(self):
        """"""
        elapsed = datetime.now() - self._previous
        self._previous += elapsed
        return elapsed.total_seconds()
1290619
def get_providing_power_source_type(self):
        
        power_status = SYSTEM_POWER_STATUS()
        if not GetSystemPowerStatus(pointer(power_status)):
            raise WinError()
        return POWER_TYPE_MAP[power_status.ACLineStatus]