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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user