`taurus.Device` of non-existing Tango device returns `NotReady` state
From #117 we can see that creation of a taurus.Device
pointing to a non-existing Tango device succeeds. State of such a device returns NotReady
:
In [1]: import taurus
In [2]: d = taurus.Device("foo/bar/baz")
MainThread WARNING 2021-08-04 17:35:10,445 TaurusRootLogger: epics scheme not available: ModuleNotFoundError("No module named 'epics'")
MainThread WARNING 2021-08-04 17:35:10,611 pt222.cells.es:10000.foo/bar/baz: Could not create HW object: device foo/bar/baz not defined in the database !
In [3]: d
Out[3]: TangoDevice(tango://pt222.cells.es:10000/foo/bar/baz)
In [4]: d.state
MainThread WARNING 2021-08-04 17:35:17,950 pt222.cells.es:10000.foo/bar/baz: Could not create HW object: device foo/bar/baz not defined in the database !
MainThread WARNING 2021-08-04 17:35:17,953 pt222.cells.es:10000.foo/bar/baz: Could not create HW object: device foo/bar/baz not defined in the database !
Out[4]: <TaurusDevState.NotReady: 2>
When a device is defined but its device server is not running then we get Undefined
state:
In [5]: d = taurus.Device("motor/motctrl01/1")
In [6]: d.state
Out[6]: <TaurusDevState.Undefined: 4>
The docstring of these values says:
class TaurusDevState(IntEnum):
"""Enumeration of possible states of :class:`taurus.core.TaurusDevice`
objects. This is returned, e.g. by :meth:`TaurusDevice.state`.
The description of the values of this enumeration is:
- Ready: the device can be operated by the user and could even be
involved in some operation.
- NotReady: the device can not be operated by the user (e.g. due to
still being initialized, or due to a device failure,...)
- Undefined: it is not possible to retrieve a coherent state from the
device (e.g. due to communication, or to contradictory internal
states, ...)
"""
Shouldn't it behave the other way around?
-
NotReady
- DS nor running -
Undefined
- non-existing device?