use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.
the class AccelerometerDirectionImpl 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.ACCELEROMETER_DIRECTION__SENSOR_VALUE, oldSensorValue, sensorValue));
}
use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.
the class ColorIlluminanceImpl 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.COLOR_ILLUMINANCE__SENSOR_VALUE, oldSensorValue, sensorValue));
}
use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.
the class MBrickletCO2Impl method fetchSensorValue.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void fetchSensorValue() {
try {
int co2Concentration = tinkerforgeDevice.getCO2Concentration();
DecimalValue value = Tools.calculate(co2Concentration);
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);
}
}
use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.
the class MBrickletDistanceIRImpl 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_DISTANCE_IR__SENSOR_VALUE, oldSensorValue, sensorValue));
}
use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.
the class MBrickletDistanceIRImpl method fetchSensorValue.
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void fetchSensorValue() {
try {
int distance = tinkerforgeDevice.getDistance();
DecimalValue value = Tools.calculate(distance);
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);
}
}
Aggregations