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 (project-chip#28823)

* Add controller node ID API

* Restyled by google-java-format

* Add commissioner node id log

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
joonhaengHeo and restyled-commits authored Aug 23, 2023
1 parent d18dda6 commit 5532798
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 5532798

Please sign in to comment.