Set operation voltage level
324043
def set_operation_voltage_level(self):
        

        mv_station_v_level_operation = float(cfg_ding0.get('mv_routing_tech_constraints',
                                                           'mv_station_v_level_operation'))

        self.v_level_operation = mv_station_v_level_operation * self.grid.v_level
714990
def set_level(self, val):
        """"""
        if val == 0:
            self.off()
        else:
            setlevel = 255
            if val < 1:
                setlevel = val * 100
            elif val <= 0xff:
                setlevel = val
            set_command = StandardSend(
                self._address, COMMAND_LIGHT_ON_0X11_NONE, cmd2=setlevel)
            self._send_method(set_command, self._on_message_received)
49174
def set_current_operation_progress(self, percent):
        
        if not isinstance(percent, baseinteger):
            raise TypeError("percent can only be an instance of type baseinteger")
        self._call("setCurrentOperationProgress",
                     in_p=[percent])
473822
def power_on(env, identifier):
    """"""

    mgr = SoftLayer.HardwareManager(env.client)
    hw_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'hardware')
    env.client['Hardware_Server'].powerOn(id=hw_id)
126113
def set_volume(self, volume):
        """"""
        if volume > 100 or volume < 0:
            raise Exception('Bad request to volume control. '
                            'Must be between 0 and 100')
        params = ('<InstanceID>0</InstanceID><Channel>Master</Channel>'
                  '<DesiredVolume>{}</DesiredVolume>').format(volume)
        self.soap_request(URL_CONTROL_DMR, URN_RENDERING_CONTROL,
                          'SetVolume', params)
115204
def set_loglevel(level: Union[int, str, None] = None) -> None:
    
    if level is not None:
        lv = level_to_int(level)
    elif config.logging:
        lv = level_to_int(config.logging)
    elif config.debug:
        lv = logging.DEBUG
    else:
        lv = logging.INFO
    root_logger.setLevel(lv)
    _log_handler.setLevel(lv)
519782
def set_all_pwm(self, on, off):
        """"""
        self.i2c.write8(ALL_LED_ON_L, on & 0xFF)
        self.i2c.write8(ALL_LED_ON_H, on >> 8)
        self.i2c.write8(ALL_LED_OFF_L, off & 0xFF)
        self.i2c.write8(ALL_LED_OFF_H, off >> 8)
701508
def update(self):
        """"""
        if not self._continuous_sampling \
                or self._light_level < 0 \
                or self._operation_mode != self._mode:
            self._reset()
            self._set_mode(self._operation_mode)
            self._wait_for_result()
        self._light_level = self._get_result()
        if not self._continuous_sampling:
            self._power_down()
482840
def set_brightness(host, did, value, token=None):
    """"""
    urllib3.disable_warnings()
    if token:
        scheme = "https"
    if not token:
        scheme = "http"
        token = "1234567890"
    url = (
            scheme + '://' + host + '/gwr/gop.php?cmd=DeviceSendCommand&data=<gip><version>1</version><token>' + token + '</token><did>' + did + '</did><value>' + str(
        value) + '</value><type>level</type></gip>&fmt=xml')
    response = requests.get(url, verify=False)
    if response.status_code == '200':
        return True
    else:
        return False
382233
def battery_update(self, SYS_STATUS):
        ''''''
        # main flight battery
        self.battery_level = SYS_STATUS.battery_remaining
        self.voltage_level = SYS_STATUS.voltage_battery
        self.current_battery = SYS_STATUS.current_battery
        if self.settings.numcells != 0:
            self.per_cell = (self.voltage_level*0.001) / self.settings.numcells
64683
def set_level(self, val):
        """"""
        speed = self._value_to_fan_speed(val)
        if val == 0:
            self.off()
        else:
            set_command = ExtendedSend(self._address,
                                       COMMAND_LIGHT_ON_0X11_NONE,
                                       self._udata, cmd2=speed)
            set_command.set_checksum()
            self._send_method(set_command, self._on_message_received)
148253
def set_max(self):
        """"""
        if not self.__maxrange_state:
            data = self._controller.command(self._id, 'charge_max_range',
                                            wake_if_asleep=True)
            if data['response']['result']:
                self.__maxrange_state = True
            self.__manual_update_time = time.time()
1313835
def set_continuous(self, freq, amplitude, offset, output_state=True):
        """"""
        commands = ['MODL 0',       #disable any modulation
                    'FREQ {0}'.format(freq)
                    ]

        if freq > 4.05e9:
            commands.append('AMPH {0}'.format(amplitude)) #set rear RF doubler amplitude
            if offset > 0.0:
                print('HIGH FREQUENCY OUTPUT IS AC ONLY')
            if output_state is True:
                commands.append('ENBH 1') #enable output
            else:
                commands.append('ENBH 0')
        elif freq < 62.5e6:
            commands.extend(['AMPL {0}'.format(amplitude), 'OFSL {0}'.format(offset)]) #set front BNC amplitude
            if output_state is True:
                commands.append('ENBL 1') #enable output
            else:
                commands.append('ENBL 0')

        command_string = '\n'.join(commands)
        print_string = '\n\t' + command_string.replace('\n', '\n\t')
        logging.info(print_string)
        self.instr.write(command_string)
1122362
def set_level(logger=None, log_level=None):
    '''

    '''
    log_level = logging.getLevelName(os.getenv('VERBOSITY', 'WARNING'))
    logging.getLogger(logger).setLevel(log_level)
743027
def set_load_power(self, power_watts):
        
        new_val = int(round(power_watts * 10))
        if not 0 <= new_val <= 2000:
            raise ValueError("Load Power should be between 0-200 W")
        self._load_mode = self.SET_TYPE_POWER
        self._load_value = new_val
        self.__set_parameters()
688939
def set_interrupt_limits(self, low, high):
        
        self._device.write8(0x04, low & 0xFF)
        self._device.write8(0x05, low >> 8)
        self._device.write8(0x06, high & 0xFF)
        self._device.write8(0x07, high >> 8)
968262
private function _power()
    {
        foreach ($this->_buf as $sensor) {
            if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Current'))
                ||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Current')))
               && isset($sensor['Unit']) && ($sensor['Unit'] == 'Watts')
               && isset($sensor['Value'])) {
                $dev = new SensorDevice();
                $dev->setName($sensor['Sensor']);
                $dev->setValue($sensor['Value']);
                if (isset($sensor['Upper Critical']) && (($max = $sensor['Upper Critical']) != "na")) {
                    $dev->setMax($max);
                }
                if (isset($sensor['Status']) && (($status = $sensor['Status']) != "ok")) {
                    $dev->setEvent($status);
                }
                $this->mbinfo->setMbPower($dev);
            }
        }
    }