Gets the value from :class:`~pypot.dynamixel.motor.DxlMotor` and sets it to the specified register.
327540
def set_register(self, motors):
        
        if not motors:
            return
        ids = [m.id for m in motors]

        values = (m.__dict__[self.varname] for m in motors)
        getattr(self.io, 'set_{}'.format(self.regname))(dict(zip(ids, values)))

        for m in motors:
            m._write_synced[self.varname].done()
483806
def set_motor_force(self, motor_name, force):
        
        self.call_remote_api('simxSetJointForce',
                             self.get_object_handle(motor_name),
                             force,
                             sending=True)
1073924
def _set_as_int(self, addr, val, numBytes = 1):
        """"""
        if not isinstance(val, int):
            raise ValueError("val must be an int. You provided: %s" % str(val))
        buf = []
        for i in range(numBytes):
            buf.append(cast_to_byte(val >> 8 * i))
        self.set_register(addr, buf)
626544
private void register(String converterClassName) {

    Class<Converter> converterClass = ObjectUtils.loadClass(converterClassName);

    if (ObjectUtils.assignableTo(converterClass, Converter.class)) {
      try {
        Converter<?, ?> converter = (Converter<?, ?>) converterClass.newInstance();
        register(converter);
      }
      catch (Exception ignore) {
      }
    }
  }
639239
def register(self, entry_point):
        
        if entry_point in self.registered_converters:
            raise ValueError('Already registered')
        self.registered_converters.insert(0, entry_point)
1201392
def instruction_ASR_register(self, opcode, register):
        
        a = register.value
        r = self.ASR(a)
#        log.debug("$%x ASR %s value $%x >> 1 | Carry = $%x" % (
#            self.program_counter,
#            register.name, a, r
#        ))
        register.set(r)
540580
def set_position_d(self, dvalue):
        
        dvalue_msb = int(dvalue) >> 8
        dvalue_lsb = int(dvalue) & 0xff
        data = []
        data.append(0x0B)
        data.append(self.servoid)
        data.append(RAM_WRITE_REQ)
        data.append(POSITION_KD_RAM)
        data.append(BYTE2)
        data.append(dvalue_lsb)
        data.append(dvalue_msb)
        send_data(data)
1014661
def set_controller_value(self, index_or_name, value):
        
        if not isinstance(index_or_name, int):
            index = self.get_controller_index(index_or_name)
        else:
            index = index_or_name
        self.dll.SetControllerValue(index, ctypes.c_float(value))
1217568
def _set_speed(self, motor, speed):
        
        self._validate_motor(motor)
        en, in1, in2 = self._motors[motor-1]

        if speed == 0:
            en.pwm_stop()
            in1.set(False)
            in2.set(False)
        elif speed > 0:
            en.pwm_start(abs(speed))
            in1.set(True)
            in2.set(False)
        else:
            en.pwm_start(abs(speed))
            in1.set(False)
            in2.set(True)
775245
def set_register(self, reg, data):
        
        if reg < 0:
            return
        elif reg < len(self._register_list):
            regName = self._register_list[reg].name
            regBits = self._register_list[reg].bitsize
            if regBits == 64:
                value = conversion.hex16_to_u64be(data)
            else:
                value = conversion.hex8_to_u32be(data)
            logging.debug("GDB: write reg %s: 0x%X", regName, value)
            self._context.write_core_register_raw(regName, value)
1083611
def get_control_mode(self):
        
        mode_value = self.read_register(4101)
        
        try:
            return CONTROL_MODES[mode_value]
        except KeyError:
            raise ValueError( 'Could not parse the control mode value: {0}. Allowed values are: {1}'.format(
                repr(mode_value), repr(list(CONTROL_MODES.keys()) ) ))
15777
def instruction_ST16(self, opcode, ea, register):
        
        value = register.value
#        log.debug("$%x ST16 store value $%x from %s at $%x \t| %s" % (
#             self.program_counter,
#             value, register.name, ea,
#             self.cfg.mem_info.get_shortest(ea)
#         ))
        self.clear_NZV()
        self.update_NZ_16(value)
        return ea, value
1329725
def _get_constrs_move_register(self, gadget):
        
        # *src* register has to have the same value of *dst* for all
        # possibles assignments of *dst*.

        dst = self.analyzer.get_register_expr(gadget.destination[0].name, mode="post")
        src = self.analyzer.get_register_expr(gadget.sources[0].name, mode="pre")

        # Check all non-modified registers don't change.
        constrs_mod = []

        for name in self._arch_info.registers_gp_base:
            if name not in [r.name for r in gadget.modified_registers]:
                var_initial = self.analyzer.get_register_expr(name, mode="pre")
                var_final = self.analyzer.get_register_expr(name, mode="post")

                constrs_mod += [var_initial != var_final]

        if constrs_mod:
            constrs_mod = [reduce(lambda c, acc: acc | c, constrs_mod[1:], constrs_mod[0])]

        return [dst != src] + constrs_mod
240073
def SetValue(self, identifier, value):
    
    if not isinstance(identifier, py2to3.STRING_TYPES):
      raise TypeError('Identifier not a string type.')

    identifier = identifier.lower()
    self._values[identifier] = value
55492
def to_register(compiler, source)
      if known_object.respond_to?(:ct_type)
        type = known_object.ct_type
      elsif(known_object.respond_to?(:get_type))
        type = known_object.get_type
      else
        type = :Object
      end
      right = compiler.use_reg( type )
      case known_object
      when Constant
        parfait = known_object.to_parfait(compiler)
        const = Risc.load_constant(source, parfait , right)
        compiler.add_code const
        raise "Can't have slots into Constants" if slots.length > 0
      when Parfait::Object , Risc::Label
        const = const  = Risc.load_constant(source, known_object , right)
        compiler.add_code const
        if slots.length > 0
          # desctructively replace the existing value to be loaded if more slots
          compiler.add_code Risc.slot_to_reg( source , right ,slots[0], right)
        end
      when Symbol
        return sym_to_risc(compiler , source)
      else
        raise "We have a #{self} #{known_object}"
      end
      if slots.length > 1
        # desctructively replace the existing value to be loaded if more slots
        index = Risc.resolve_to_index(slots[0] , slots[1] ,compiler)
        compiler.add_code Risc::SlotToReg.new( source , right ,index, right)
        if slots.length > 2
          raise "3 slots only for type #{slots}" unless slots[2] == :type
          compiler.add_code Risc::SlotToReg.new( source , right , Parfait::TYPE_INDEX, right)
        end
      end
      return const.register
    end
816082
def <<( reg )
      raise "not reg #{reg}" unless reg.is_a?(RegisterValue)
      reg_to_slot = Risc.reg_to_slot("#{reg.class_name} -> #{register.class_name}[#{index}]" , reg , register, index)
      builder.add_code(reg_to_slot) if builder
      reg_to_slot
    end
495534
def BX(self, params):
        
        Rj = self.get_one_parameter(self.ONE_PARAMETER, params)

        self.check_arguments(LR_or_general_purpose_registers=(Rj,))

        def BX_func():
            self.register['PC'] = self.register[Rj]

        return BX_func