[pytango] 33/98: Update documentation and release number
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:17:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
sbodomerle-guest pushed a commit to tag v9.2.0
in repository pytango.
commit 267947b45c128c8c36cb3c21a1d46bccfbd42821
Author: Jose Tiago Coutinho Macara <tiago.coutinho at esrf.fr>
Date: Fri Feb 26 13:01:07 2016 +0100
Update documentation and release number
---
src/boost/python/base_types.py | 1 +
src/boost/python/device_proxy.py | 46 +++++++++++++++++++++++++++++++++++++--
src/boost/python/device_server.py | 2 +-
src/boost/python/release.py | 2 +-
src/boost/python/server.py | 33 ++++++++++++++++++----------
5 files changed, 68 insertions(+), 16 deletions(-)
diff --git a/src/boost/python/base_types.py b/src/boost/python/base_types.py
index a026738..e6617fa 100644
--- a/src/boost/python/base_types.py
+++ b/src/boost/python/base_types.py
@@ -358,6 +358,7 @@ def __doc_base_types():
- DevInt
- DevEncoded
- DevEnum
+ - DevPipeBlob
""" )
document_enum("LockerLanguage", """
diff --git a/src/boost/python/device_proxy.py b/src/boost/python/device_proxy.py
index b30a6d2..a10f44a 100644
--- a/src/boost/python/device_proxy.py
+++ b/src/boost/python/device_proxy.py
@@ -818,7 +818,7 @@ def __DeviceProxy__get_pipe_config(self, value=None):
Throws : ConnectionFailed, CommunicationFailed,
DevFailed from device
- New in PyTango 9.0.0
+ New in PyTango 9.2.0
"""
if value is None:
value = [constants.AllPipe]
@@ -1822,10 +1822,52 @@ def __doc_DeviceProxy():
TimeoutError (green_mode == Futures) If the future didn't finish executing before the given timeout.
Timeout (green_mode == Gevent) If the async result didn't finish executing before the given timeout.
- New in PyTango 9.0.0
+ New in PyTango 9.2.0
""")
#-------------------------------------
+# Pipe methods
+#-------------------------------------
+
+ document_method("read_pipe", """
+ read_pipe(self, pipe_name, extract_as=ExtractAs.Numpy, green_mode=None, wait=True, timeout=None) -> tuple
+
+ Read a single pipe. The result is a *blob*: a tuple with two elements: blob name (string) and blob
+ data (sequence). The blob data consists of a sequence where each element is a dictionary with the
+ following keys:
+
+ - name: blob element name
+ - dtype: tango data type
+ - value: blob element data (str for DevString, etc)
+
+ In case dtype is ``DevPipeBlob``, value is again a *blob*.
+
+ Parameters :
+ - pipe_name : (str) The name of the pipe to read.
+ - extract_as : (ExtractAs) Defaults to numpy.
+ - green_mode : (GreenMode) Defaults to the current DeviceProxy GreenMode.
+ (see :meth:`~PyTango.DeviceProxy.get_green_mode` and
+ :meth:`~PyTango.DeviceProxy.set_green_mode`).
+ - wait : (bool) whether or not to wait for result. If green_mode
+ is *Synchronous*, this parameter is ignored as it always
+ waits for the result.
+ Ignored when green_mode is Synchronous (always waits).
+ - timeout : (float) The number of seconds to wait for the result.
+ If None, then there is no limit on the wait time.
+ Ignored when green_mode is Synchronous or wait is False.
+
+ Return : tuple<str, sequence>
+
+ Throws : ConnectionFailed, CommunicationFailed, DevFailed from device
+ TimeoutError (green_mode == Futures) If the future didn't finish executing before the given timeout.
+ Timeout (green_mode == Gevent) If the async result didn't finish executing before the given timeout.
+
+ New in PyTango 9.2.0
+ """)
+
+ document_method("write_pipe", """TODO""")
+
+#-------------------------------------
# History methods
#-------------------------------------
document_method("command_history", """
diff --git a/src/boost/python/device_server.py b/src/boost/python/device_server.py
index aa40a94..b31d844 100644
--- a/src/boost/python/device_server.py
+++ b/src/boost/python/device_server.py
@@ -626,7 +626,7 @@ def __UserDefaultAttrProp_set_enum_labels(self, enum_labels):
Parameters :
- enum_labels : (seq<str>) list of enumeration labels
- New in PyTango 9.1.0
+ New in PyTango 9.2.0
"""
elbls = StdStringVector()
for enu in enum_labels:
diff --git a/src/boost/python/release.py b/src/boost/python/release.py
index aff598d..cd5e3b1 100644
--- a/src/boost/python/release.py
+++ b/src/boost/python/release.py
@@ -40,7 +40,7 @@ class Release:
- keywords : (seq<str>) list of keywords
- license : (str) the license"""
name = 'PyTango'
- version_info = (9, 2, 0, 'dev', 0)
+ version_info = (9, 2, 0, 'a', 1)
version = '.'.join(map(str, version_info[:3]))
version_long = version + ''.join(map(str, version_info[3:]))
version_description = 'This version implements the C++ Tango 9.2 API.'
diff --git a/src/boost/python/server.py b/src/boost/python/server.py
index 00c94f2..5b604b4 100644
--- a/src/boost/python/server.py
+++ b/src/boost/python/server.py
@@ -878,9 +878,14 @@ class attribute(AttrData):
class pipe(PipeData):
'''
Declares a new tango pipe in a :class:`Device`. To be used
- like the python native :obj:`property` function. For example, to
- declare a read-only pipe called *ROI* (for Region Of Interest), in a
- *Detector* :class:`Device` do::
+ like the python native :obj:`property` function.
+
+ Checkout the :ref:`pipe data types <pytango-pipe-data-types>`
+ to see what you should return on a pipe read request and what
+ to expect as argument on a pipe write request.
+
+ For example, to declare a read-only pipe called *ROI*
+ (for Region Of Interest), in a *Detector* :class:`Device` do::
class Detector(Device):
__metaclass__ = DeviceMeta
@@ -888,16 +893,20 @@ class pipe(PipeData):
ROI = pipe()
def read_ROI(self):
- return dict(x=0, y=10, width=100, height=200)
+ return ('ROI', ({'name': 'x', 'value': 0},
+ {'name': 'y', 'value': 10},
+ {'name': 'width', 'value': 100},
+ {'name': 'height', 'value': 200}))
- The same can be achieved with::
+ The same can be achieved with (also showing that a dict can be used
+ to pass blob data)::
class Detector(Device):
__metaclass__ = DeviceMeta
@pipe
def ROI(self):
- return dict(x=0, y=10, width=100, height=200)
+ return 'ROI', dict(x=0, y=10, width=100, height=200)
It receives multiple keyword arguments.
@@ -918,7 +927,7 @@ class pipe(PipeData):
write_green_mode :obj:`~PyTango.GreenMode` None green mode for write. None means use server green mode.
===================== ================================ ======================================= =======================================================================================
- The same example with a read-write ROI, a customized label and description and::
+ The same example with a read-write ROI, a customized label and description::
class Detector(Device):
__metaclass__ = DeviceMeta
@@ -928,13 +937,13 @@ class pipe(PipeData):
def init_device(self):
Device.init_device(self)
- self.__roi = dict(x=0, y=10, width=100, height=200)
+ self.__roi = 'ROI', dict(x=0, y=10, width=100, height=200)
def read_ROI(self):
return self.__roi
def write_ROI(self, roi):
- self.__roi = dict(roi)
+ self.__roi = roi
The same, but using pipe as a decorator::
@@ -944,7 +953,7 @@ class pipe(PipeData):
def init_device(self):
Device.init_device(self)
- self.__roi = dict(x=0, y=10, width=100, height=200)
+ self.__roi = 'ROI', dict(x=0, y=10, width=100, height=200)
@pipe(label="Region Of Interest")
def ROI(self):
@@ -953,12 +962,12 @@ class pipe(PipeData):
@ROI.write
def ROI(self, roi):
- self.__roi = dict(roi)
+ self.__roi = roi
In this second format, defining the `write` / `setter` implicitly sets
the pipe access to READ_WRITE.
- .. versionadded:: 9.1.0
+ .. versionadded:: 9.2.0
'''
def __init__(self, fget=None, **kwargs):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list