Search in sources :

Example 71 with DecimalValue

use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.

the class MBrickletAnalogOutV2Impl method setSensorValue.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setSensorValue(DecimalValue newSensorValue) {
    DecimalValue oldSensorValue = sensorValue;
    sensorValue = newSensorValue;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_ANALOG_OUT_V2__SENSOR_VALUE, oldSensorValue, sensorValue));
}
Also used : DecimalValue(org.openhab.binding.tinkerforge.internal.types.DecimalValue) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 72 with DecimalValue

use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.

the class MBrickletAmbientLightImpl method setSensorValue.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setSensorValue(DecimalValue newSensorValue) {
    DecimalValue oldSensorValue = sensorValue;
    sensorValue = newSensorValue;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_AMBIENT_LIGHT__SENSOR_VALUE, oldSensorValue, sensorValue));
}
Also used : DecimalValue(org.openhab.binding.tinkerforge.internal.types.DecimalValue) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 73 with DecimalValue

use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.

the class MBrickletAmbientLightV2Impl method setSensorValue.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     *
     * @generated
     */
@Override
public void setSensorValue(DecimalValue newSensorValue) {
    DecimalValue oldSensorValue = sensorValue;
    sensorValue = newSensorValue;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_AMBIENT_LIGHT_V2__SENSOR_VALUE, oldSensorValue, sensorValue));
}
Also used : DecimalValue(org.openhab.binding.tinkerforge.internal.types.DecimalValue) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 74 with DecimalValue

use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.

the class MBrickletAmbientLightV2Impl method fetchSensorValue.

/**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     *
     * @generated NOT
     */
@Override
public void fetchSensorValue() {
    try {
        long illuminance = tinkerforgeDevice.getIlluminance();
        DecimalValue value = Tools.calculate100(illuminance);
        setSensorValue(value);
    } catch (TimeoutException e) {
        TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_TIMEOUT_EXCEPTION, e);
    } catch (NotConnectedException e) {
        TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_NOT_CONNECTION_EXCEPTION, e);
    }
}
Also used : DecimalValue(org.openhab.binding.tinkerforge.internal.types.DecimalValue) NotConnectedException(com.tinkerforge.NotConnectedException) TimeoutException(com.tinkerforge.TimeoutException)

Example 75 with DecimalValue

use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.

the class MBrickdImpl method setConnectedCounter.

/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * 
     * @generated
     */
@Override
public void setConnectedCounter(DecimalValue newConnectedCounter) {
    DecimalValue oldConnectedCounter = connectedCounter;
    connectedCounter = newConnectedCounter;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKD__CONNECTED_COUNTER, oldConnectedCounter, connectedCounter));
}
Also used : DecimalValue(org.openhab.binding.tinkerforge.internal.types.DecimalValue) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

DecimalValue (org.openhab.binding.tinkerforge.internal.types.DecimalValue)92 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)51 NotConnectedException (com.tinkerforge.NotConnectedException)36 TimeoutException (com.tinkerforge.TimeoutException)36 OnOffValue (org.openhab.binding.tinkerforge.internal.types.OnOffValue)3 Position (com.tinkerforge.BrickletJoystick.Position)2 BigDecimal (java.math.BigDecimal)2 Acceleration (com.tinkerforge.BrickletAccelerometer.Acceleration)1 TinkerforgeBindingProvider (org.openhab.binding.tinkerforge.TinkerforgeBindingProvider)1 JoystickXPosition (org.openhab.binding.tinkerforge.internal.model.JoystickXPosition)1 JoystickYPosition (org.openhab.binding.tinkerforge.internal.model.JoystickYPosition)1 DirectionValue (org.openhab.binding.tinkerforge.internal.types.DirectionValue)1 HSBValue (org.openhab.binding.tinkerforge.internal.types.HSBValue)1 HighLowValue (org.openhab.binding.tinkerforge.internal.types.HighLowValue)1 PercentValue (org.openhab.binding.tinkerforge.internal.types.PercentValue)1 ColorItem (org.openhab.core.library.items.ColorItem)1 ContactItem (org.openhab.core.library.items.ContactItem)1 DimmerItem (org.openhab.core.library.items.DimmerItem)1 NumberItem (org.openhab.core.library.items.NumberItem)1 RollershutterItem (org.openhab.core.library.items.RollershutterItem)1