Menu

#118 Taurus differs instantiating a TangoDevice with non-exisitng device name or alias

unassigned
waiting
nobody
None
bug
2015-03-30
2014-11-04
marc
No

Taurus behaves differently when instantiating a TangoDevice with non-exisitng device name or alias.
Creating a taurus.Device with alias it gives an error.
Creating a taurus.Device with a non-existing device name it creates the taurus device and connects to the Tango device when in the future the Tango device is created.

Creating a Taurus Device from device name:
In [2]: taurus.Device('tango://a/b/c')
MainThread WARNING 2014-11-04 10:47:00,364 controls01:10000.a/b/c: Could not create HW object: device a/b/c not defined in the database !
Out[2]: TangoDevice(controls01:10000/a/b/c)

Creating a Taurus Device from alias:
In [3]: taurus.Device('tango://Foo')
-
TaurusException Traceback (most recent call last)

/home/mrosanes/TOT/SEP3/sardana/<ipython console=""> in <module>()

/home/mrosanes/TOT/SEP3/sardana/taurus/lib/taurus/core/taurushelper.py in Device(device_name)
354 :return: a taurus device
355 :rtype: :class:taurus.core.taurusdevice.TaurusDevice"""
--> 356 return Factory(scheme=getSchemeFromName(device_name)).getDevice(device_name)
357
358 def Attribute(dev_or_attr_name, attr_name=None):

/home/mrosanes/TOT/SEP3/sardana/taurus/lib/taurus/core/tango/tangofactory.py in getDevice(self, dev_name, **kw)
346 dev_name = db.get_device_alias(alias)
347 except:
--> 348 raise TaurusException("Device %s is not defined in %s." % (alias,db.getFullName()))
349
350 full_dev_name = db.getFullName() + "/" + dev_name

TaurusException: Device Foo is not defined in controls01:10000.

Discussion

  • Carlos Pascual

    Carlos Pascual - 2015-02-03
    • Milestone: Jan15 --> unassigned
     
  • Tiago Coutinho

    Tiago Coutinho - 2015-03-30

    Ticket moved from /p/sardana/tickets/267/

    Can't be converted:

    • _category: taurus-tango
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.