コード例 #1
0
  private synchronized void updateTimeoutCondition() {
    if (isTimeout() != isTimeoutCondition()) {
      this.timeout = isTimeoutCondition();
      onTimeout(isTimeout());
    }

    // always update timeout to show initial data
    this.timeoutItem.updateData(Variant.valueOf(isTimeout()), null, null);
  }
コード例 #2
0
  /**
   * set a new connection state
   *
   * @param state the new connection state
   */
  protected synchronized void setConnectionState(final ConnectionState state) {
    logger.debug("Setting state to: {}", state);

    onPreStateChange(this.state, state);

    this.state = state;

    this.connectionStateItem.updateData(Variant.valueOf(state.name()), null, null);

    onPostStateChange();
  }
コード例 #3
0
 /** Update the state items from the current device state */
 private void updateDeviceState() {
   this.stateItem.updateData(Variant.valueOf(isDeviceOk()), null, null);
 }