Skip to content

Commit

Permalink
[Android] Add controller node ID API test code in java-matter-control…
Browse files Browse the repository at this point in the history
…ler (#28823)

* Add controller node ID API

* Restyled by google-java-format

* Add commissioner node id log

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
2 people authored and pull[bot] committed Nov 15, 2023
1 parent ea34203 commit 1079171
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package com.matter.controller.commands.pairing
import chip.devicecontroller.ChipDeviceController
import com.matter.controller.commands.common.CredentialsIssuer

class PairCodeCommand(controller: ChipDeviceController, credsIssue: CredentialsIssuer?) :
class PairCodeCommand(val controller: ChipDeviceController, credsIssue: CredentialsIssuer?) :
PairingCommand(controller, "code", credsIssue, PairingModeType.CODE, PairingNetworkType.NONE) {
override fun runCommand() {
currentCommissioner()
Expand All @@ -34,5 +34,7 @@ class PairCodeCommand(controller: ChipDeviceController, credsIssue: CredentialsI
)
currentCommissioner().setCompletionListener(this)
waitCompleteMs(getTimeoutMillis())

println("Commissioner Node ID : ${controller.getControllerNodeId()}")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ import com.matter.controller.commands.common.CredentialsIssuer

private const val MATTER_PORT = 5540

class PairOnNetworkLongCommand(controller: ChipDeviceController, credsIssue: CredentialsIssuer?) :
class PairOnNetworkLongCommand(
val controller: ChipDeviceController,
credsIssue: CredentialsIssuer?
) :
PairingCommand(
controller,
"onnetwork-long",
Expand All @@ -43,5 +46,7 @@ class PairOnNetworkLongCommand(controller: ChipDeviceController, credsIssue: Cre
)
currentCommissioner().setCompletionListener(this)
waitCompleteMs(getTimeoutMillis())

println("Commissioner Node ID : ${controller.getControllerNodeId()}")
}
}

0 comments on commit 1079171

Please sign in to comment.