livoxProto1: udpCmdDemux now consults per-device handler registry

Device class objects now have a per-Device unordered_map of handlers
keyed by cmd_set+cmd_id.
This commit is contained in:
2025-10-22 07:28:00 -04:00
parent 10afec2532
commit 8e1d609ca1
3 changed files with 64 additions and 29 deletions
+3 -1
View File
@@ -257,6 +257,7 @@ void main(const std::shared_ptr<smo::ComponentThread> &componentThread,
protoState.smoCallbacks = smoCallbacks;
protoState.deviceManager = std::make_unique<DeviceManager>();
protoState.deviceManager->broadcastListener.start();
protoState.deviceManager->udpCommandDemuxer.start();
}
void exit(void)
@@ -265,10 +266,11 @@ void exit(void)
return;
}
protoState.deviceManager->udpCommandDemuxer.stop();
protoState.deviceManager->broadcastListener.stop();
protoState.deviceManager.reset();
protoState.componentThread.reset();
protoState.isInitialized = false;
}
} // namespace livoxProto1
} // namespace livoxProto1