From ffc6ec396fffa8e6fd08f60182ffd08889c03c89 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Sun, 14 Apr 2013 16:24:37 -0400 Subject: [PATCH] more doc --- documentation/conf.py | 28 ++++++++++++++-------------- documentation/devsup.rst | 12 ++++++++++++ documentation/index.rst | 4 ++-- python/devsup/_nullapi.py | 7 +++++-- python/devsup/db.py | 2 +- 5 files changed, 34 insertions(+), 19 deletions(-) diff --git a/documentation/conf.py b/documentation/conf.py index 1de20ba..32e1f4d 100644 --- a/documentation/conf.py +++ b/documentation/conf.py @@ -40,17 +40,17 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'devsup' -copyright = u'2013, Author' +project = u'pyDevSup' +copyright = u'2013, Michael Davidsaver' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '' +version = '0.1' # The full version, including alpha/beta/rc tags. -release = '' +release = '0.1-dev' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -183,8 +183,8 @@ latex_elements = { # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'devsup.tex', u'devsup Documentation', - u'Author', 'manual'), + ('index', 'devsup.tex', u'pyDevSup Documentation', + u'Michael Davidsaver', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -213,8 +213,8 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'devsup', u'devsup Documentation', - [u'Author'], 1) + ('index', 'devsup', u'pyDevSup Documentation', + [u'Michael Davidsaver'], 1) ] # If true, show URL addresses after external links. @@ -227,8 +227,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'devsup', u'devsup Documentation', - u'Author', 'devsup', 'One line description of project.', + ('index', 'devsup', u'pyDevSup Documentation', + u'Michael Davidsaver', 'devsup', 'One line description of project.', 'Miscellaneous'), ] @@ -245,10 +245,10 @@ texinfo_documents = [ # -- Options for Epub output --------------------------------------------------- # Bibliographic Dublin Core info. -epub_title = u'devsup' -epub_author = u'Author' -epub_publisher = u'Author' -epub_copyright = u'2013, Author' +epub_title = u'pyDevSup' +epub_author = u'Michael Davidsaver' +epub_publisher = u'Michael Davidsaver' +epub_copyright = u'2013, Michael Davidsaver' # The language of the text. It defaults to the language option # or en if the language is not set. diff --git a/documentation/devsup.rst b/documentation/devsup.rst index f4dcff2..a96410d 100644 --- a/documentation/devsup.rst +++ b/documentation/devsup.rst @@ -1,8 +1,18 @@ devsup Package ============== +.. module:: devsup + .. autofunction:: devsup.verinfo +.. data:: NO_ALARM, MINOR_ALARM, MAJOR_ALARM, INVALID_ALARM + + Constants for alarm severity. Use with :meth:`Record.setSevr <.db.Record.setSevr>` + +.. data:: NO_ALARM, READ_ALARM, WRITE_ALARM, ... + + Constants for alarm status. Use with :meth:`Record.setSevr <.db.Record.setSevr>` + :mod:`db` Module ---------------- @@ -40,6 +50,8 @@ devsup Package .. automethod:: field + .. automethod:: setSevr + .. automethod:: setTime .. automethod:: scan diff --git a/documentation/index.rst b/documentation/index.rst index 631cfdb..52a6001 100644 --- a/documentation/index.rst +++ b/documentation/index.rst @@ -3,8 +3,8 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to devsup's documentation! -================================== +pydevsup documentation +====================== Contents: diff --git a/python/devsup/_nullapi.py b/python/devsup/_nullapi.py index 96bd0c9..3be978f 100644 --- a/python/devsup/_nullapi.py +++ b/python/devsup/_nullapi.py @@ -49,9 +49,12 @@ class _Record(object): """ def setSevr(self, sevr=3, stat=15): - """setSevr(sevr=INVALID, stat=COMM) + """setSevr(sevr=INVALID_ALARM, stat=COMM_ALARM) - Set new alarm condition. + Signal a new alarm condition. The effect of this + call depends on the current alarm condition. + + See :c:func:`recGblSetSevr` in EPICS Base. """ def scan(self, sync=False, reason=None, force=0): diff --git a/python/devsup/db.py b/python/devsup/db.py index c7a3cf3..230fec2 100644 --- a/python/devsup/db.py +++ b/python/devsup/db.py @@ -241,7 +241,7 @@ class Record(_dbapi._Record): def setTime(self, ts): """Set record timestamp. - :param ts: timetuple, float, or (sec, nsec). + :param ts: datetime, float, or (sec, nsec). Has not effect if the TSE field is not set to -2. All inputs must be referenced to the posix epoch.