protected void settempMeasurement(TempStruct newValue) {
    if (tempMeasurement != newValue) {
      tempMeasurement = newValue;

      Logger.log(myDeviceInfo.getName(), "TemperatureSensor", "Publishing tempMeasurement");

      this.myPubSubMiddleware.publish("tempMeasurement", newValue, myDeviceInfo);
    }
  }
Пример #2
0
  public void notifyReceived(String eventName, Object arg, Device deviceInfo) {
    try {

      if (eventName.equals("getprofile")) {
        Logger.log(myDeviceInfo.getName(), "ProfileDB", "CommandReceived getprofile");

        onNewprofileRequestReceived((String) arg);
      }

    } catch (Exception e) {
      e.printStackTrace();
    }
  }