Examples of DecimalValue


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

   * @generated NOT
   */
  public void fetchSensorValue() {
    try {
      short temperature = getMbrick().getTinkerforgeDevice().getAmbientTemperature();
      DecimalValue value = calculateTemperature(temperature);
      setSensorValue(value);
    } catch (TimeoutException e) {
      TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_TIMEOUT_EXCEPTION, e);
    } catch (NotConnectedException e) {
      TinkerforgeErrorHandler.handleError(this,
View Full Code Here

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

      implements
        BrickletTemperatureIR.AmbientTemperatureListener {

    @Override
    public void ambientTemperature(short newTemperature) {
      DecimalValue newValue = calculateTemperature(newTemperature);
      logger.trace("{} got new temperature {}", LoggerConstants.TFMODELUPDATE, newValue);
      if (newValue.compareTo(getSensorValue(), thresholdBigDecimal) != 0 ) {
        logger.trace("{} setting new temperature {}", LoggerConstants.TFMODELUPDATE, newValue);
        setSensorValue(newValue);
      } else {
        logger.trace("{} omitting new temperature {}", LoggerConstants.TFMODELUPDATE, newValue);
      }
View Full Code Here

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

   * <!-- end-user-doc -->
   * @generated
   */
  public void setSensorValue(DecimalValue newSensorValue)
  {
    DecimalValue oldSensorValue = sensorValue;
    sensorValue = newSensorValue;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_BAROMETER__SENSOR_VALUE, oldSensorValue, sensorValue));
  }
View Full Code Here

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

   * @generated NOT
   */
  public void fetchSensorValue() {
    try {
      int airPressure = tinkerforgeDevice.getAirPressure();
      DecimalValue value = Tools.calculate1000(airPressure);
      setSensorValue(value);
    } catch (TimeoutException e) {
      TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_TIMEOUT_EXCEPTION, e);
    } catch (NotConnectedException e) {
      TinkerforgeErrorHandler.handleError(this,
View Full Code Here

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

   */
  private class AirPressureListener implements BrickletBarometer.AirPressureListener {

    @Override
    public void airPressure(int airPressure) {
      DecimalValue newValue = Tools.calculate1000(airPressure);
      logger.trace("{} got new value {}", LoggerConstants.TFMODELUPDATE, newValue);
      if (newValue.compareTo(getSensorValue(), getThreshold()) != 0 ) {
        logger.trace("{} setting new value {}", LoggerConstants.TFMODELUPDATE, newValue);
        setSensorValue(newValue);
      } else {
        logger.trace("{} omitting new value {}", LoggerConstants.TFMODELUPDATE, newValue);
      }
View Full Code Here

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

   */
  private class DistanceListener implements BrickletDistanceIR.DistanceListener {

    @Override
    public void distance(int distance) {
      DecimalValue newValue = Tools.calculate(distance);
      logger.trace("{} got new value {}", LoggerConstants.TFMODELUPDATE, newValue);
      if (newValue.compareTo(getSensorValue(), getThreshold()) != 0 ) {
        logger.trace("{} setting new value {}", LoggerConstants.TFMODELUPDATE, newValue);
        setSensorValue(newValue);
      } else {
        logger.trace("{} omitting new value {}", LoggerConstants.TFMODELUPDATE, newValue);
      }
View Full Code Here

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

   * <!-- end-user-doc -->
   * @generated
   */
  public void setSensorValue(DecimalValue newSensorValue)
  {
    DecimalValue oldSensorValue = sensorValue;
    sensorValue = newSensorValue;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_MOISTURE__SENSOR_VALUE, oldSensorValue, sensorValue));
  }
View Full Code Here

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

   */
  public void fetchSensorValue()
  {
    try {
      int moisture = tinkerforgeDevice.getMoistureValue();
      DecimalValue value = Tools.calculate(moisture);
      setSensorValue(value);
    } catch (TimeoutException e) {
      TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_TIMEOUT_EXCEPTION, e);
    } catch (NotConnectedException e) {
      TinkerforgeErrorHandler.handleError(this,
View Full Code Here

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

   */
  private class MoistureListener implements BrickletMoisture.MoistureListener {

    @Override
    public void moisture(int moisture) {
      DecimalValue value = Tools.calculate(moisture);
      logger.trace("{} got new value {}", LoggerConstants.TFMODELUPDATE, value);
      if (value.compareTo(getSensorValue(), getThreshold()) != 0 ) {
        logger.trace("{} setting new value {}", LoggerConstants.TFMODELUPDATE, value);
        setSensorValue(value);
      } else {
        logger.trace("{} omitting new value {}", LoggerConstants.TFMODELUPDATE, value);
      }
View Full Code Here

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

   * <!-- end-user-doc -->
   * @generated
   */
  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));
  }
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.