01-18-2024 05:34 PM
Hello,
I'm currently trying to implement a clone manager for my application and I was wondering how best to notify the clone manager module when a clone is initialized or stopped. I'm asking because when the clones are launched in the clone manager module from a config file using a For loop, these events are not registered and therefore broadcast events like module did init and module did stop will not be available in the EHL. I'm able to launch the clones and store the names and IDs in a map registry but I'm not sure about how best to implement the notification. I will appreciate any suggestions. See screenshots below.
Thanks in advance..
01-18-2024 05:50 PM
Easiest thing would be to fire up a dummy clone and register for its events. So your EHL is good to go. Then in your code where you launch clones, use the dummy as the "first" one, taking into account that it has already launched when you populate your UI with all the other clone info as their 'Module did Init' events start firing.
01-18-2024 06:00 PM
I'm asking because when the clones are launched in the clone manager module from a config file using a For loop, these events are not registered and therefore broadcast events like module did init and module did stop will not be available in the EHL.
I would advise against what you've said above. You definitely want all of the clones registered.
01-19-2024 12:10 PM
Hello Darren,
Thanks for your reply. I decided to use a "start modules" request from the top level application and perform all the launching and registration in the Device Manager EHL and then passed the mapped info to the MHL to populate the UI. I found it easier this way. Again, thanks for the suggestion.
01-19-2024 01:29 PM
Hello Chris,
Your point is duly noted. Thanks
01-19-2024 02:33 PM
@SolPS wrote:
I decided to use a "start modules" request from the top level application and perform all the launching and registration in the Device Manager EHL and then passed the mapped info to the MHL to populate the UI.
This sounds like a great solution as well.