/*
--- _updateControl ( ) method ---

This method update the pins control
777703
function ( ) {
			if ( document.getElementById ) {
				var MaindivElement = document.getElementById ( 'PinControl-MainDiv' );
				var OldPinsElement = document.getElementById ( 'PinControl-Pins' );
				if ( MaindivElement && OldPinsElement )
				{
					var NewPinsElement = _asHtmlElement ( 
						{ 
							mainElement : 'div',
							mainClass : "PinControl-Pins" , 
							pinElement : 'div',
							pinClass : "PinControl-Pin" , 
							categoryElement : 'div',
							categoryClass : "PinControl-Category" , 
							CategoryImgClass : "PinControl-Category-Img",
							textElement : 'div',
							textClass : "PinControl-Text" , 
							addressElement : 'div',
							addressClass : "PinControl-Address" , 
							phoneElement : 'div',
							phoneClass : "PinControl-Phone" , 
							urlElement : 'div',
							urlClass : "PinControl-Url" , 
							urlLength : 50 ,
							distanceElement : 'div' ,
							distanceClass : "PinControl-Distance",
							nextDistanceElement : 'div',
							nextDistanceClass : 'Pin-Print-NextDistance'
						}
					);
					NewPinsElement.id = 'PinControl-Pins';
					var OldStyle = OldPinsElement.style;
					var OldComputedStyle = window.getComputedStyle ( OldPinsElement, null );
					var OldMaxHeight;
					try
					{
						OldMaxHeight = OldComputedStyle.maxHeight;
					}
					catch ( e )
					{
						OldMaxHeight = '400px';
					}

					NewPinsElement.dataset.minimized = OldPinsElement.dataset.minimized;
					if ( 'yes' === NewPinsElement.dataset.minimized  ) {
						NewPinsElement.setAttribute ( "style", "visibility : hidden; width: 0; min-width: 0; height: 0; margin: 0.5em;" );
					}
					else {
						NewPinsElement.setAttribute ( "style", "visibility : visible; width: auto; min-width: 20em; height: auto; margin: 0.5em; max-height: "+ OldMaxHeight );
					}

					var ScrollTop = OldPinsElement.scrollTop;
					MaindivElement.replaceChild ( NewPinsElement, OldPinsElement );
					document.getElementById ( 'PinControl-Pins' ).scrollTop = ScrollTop;
				}
			}
		}
562610
function ( MouseEvent ) { 
		_Map.closePopup ( );
		var SelectedElement = MouseEvent.target;
		while ( SelectedElement && SelectedElement.className && ( -1 === SelectedElement.className.indexOf ('PinControl-Pin' ) ) ) {
			SelectedElement = SelectedElement.parentNode;
		}
		if ( SelectedElement && SelectedElement.className && ( -1 !== SelectedElement.className.indexOf ('PinControl-Pin' ) ) ) {
			_Pins.zoomTo ( SelectedElement.dataset.pinRange );
		}
		MouseEvent.stopPropagation ( );
	}
56319
@Override
    public void setPercentValue(GpioPinAnalogOutput pin, Number percent){
        setPercentValue(pin.getPin(), percent);
    }
865269
def pixy_value_update(blocks):
    
    if len(blocks) > 0:
        pan_error = X_CENTER - blocks[0]["x"]
        tilt_error = blocks[0]["y"] - Y_CENTER
        pan_loop.update(pan_error)
        tilt_loop.update(tilt_error)

        loop = asyncio.get_event_loop()
        if loop.is_running():
            # This is the version that will be used since we are in a callback, but I wanted to show how to
            # properly protect against calls to board.something when you don't know if you are in the non-async
            # land vs when you are currently executing code from within async land.
            asyncio.ensure_future(board.core.analog_write(PIN_PAN_SERVO, int(pan_loop.position * 180 / 1000)))
            asyncio.ensure_future(board.core.analog_write(PIN_TILT_SERVO, int(tilt_loop.position * 180 / 1000)))
        else:
            board.analog_write(PIN_PAN_SERVO, int(pan_loop.position * 180 / 1000))
            board.analog_write(PIN_TILT_SERVO, int(tilt_loop.position * 180 / 1000))
844690
public void createControlAdapter()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(this, tc, "createControlAdapter");

    if(type == Type.SOURCE)
      controlAdapter = new SourceStreamSetControl(remoteMEUuid, this);  
    else if (type == Type.LINK_SOURCE)
        controlAdapter = new LinkTransmitterControl(remoteMEUuid, this, true);
    else if (type == Type.LINK_REMOTE_SOURCE)
      controlAdapter = new LinkTransmitterControl(remoteMEUuid, this, false);
    else if(type == Type.TARGET)
      controlAdapter = new TargetStreamSetControl(this);
    else if (type == Type.LINK_TARGET)
      controlAdapter = new LinkReceiverControl(this, linkTarget);
    else if(type == Type.INTERNAL_OUTPUT)
      controlAdapter = new InternalOutputStreamSetControl(this);
    else if(type == Type.LINK_INTERNAL_OUTPUT)
      controlAdapter = new LinkPublicationPointControl(this);
    else if(type == Type.INTERNAL_INPUT)
    {
      // Nothing to do for an InternalInputStream set, we don't display those
    }
      
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "createControlAdapter");
  }
1355370
private void updateProgressButton(ProgressButton progressButton, SeekBar progressSeekBar) {
    progressButton.setProgress(progressSeekBar.getProgress());
    updatePinProgressContentDescription(progressButton);
  }
585603
public void update()
	{
		IProcess process = fConsole.getProcess();
		if (process != null)
		{
			setEnabled(process.canTerminate());
		}
	}
427709
function ( MouseEvent ) { 
		var PinsElement = document.getElementById ( 'PinControl-Pins' );
		var ReduceButtonElement = 	document.getElementById ( _ReduceButtonId );
		var ExtendButtonElement = 	document.getElementById ( _ExtendButtonId );
		if ( PinsElement.style.visibility === "hidden" ) {
			PinsElement.setAttribute ( "style", "visibility : visible; width: auto; min-width: 20em; height: auto; margin: 0.5em; max-height: "+ _MaxHeight +"px" );
			MouseEvent.target.id = _MinimizeButtonId;
			MouseEvent.target.setAttribute ( 'title' , _Translator.getText ( 'L.Marker.Pin.Control.onAdd.MinimizeButton' ) );
			PinsElement.dataset.minimized = 'no';
			ReduceButtonElement.setAttribute ( "style", "visibility : visible; width: 34px; height: 34px; padding: 1px; margin: 3px;" );
			ExtendButtonElement.setAttribute ( "style", "visibility : visible; width: 34px; height: 34px; padding: 1px; margin: 3px;" );
		}
		else {
			PinsElement.setAttribute ( "style", "visibility : hidden; width: 0; min-width: 0; height: 0; margin: 0.5em;" );
			MouseEvent.target.id = _MaximizeButtonId;
			MouseEvent.target.setAttribute ( 'title' , _Translator.getText ( 'L.Marker.Pin.Control.onAdd.MaximizeButton' ) );
			PinsElement.dataset.minimized = 'yes';
			ReduceButtonElement.setAttribute ( "style", "visibility : hidden; width: 0; height: 0; padding: 0; margin : 0" );
			ExtendButtonElement.setAttribute ( "style", "visibility : hidden; width: 0; height: 0; padding: 0; margin : 0" );
		}
		MouseEvent.stopPropagation ( );
	}
785380
public void updateExternalSREButtonLabels() {
		if (this.enableSystemWideSelector) {
			final ISREInstall wideSystemSRE = SARLRuntime.getDefaultSREInstall();
			final String wideSystemSRELabel;
			if (wideSystemSRE == null) {
				wideSystemSRELabel = Messages.SREConfigurationBlock_0;
			} else {
				wideSystemSRELabel = wideSystemSRE.getName();
			}
			this.systemSREButton.setText(MessageFormat.format(
					Messages.SREConfigurationBlock_1, wideSystemSRELabel));
		}
		if (!this.projectProviderFactories.isEmpty()) {
			final ISREInstall projectSRE = retreiveProjectSRE();
			final String projectSRELabel;
			if (projectSRE == null) {
				projectSRELabel = Messages.SREConfigurationBlock_0;
			} else {
				projectSRELabel = projectSRE.getName();
			}
			this.projectSREButton.setText(MessageFormat.format(
					Messages.SREConfigurationBlock_3, projectSRELabel));
		}
	}
494385
public void setControlValue(Object objValue)
    {
        if (objValue instanceof Boolean)
        {
            if (((Boolean)objValue).booleanValue())
                m_iCurrentState = ON;
            else
                m_iCurrentState = OFF;
        }
        else
            m_iCurrentState = NULL;
        this.updateImage();
    }
808174
public function replaceControl($nr, $control) {
        if(isset($this->controls[$nr])) {
            $this->controls[$nr] = $control;
        }
    }
736958
def write(self, pin, value):
        
        port, pin = self.pin_to_port(pin)
        portname = 'A'
        if port == 1:
            portname = 'B'
        self._update_register('GPIO' + portname, pin, value)
        self.sync()
150611
public void setShutdownValue(Number value, GpioPinAnalogOutput ... pin){
        for(GpioPinAnalogOutput p : pin) {
            setShutdownValue(value, p.getPin());
        }
    }
849109
public function setControls()
	{
		$this->controls	= array();
		$args	= func_get_args();
		for( $i = 0; $i < $this->type; $i ++ )
			if( isset( $args[$i] ) )
				$this->controls[$i]	= $args[$i];
	}
818273
function ( MainDiv ) {
		var PinsDiv = L.DomUtil.create ( 'div', 'PinControl-Pins', MainDiv );
		PinsDiv.id = 'PinControl-Pins';

		L.DomEvent.on ( MainDiv, 'click', _onClick );
		L.DomEvent.on ( MainDiv, 'dblclick', _onDblClick );
		L.DomEvent.on ( MainDiv, 'contextmenu', _onContextMenu );
		L.DomEvent.on ( MainDiv, 'dragstart', _onDragStart );
		L.DomEvent.on ( MainDiv, 'dragover', _onDragOver );
		L.DomEvent.on (	MainDiv, 'dragend', _onDragEnd );
		L.DomEvent.on ( MainDiv, 'mousedown', _onMouseDown );
		L.DomEvent.on ( MainDiv, 'drop', _onDrop );
		L.DomEvent.on ( MainDiv, 'mousewheel', _onWheel, false );
		L.DomEvent.on ( MainDiv, 'wheel', _onWheel, false );

		PinsDiv.dataset.minimized = 'no';
		
		return PinsDiv;
	}
483019
def <<(pin_)
      if pin_.kind_of?(Input)
        @inputs << pin_
      elsif pin_.kind_of?(Output)
        @outputs << pin_
      elsif pin_.kind_of?(Array) 
        # push an array of pin
        pin_.each { |p|
          self << p
        }
      end
      pin_.set_component(self)
    end
573144
def on_pumprequest(self, event):
        
        self.log("Updating pump status: ", event.controlvalue)
        self._set_digital_pin(self._pump_channel, event.controlvalue)