Access object of DynamicManagement outside tango generated class.
|
|
---|---|
Hi all, This is Sarojini. I have few queries related to DynamicManagement class. I want to create dynamic attributes by referring dynamicManager outside the tango generated class. Is there any way to access dynamicManager(object of DynamicManagement class) outside the tango class. If yes? then how to access?
Regards,
TCS_GMRT |
|
|
---|---|
A simple solution in JAVA: Lets say you want to access DynamicManager object in Class XYZ which is not a TANGO Class. Create a parameterized constructor of Class XYZ, with DynamicManager object as one of the parameters. Example is shown below:
In the init_device method of your TANGO Class, create an object of XYZ class. Example is shown below: This will address your problem. However I'm not sure whether creating attributes dynamically outside the TANGO Class is as per the TANGO pattern or not. TANGO experts will shed some light on it. |
|
|
---|---|
Hi Vatsal, I tried with the mentioned solution and I am able to create dynamic attributes from other classes too. Thank you.
Regards,
TCS_GMRT |