tango-simlib: Several device(s)
|
|
---|---|
Hello, Sorry to ask one more question! I would like to create several simulated devices with one sim control device per simulated devices in one device server process To do so, I have created in database two devices of my simulated Modbus class and I have also created two devices of the ModbusSimControl class. Unfortunately, the device server does not start. Here are the outputs
I looked a little into the source code. I noticed something strange in the configure_device_model() function of the tango_sim_generator.py file. here is the code: This function is called with test_device_name set to None. Therefore device names are fetched from the database using the db_instance.get_device_name() method but only the first returned device name is used (dev_name = dev_names[0]) Then my question is: Is it possible to have within the same device server process several simulated devices which each of them having their own sim control device? Thank's for your time Emmanuel |
|
|
---|---|
Hi Emmanuel, It is not possible at the moment. Currently we only create one model per device server, which means even if we have more than one device registered for that server, they are all using the same model instance, hence the reason why you are getting that error when you reference the second device instance in your sim control device's property. It is something we have to work on as part of the improvements to our library.You're also welcome to create a pull request in our repository, or log future issues there. Kind regards, K. Madisa |
|
|
---|---|
Hi Manu, I just wanted to inform you that we have now resolved this issue. This pull request ensures that multiple devices with their corresponding sim control devices can run in one device server process. Kind regards, K. Madisa Manu |