/usr/lib/python2.7/dist-packages/PyTango/api_util.py is in python-pytango 8.1.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | # ------------------------------------------------------------------------------
# This file is part of PyTango (http://www.tinyurl.com/PyTango)
#
# Copyright 2006-2012 CELLS / ALBA Synchrotron, Bellaterra, Spain
# Copyright 2013-2014 European Synchrotron Radiation Facility, Grenoble, France
#
# Distributed under the terms of the GNU Lesser General Public License,
# either version 3 of the License, or (at your option) any later version.
# See LICENSE.txt for more info.
# ------------------------------------------------------------------------------
"""
This is an internal PyTango module.
"""
__all__ = ["api_util_init"]
__docformat__ = "restructuredtext"
from ._PyTango import ApiUtil
from .utils import document_method, document_static_method, _get_env_var
def __init_api_util():
if not hasattr(ApiUtil, "get_env_var"):
ApiUtil.get_env_var = staticmethod(_get_env_var)
def __doc_api_util():
ApiUtil.__doc__ = """
This class allows you to access the tango syncronization model API.
It is designed as a singleton. To get a reference to the singleton object
you must do::
import PyTango
apiutil = PyTango.ApiUtil.instance()
New in PyTango 7.1.3
"""
document_static_method(ApiUtil, "instance", """
instance() -> ApiUtil
Returns the ApiUtil singleton instance.
Parameters : None
Return : (ApiUtil) a reference to the ApiUtil singleton object.
New in PyTango 7.1.3
""" )
document_method(ApiUtil, "pending_asynch_call", """
pending_asynch_call(self, req) -> int
Return number of asynchronous pending requests (any device).
The input parameter is an enumeration with three values which are:
- POLLING: Return only polling model asynchronous request number
- CALL_BACK: Return only callback model asynchronous request number
- ALL_ASYNCH: Return all asynchronous request number
Parameters :
- req : (asyn_req_type) asynchronous request type
Return : (int) the number of pending requests for the given type
New in PyTango 7.1.3
""" )
document_method(ApiUtil, "get_asynch_replies", """
get_asynch_replies(self) -> None
Fire callback methods for all (any device) asynchronous requests
(command and attribute) with already arrived replied. Returns
immediately if there is no replies already arrived or if there is
no asynchronous requests.
Parameters : None
Return : None
Throws : None, all errors are reported using the err and errors fields
of the parameter passed to the callback method.
New in PyTango 7.1.3
get_asynch_replies(self) -> None
Fire callback methods for all (any device) asynchronous requests
(command and attributes) with already arrived replied. Wait and
block the caller for timeout milliseconds if they are some
device asynchronous requests which are not yet arrived.
Returns immediately if there is no asynchronous request.
If timeout is set to 0, the call waits until all the asynchronous
requests sent has received a reply.
Parameters :
- timeout : (int) timeout (milliseconds)
Return : None
Throws : AsynReplyNotArrived. All other errors are reported using
the err and errors fields of the object passed to the
callback methods.
New in PyTango 7.1.3
""" )
document_method(ApiUtil, "set_asynch_cb_sub_model", """
set_asynch_cb_sub_model(self, model) -> None
Set the asynchronous callback sub-model between the pull and push sub-model.
The cb_sub_model data type is an enumeration with two values which are:
- PUSH_CALLBACK: The push sub-model
- PULL_CALLBACK: The pull sub-model
Parameters :
- model : (cb_sub_model) the callback sub-model
Return : None
New in PyTango 7.1.3
""" )
document_method(ApiUtil, "get_asynch_cb_sub_model", """
get_asynch_cb_sub_model(self) -> cb_sub_model
Get the asynchronous callback sub-model.
Parameters : None
Return : (cb_sub_model) the active asynchronous callback sub-model.
New in PyTango 7.1.3
""" )
def api_util_init(doc=True):
__init_api_util()
if doc:
__doc_api_util()
|