Menu

#686 Device property substitution for a multi-device server

closed-fixed
PyTango
5
2014-09-30
2014-09-23
No

Using the new-style Tango device API, I ran into an unexpected behaviour related to the device properties for a multi-device server.

In order to reproduce this bug:

  • Use this python code:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    #!/usr/bin/python
    from PyTango.server import Device, DeviceMeta, attribute, 
    from PyTango.server import device_property, run
    
    class TestDevice(Device):
        __metaclass__ = DeviceMeta
        TestProperty = device_property(dtype=str)
        testAttribute = attribute(dtype=str)
    
        def init_device(self):
            self.get_device_properties()
    
        def read_testAttribute(self):
            return self.TestProperty
    
    if __name__ == "__main__":
         run((TestDevice,))
    
  • Run a server with two different devices (and two different TestProperty values)

  • Read testAttribute for both devices.

  • Notice that one of the devices is using the property of the other

PS: Good job on that high level API anyway! Feels good to reduce Tango DS code by half, it looks more like actual Python now ;)

Discussion

  • Tiago Coutinho

    Tiago Coutinho - 2014-09-30
    • status: open --> closed-fixed
    • assigned_to: Tiago Coutinho
     
  • Tiago Coutinho

    Tiago Coutinho - 2014-09-30

    Bug confirmed.
    Thanks for reporting.

    Fix in PyTango SVN trunk since revision #26602
    Will become visible in next PyTango 8.1.4

     

Log in to post a comment.

MongoDB Logo MongoDB