From: Carlos P. <cpa...@ce...> - 2015-07-03 06:50:57
|
On Thu 2 July 2015 19:03:43 Binit Amin wrote: > Hi Carlos, > > Thank You for forwarding my doubt to Sergi Rubio. > > Actually I have a requirement in that some device server > parameter/property have to show in table. In that case I can use > Table View Or TaurusPropTable. As of now, Taurus does not do anything more (poll, auto-update, etc) than what tango does for Tango device properties (as opposed to what it does for Tango attributes). Very recently there was a proposal for Taurus to handle tango device properties as TaurusAttributes, which I think it is a good idea, but will take some time to do unless someone else sends a patch. > > For displaying this device server parameter/property in table view, I > have to write proxy for each and every parameter in Python GUI code. > But the problem is that it won't update automatically if I write > device proxy. I have to attach some extra code so that my parameter > works same as TaurusLable. And I don't know how to update it > continuously. -- I think this Question were asked by kalyani once > "QLable not updating the values when connected to device server" > > So if you can suggest how to make Qlabel as tauruslabel or give me > some simple program for that. Note that, in principle, tango device properties are not supposed to change often. That is why events or polling are as important for them as they are for attributes and so, if we want to access them we just do something like: d=taurus.Device(devicename) d.get_property(propertyname) (Note: the TaurusDevice.get_property method comes straight from the underlying PyTango.DeviceProxy object) To sum up: - If you need continuous updates, consider using tango attributes rather than tango properties in your DS (then your client can use any taurus widget that supports attributes as its model) - If that is not possible, you need to implement some manual polling of the property yourself by periodically reading it -... or wait for Taurus to implement the "magic" of transparently converting the tango properties into TaurusAttributes Cheers, Carlos > > Till now you were very much helpful in solving my doubts. > Really I am very grateful to you for your help. > > Thanks once again. > > ----- Original Message ----- > From: "Carlos Pascual" <cpa...@ce...> > To: tau...@li... > Sent: Thursday, July 2, 2015 6:25:12 PM > Subject: Re: [Tauruslib-users] How to attach Model to the different > property of TaurusPropTable > > Hi Binit, > > I must confess that this is the first time I hear about > TaurusPropTable. AFAIK, it is a rather private widget only used by > taurusdevicetree (and only in some non-standard configurations) > > I tried to test it and couldn't make it work. > > The only person I know who *may* use it is Sergi Rubio. Maybe he can > explain something (I am forwarding this to him). > > Cheers! > > Ps: whenever possible, please try to use TangoTest for your questions > instead of a custom DS. This will make it easier for us to test. > > On Thu 2 July 2015 17:05:20 Binit Amin wrote: > > Hi All, > > > > > > I need help regarding TaurusPropTable. I have to attach model to the > > property of the TaurusPropTable. Consider that I have 2 property > > namely - fullName, marks. > > In back-end these properties are connected with the Tango device > > server. I want to connect this 2 parameter with TaurusPropTable. > > > > Attachment includes Java Program for Tango Device Server and auto > > generated Python code for PyQt4. > > > > I had search on net but won't be able to find much on > > TaurusPropTable. It would be great if any one can give me one small > > example on TaurusPropTable with two or three Property. -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |