This file is indexed.

/usr/share/pyshared/PyTango/device_attribute.py is in python-pytango 7.2.2-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
################################################################################
##
## This file is part of PyTango, a python binding for Tango
## 
## http://www.tango-controls.org/static/PyTango/latest/doc/html/index.html
##
## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
## 
## PyTango is free software: you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
## 
## PyTango is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
## 
## You should have received a copy of the GNU Lesser General Public License
## along with PyTango.  If not, see <http://www.gnu.org/licenses/>.
##
################################################################################

"""
This is an internal PyTango module.
"""

__all__ = []

__docformat__ = "restructuredtext"

import copy

from utils import document_method as __document_method
from _PyTango import DeviceAttribute, ExtractAs

def __DeviceAttribute__get_data(self):
    return self.get_data_raw().extract()

def __DeviceAttribute__init(self, da=None):
    if da is None:
        DeviceAttribute.__init_orig(self)
    else:
        DeviceAttribute.__init_orig(self, da)
        try: self.value = copy.deepcopy(da.value)
        except: pass
        try: self.w_value = copy.deepcopy(da.w_value)
        except: pass
        try: self.scalar_w_value = da.scalar_w_value
        except: pass
        self.type = da.type
        self.is_empty = da.is_empty
        self.has_failed = da.has_failed

def __doc_DeviceAttribute():
    def document_method(method_name, desc, append=True):
        return __document_method(DeviceAttribute, method_name, desc, append)

    DeviceAttribute.__doc__ = """
        This is the fundamental type for RECEIVING data from device attributes.

        It contains several fields. The most important ones depend on the
        ExtractAs method used to get the value. Normally they are:
        
            - value   : Normal scalar value or numpy array of values.
            - w_value : The write part of the attribute.
            
        See other ExtractAs for different possibilities. There are some more
        fields, these really fixed:
        
            - name        : (str)
            - data_format : (AttrDataFormat) Attribute format
            - quality     : (AttrQuality)
            - time        : (TimeVal)
            - dim_x       : (int) attribute dimension x
            - dim_y       : (int) attribute dimension y
            - w_dim_x     : (int) attribute written dimension x
            - w_dim_y     : (int) attribute written dimension y
            - r_rimension : (tuple<int,int>) Attribute read dimensions.
            - w_dimension : (tuple<int,int>) Attribute written dimensions.
            - nb_read     : (int) attribute read total length
            - nb_written  : (int) attribute written total length
            

        And two methods:
            - get_date
            - get_err_stack
    """

    document_method("get_date", """
    get_date(self) -> TimeVal

            Get the time at which the attribute was read by the server.
            
            Note: It's the same as reading the "time" attribute.
        
        Parameters : None
        Return     : (TimeVal) The attribute read timestamp.
    """ )

    document_method("get_err_stack", """
    get_err_stack(self) -> sequence<DevError>

            Returns the error stack reported by the server when the
            attribute was read.

        Parameters : None
        Return     : (sequence<DevError>)
    """ )

def __init_DeviceAttribute():
    DeviceAttribute.__init_orig = DeviceAttribute.__init__
    DeviceAttribute.__init__ = __DeviceAttribute__init
    DeviceAttribute.ExtractAs = ExtractAs

def init(doc=True):
    __init_DeviceAttribute()
    if doc:
        __doc_DeviceAttribute()