forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[miio] Save last msgId and misc minor updates (openhab#11464)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
- Loading branch information
Showing
8 changed files
with
115 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...nhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/SavedDeviceInfoDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** | ||
* Copyright (c) 2010-2021 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.miio.internal; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
import com.google.gson.annotations.Expose; | ||
import com.google.gson.annotations.SerializedName; | ||
|
||
/** | ||
* Storing last id to to be able to reconnect better after binding restart | ||
* | ||
* @author Marcel Verpaalen - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class SavedDeviceInfoDTO { | ||
|
||
@SerializedName("lastId") | ||
@Expose | ||
private int lastId = 0; | ||
@SerializedName("deviceId") | ||
@Expose | ||
private String deviceId; | ||
|
||
public SavedDeviceInfoDTO(int lastId, String deviceId) { | ||
super(); | ||
this.lastId = lastId; | ||
this.deviceId = deviceId; | ||
} | ||
|
||
public int getLastId() { | ||
return lastId; | ||
} | ||
|
||
public void setLastId(int lastId) { | ||
this.lastId = lastId; | ||
} | ||
|
||
public String getDeviceId() { | ||
return deviceId; | ||
} | ||
|
||
public void setDeviceId(String deviceId) { | ||
this.deviceId = deviceId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters