use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.
the class MBrickletSoundIntensityImpl method fetchSensorValue.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void fetchSensorValue() {
try {
int intensity = tinkerforgeDevice.getIntensity();
DecimalValue value = Tools.calculate(intensity);
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 MBrickletThermocoupleImpl 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_THERMOCOUPLE__SENSOR_VALUE, oldSensorValue, sensorValue));
}
}
use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.
the class MBrickletTemperatureImpl method fetchSensorValue.
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void fetchSensorValue() {
try {
short temperature = tinkerforgeDevice.getTemperature();
DecimalValue value = Tools.calculate100(temperature);
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 RotaryEncoderImpl 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.ROTARY_ENCODER__SENSOR_VALUE, oldSensorValue, sensorValue));
}
use of org.openhab.binding.tinkerforge.internal.types.DecimalValue in project openhab1-addons by openhab.
the class VCDeviceCurrentImpl 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.VC_DEVICE_CURRENT__SENSOR_VALUE, oldSensorValue, sensorValue));
}
Aggregations