|
From: Zbigniew R. <zre...@ce...> - 2015-08-05 11:44:17
|
From: zreszela <zre...@ce...>
---
lib/taurus/core/taurusattribute.py | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/lib/taurus/core/taurusattribute.py b/lib/taurus/core/taurusattribute.py
index 1f66be5..cee5f03 100644
--- a/lib/taurus/core/taurusattribute.py
+++ b/lib/taurus/core/taurusattribute.py
@@ -250,6 +250,12 @@ class TaurusAttribute(TaurusModel):
#-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
def enablePolling(self, force=False):
+ '''Enable polling. See :meth:`isPollingEnabled` for clarification of
+ what enabled polling means.
+
+ :param force: True also activates polling (see: :meth:`activatePolling`)
+ :type force: bool
+ '''
self.__enable_polling = True
self.__forced_polling = force
if force:
@@ -259,12 +265,25 @@ class TaurusAttribute(TaurusModel):
self._activatePolling()
def disablePolling(self):
+ '''Disable polling and if polling is active also deactivate it.
+ See :meth:`isPollingEnabled` for clarification of
+ what enabled polling means.
+ '''
self.__enable_polling = False
self.__forced_polling = False
if self.__activate_polling:
self._deactivatePolling()
def isPollingEnabled(self):
+ '''Indicate whether polling was activated/deactivated by user.
+ Enabled polling does not mean that it is active - periodically poll
+ the attribute. By default the attribute creation enables polling.
+
+ :return: whether polling is enabled
+ :type: bool
+
+ :see: :meth:`enablePolling`, :meth:`disablePolling`
+ '''
return self.__enable_polling
def _activatePolling(self):
@@ -280,6 +299,14 @@ class TaurusAttribute(TaurusModel):
self.__polled = False
def isPollingActive(self):
+ '''Indicate whether polling is active. Active polling means that
+ a periodic timer poll the attribute. By default the attribute creation
+ does not activate polling.
+
+ :return: whether polling is active
+ :type: bool
+ :see: :meth:`activatePolling`, :meth:`disablePolling`
+ '''
return self.__polled
def isPollingForced(self):
--
1.8.4.5
|