Set i2c slave address to use for subsequent calls.

        :param address:
        :type address: int
        :param force:
        :type force: Boolean
979802
def _set_address(self, address, force=None):
        
        force = force if force is not None else self.force
        if self.address != address or self._force_last != force:
            if force is True:
                ioctl(self.fd, I2C_SLAVE_FORCE, address)
            else:
                ioctl(self.fd, I2C_SLAVE, address)
            self.address = address
            self._force_last = force
40291
def set_address(network, address):
    
    if network.find('.//ip') is not None:
        raise RuntimeError("Address already specified in XML configuration.")

    netmask = str(address.netmask)
    ipv4 = str(address[1])
    dhcp_start = str(address[2])
    dhcp_end = str(address[-2])
    ip = etree.SubElement(network, 'ip', address=ipv4, netmask=netmask)
    dhcp = etree.SubElement(ip, 'dhcp')

    etree.SubElement(dhcp, 'range', start=dhcp_start, end=dhcp_end)
904779
def bind(address, port_or_type, &block)
      ZMachine.logger.debug("zmachine:connection:#{__method__}", connection: self) if ZMachine.debug
      klass = channel_class(address)
      @channel = klass.new
      @channel.bind(sanitize_adress(address, klass), port_or_type)
      @block = block
      @block.call(self) if @block && @channel.is_a?(ZMQChannel)
      self
    end
264497
def set_address(self, host, port):
        """"""
        self.host = host
        self.port = port
1188353
def loadAddressbyID(self, id, callback=None, errback=None):
        
        import ns1.ipam
        address = ns1.ipam.Address(self.config, id=id)
        return address.load(callback=callback, errback=errback)
625928
def execute(self, slave_id, route_map):
        
        try:
            values = []

            for address in range(self.starting_address,
                                 self.starting_address + self.quantity):
                endpoint = route_map.match(slave_id, self.function_code,
                                           address)
                values.append(endpoint(slave_id=slave_id, address=address,
                                       function_code=self.function_code))

            return values

        # route_map.match() returns None if no match is found. Calling None
        # results in TypeError.
        except TypeError:
            raise IllegalDataAddressError()
381457
def execute(self, slave_id, route_map):
        
        for index, value in enumerate(self.values):
            address = self.starting_address + index
            endpoint = route_map.match(slave_id, self.function_code, address)

            try:
                endpoint(slave_id=slave_id, address=address, value=value,
                         function_code=self.function_code)
            # route_map.match() returns None if no match is found. Calling None
            # results in TypeError.
            except TypeError:
                raise IllegalDataAddressError()
1035937
def address(addr):
    

    if ':' in addr:
        # Using rpartition here means we should be able to support
        # IPv6, but only with a strict syntax
        host, _sep, port = addr.rpartition(':')

        # Convert the port to a number
        try:
            port = int(port)
        except ValueError:
            raise ValueError("invalid port number %r" % port)

        addr = (host, port)

    return addr
318531
public static ResponseAddressAttribute createResponseAddressAttribute(
			TransportAddress address) {
		ResponseAddressAttribute attribute = new ResponseAddressAttribute();

		attribute.setAddress(address);

		return attribute;
	}
1043284
def write_single_register(slave_id, address, value):
    
    function = WriteSingleRegister()
    function.address = address
    function.value = value

    return _create_request_adu(slave_id, function.request_pdu)
260726
public void setInetAddress(InetSocketAddress address) {
		this.value = address.getAddress();
		this.type = AttributeType.INET_ADDRESS;
		this.assigned = this.value != null;
	}
1154290
def connect(self, address, **kws):
        
        return yield_(Connect(self, address, timeout=self._timeout, **kws))
889172
public static void setAddress(JobConf conf, String key,
      InetSocketAddress address) {
    if (address == null) {
      conf.unset(key);
      return;
    }
    String addrStr = address.getHostName() + ":" + address.getPort();
    conf.set(key, addrStr);
  }
1094788
public void setServerAddress(int serverAddress) throws ModbusNumberException {
        if (!Modbus.checkServerAddress(serverAddress))
            throw new ModbusNumberException("Error in slave id", serverAddress);
        this.serverAddress = serverAddress;
    }
482521
def accept(self, addr):
        

        # Add the address to the set
        ip_addr = _parse_ip(addr)
        if ip_addr is None:
            LOG.warn("Cannot add address %r to proxy %s: "
                     "invalid address" % (addr, self.address))
        else:
            self.accepted.add(addr)
58750
def _set_room_id_for_address(self, address: Address, room_id: Optional[_RoomID] = None):
        

        assert not room_id or room_id in self._client.rooms, 'Invalid room_id'
        address_hex: AddressHex = to_checksum_address(address)
        # filter_private=False to preserve public rooms on the list, even if we require privacy
        room_ids = self._get_room_ids_for_address(address, filter_private=False)

        with self._account_data_lock:
            # no need to deepcopy, we don't modify lists in-place
            # cast generic Dict[str, Any] to types we expect, to satisfy mypy, runtime no-op
            _address_to_room_ids = cast(
                Dict[AddressHex, List[_RoomID]],
                self._client.account_data.get('network.raiden.rooms', {}).copy(),
            )

            changed = False
            if not room_id:  # falsy room_id => clear list
                changed = address_hex in _address_to_room_ids
                _address_to_room_ids.pop(address_hex, None)
            else:
                # push to front
                room_ids = [room_id] + [r for r in room_ids if r != room_id]
                if room_ids != _address_to_room_ids.get(address_hex):
                    _address_to_room_ids[address_hex] = room_ids
                    changed = True

            if changed:
                # dict will be set at the end of _clean_unused_rooms
                self._leave_unused_rooms(_address_to_room_ids)
364818
def write(self, offset, value):
		
		if(not self.mode & 0b10):
			raise ReadOnlyError("Device is Read-Only")
		if(offset >= self.size):
			raise AddressError("Offset({}) not in address space({})".format(offset, self.size))
		self.repr_[offset].setvalue(value)