コード例 #1
0
  public void process() {
    if (start.getValue() == true) {
      if (counter >= to.getValue()) {
        counter = from.getValue();
      }
      started = true;
    }

    if (stop.getValue()) {
      started = false;
    }

    if (delay.getValue() != oldImpuse) {
      oldImpuse = delay.getValue();
      if (timer != null) timer.setDelay(delay.getValue());
    }

    if (reset.getValue() == true) {
      counter = from.getValue();
      outValue.setValue(counter);
      outValue.setChanged(true);
      element.notifyPin(0);
    }
  }
コード例 #2
0
  public void process() {
    // checkPinDataType();

    //    if (out!=null)
    {
      /*   if (inBool.getValue()==true)
      {
        if (inA!=null)  out.copyValueFrom(inA); else out.copyValueFrom(null);
        out.setChanged(true);
        element.notifyPin(0);
      }else
      if (inBool.getValue()==false)
      {
        if (inB!=null)  out.copyValueFrom(inB); else out.copyValueFrom(null);
        out.setChanged(true);
        element.notifyPin(0);
      }*/

      if (inBool.getValue() == true) {
        if (inA != null) {
          out.copyValueFrom(inA);
        } else {
          out.copyValueFrom(null);
        }
      } else {
        /*if (inB!=null )
        {
          out.copyValueFrom(inB);
        } else
        {
         out.copyValueFrom(null);
        }*/
      }

      out.setChanged(true);
      element.setPinOutputReference(0, out);
      element.notifyPin(0);
    }
  }