Skip to content

Commit

Permalink
NSD: Change service name to use modle name
Browse files Browse the repository at this point in the history
This patch changes NSD service name to use model name.

Signed-off-by: Yelin Jeong <[email protected]>
  • Loading branch information
niley7464 authored and wooksong committed Sep 19, 2024
1 parent 3aa41d3 commit 7595501
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ class MainService : Service() {
}
}

private inner class PipelineCallback(serviceId: Int, modelId: Int, port: Int) :
private inner class PipelineCallback(serviceId: Int, modelName: String, port: Int) :
Pipeline.StateChangeCallback {
val id = serviceId

val serviceInfo = NsdServiceInfo().apply {
serviceName = modelId.toString()
serviceName = modelName
serviceType = "_nsd_offloading._tcp"
setPort(port)
}
Expand Down Expand Up @@ -381,7 +381,7 @@ class MainService : Service() {
"tensor_query_serversrc id=" + serviceId.toString() + " host=" + hostAddress + " port=" +
port.toString() + " ! " + filter + " ! tensor_query_serversink async=false id=" + serviceId.toString()

val stateCb = PipelineCallback(serviceId, model.uid, port)
val stateCb = PipelineCallback(serviceId, model.name, port)
val pipeline = Pipeline(desc, stateCb)
val registrationListener = NsdRegistrationListener()

Expand Down

0 comments on commit 7595501

Please sign in to comment.