Ejemplo n.º 1
0
  @Override
  public void refreshObject() {
    // here we need to read from the bus, only if the read flag is set at the data point
    if (this.value().isReadable()) {
      int value = connector.readInt(groupAddress, DPTXlator8BitUnsigned.DPT_SCALING.getID());
      this.value().set(value);
      this.value().setNull(false);
    }

    // run refresh from super class
    super.refreshObject();
  }
Ejemplo n.º 2
0
  @Override
  public void writeObject(Obj obj) {
    if (this.value().isWritable()) {
      // always pass the writeObject call to the super method (triggers, oBIX related internal
      // services like watches, alarms, ...)
      // also the internal instance variables get updated
      super.writeObject(obj);

      // set isNull to false
      this.value().setNull(false);

      // now write this.value to the KNX bus
      connector.write(groupAddress, this.value().get());
    }
  }