Examples of OnOffValue


Examples of org.openhab.binding.tinkerforge.internal.types.OnOffValue

   * <!-- end-user-doc -->
   * @generated
   */
  public void setSwitchState(OnOffValue newSwitchState)
  {
    OnOffValue oldSwitchState = switchState;
    switchState = newSwitchState;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICK_DC__SWITCH_STATE, oldSwitchState, switchState));
  }
View Full Code Here

Examples of org.openhab.binding.tinkerforge.internal.types.OnOffValue

   * <!-- begin-user-doc --> <!-- end-user-doc -->
   *
   * @generated NOT
   */
  public void fetchSwitchState() {
    OnOffValue value = OnOffValue.UNDEF;
    try {
      short currentVelocity = tinkerforgeDevice.getVelocity();
      value = currentVelocity == 0 ? OnOffValue.OFF : OnOffValue.ON;
      setSwitchState(value);
    } catch (TimeoutException e) {
View Full Code Here

Examples of org.openhab.binding.tinkerforge.internal.types.OnOffValue

   *
   * @generated NOT
   */
  @Override
  public void fetchSwitchState() {
    OnOffValue switchValue = OnOffValue.UNDEF;
    try {
      State state = getMbrick().getTinkerforgeDevice().getState();
      if (relayNum == 1) {
        switchValue = (state.relay1) ? OnOffValue.ON : OnOffValue.OFF;
      } else {
View Full Code Here

Examples of org.openhab.binding.tinkerforge.internal.types.OnOffValue

   * <!-- end-user-doc -->
   * @generated
   */
  public void setSwitchState(OnOffValue newSwitchState)
  {
    OnOffValue oldSwitchState = switchState;
    switchState = newSwitchState;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MDUAL_RELAY__SWITCH_STATE, oldSwitchState, switchState));
  }
View Full Code Here

Examples of org.openhab.binding.tinkerforge.internal.types.OnOffValue

          if (mDevice != null && mDevice.getEnabledA().get()) {
            if (command instanceof OnOffType) {
              logger.trace("{} found onoff command", LoggerConstants.COMMAND);
              if (mDevice instanceof MInSwitchActor) {
                OnOffType cmd = (OnOffType) command;
                OnOffValue state = cmd == OnOffType.OFF ? OnOffValue.OFF : OnOffValue.ON;
                ((MSwitchActor) mDevice).turnSwitch(state);
              } else if (mDevice instanceof DigitalActor) {
                OnOffType cmd = (OnOffType) command;
                HighLowValue state = cmd == OnOffType.OFF ? HighLowValue.LOW : HighLowValue.HIGH;
                ((DigitalActor) mDevice).turnDigital(state);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.