|
From: Carlos P. <cpa...@ce...> - 2015-08-18 11:28:46
|
Patch applied to develop. I just changed the :type: sphinx directive by the current standard of taurus of putting the type in parentheses. On Wed 5 August 2015 13:44:07 Zbigniew Reszela wrote: > 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): -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carretera BP 1413 de Cerdanyola-Sant Cugat, Km. 3.3 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |