-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[java-matter-controller] Add pairing already-discovered command (#24916)
* [java-matter-controller] Add pairing already-discovered command * Address review comments * Update helper text
- Loading branch information
1 parent
22f05a0
commit 5247433
Showing
8 changed files
with
97 additions
and
24 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
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
30 changes: 30 additions & 0 deletions
30
...troller/java/src/com/matter/controller/commands/pairing/PairAlreadyDiscoveredCommand.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,30 @@ | ||
package com.matter.controller.commands.pairing; | ||
|
||
import chip.devicecontroller.ChipDeviceController; | ||
import com.matter.controller.commands.common.CredentialsIssuer; | ||
|
||
public final class PairAlreadyDiscoveredCommand extends PairingCommand { | ||
public PairAlreadyDiscoveredCommand( | ||
ChipDeviceController controller, CredentialsIssuer credsIssue) { | ||
super( | ||
controller, | ||
"already-discovered", | ||
PairingModeType.ALREADY_DISCOVERED, | ||
PairingNetworkType.NONE, | ||
credsIssue); | ||
} | ||
|
||
@Override | ||
protected void runCommand() { | ||
currentCommissioner() | ||
.pairDeviceWithAddress( | ||
getNodeId(), | ||
getRemoteAddr().getHostAddress(), | ||
getRemotePort(), | ||
getDiscriminator(), | ||
getSetupPINCode(), | ||
null); | ||
currentCommissioner().setCompletionListener(this); | ||
waitCompleteMs(getTimeoutMillis()); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ public enum PairingModeType { | |
CODE_PASE_ONLY, | ||
BLE, | ||
SOFT_AP, | ||
ALREADY_DISCOVERED, | ||
ON_NETWORK; | ||
} |
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 |
---|---|---|
|
@@ -22,5 +22,4 @@ public enum PairingNetworkType { | |
NONE, | ||
WIFI, | ||
THREAD, | ||
ETHERNET; | ||
} |
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