-
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.
[CI] Add test to check establish PASE connection only Java API (#25120)
- Loading branch information
1 parent
9dd4580
commit 1250729
Showing
7 changed files
with
74 additions
and
2 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
39 changes: 39 additions & 0 deletions
39
...er-controller/java/src/com/matter/controller/commands/pairing/PairAddressPaseCommand.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,39 @@ | ||
package com.matter.controller.commands.pairing; | ||
|
||
import chip.devicecontroller.ChipDeviceController; | ||
import com.matter.controller.commands.common.CredentialsIssuer; | ||
import java.util.logging.Level; | ||
import java.util.logging.Logger; | ||
|
||
public final class PairAddressPaseCommand extends PairingCommand { | ||
private static Logger logger = Logger.getLogger(PairAddressPaseCommand.class.getName()); | ||
|
||
public PairAddressPaseCommand(ChipDeviceController controller, CredentialsIssuer credsIssue) { | ||
super( | ||
controller, | ||
"address-paseonly", | ||
PairingModeType.ADDRESS_PASE_ONLY, | ||
PairingNetworkType.NONE, | ||
credsIssue); | ||
} | ||
|
||
@Override | ||
public void onPairingComplete(int errorCode) { | ||
logger.log(Level.INFO, "onPairingComplete with error code: " + errorCode); | ||
if (errorCode == 0) { | ||
setSuccess(); | ||
} else { | ||
setFailure("onPairingComplete failure"); | ||
} | ||
} | ||
|
||
@Override | ||
protected void runCommand() { | ||
currentCommissioner() | ||
.establishPaseConnection( | ||
getNodeId(), getRemoteAddr().getHostAddress(), getRemotePort(), getSetupPINCode()); | ||
|
||
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
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