refactor: remove getPacketId() from public interface

- Remove getPacketId() from MessageSender interface (SDK owns packet IDs)
- Remove requestId parameter from requestTraceroute/requestNeighborInfo
- Make getPacketId() private in SdkRadioController (still used internally
  for delivery tracking correlation)
- Replace radioController.getPacketId() in map with local Random.nextInt()
  for waypoint ID generation (only needs uniqueness, not SDK correlation)
- Remove messageSender dependency from CommonNodeRequestActions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
James Rich
2026-05-06 12:23:25 -05:00
parent f4c6cee332
commit 0b5791a61d
7 changed files with 11 additions and 19 deletions

View File

@@ -318,7 +318,7 @@ class SdkRadioController(
c.requestNodeInfo(NodeId(destNum))
}
override suspend fun requestTraceroute(requestId: Int, destNum: Int) {
override suspend fun requestTraceroute(destNum: Int) {
val c = requireClient()
c.routing.traceRoute(NodeId(destNum))
}
@@ -338,7 +338,7 @@ class SdkRadioController(
}
}
override suspend fun requestNeighborInfo(requestId: Int, destNum: Int) {
override suspend fun requestNeighborInfo(destNum: Int) {
val c = requireClient()
c.routing.requestNeighborInfo(NodeId(destNum))
}
@@ -381,7 +381,7 @@ class SdkRadioController(
// ── Utility ─────────────────────────────────────────────────────────────
override fun getPacketId(): Int = packetIdCounter.getAndIncrement()
private fun getPacketId(): Int = packetIdCounter.getAndIncrement()
override fun startProvideLocation() {
// Location provision is managed at the app level; no-op here