This file is indexed.

/usr/lib/python2.7/dist-packages/rosgraph_msgs/msg/_TopicStatistics.py is in python-rosgraph-msgs 1.11.2-6.

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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from rosgraph_msgs/TopicStatistics.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct

import genpy

class TopicStatistics(genpy.Message):
  _md5sum = "10152ed868c5097a5e2e4a89d7daa710"
  _type = "rosgraph_msgs/TopicStatistics"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """# name of the topic
string topic

# node id of the publisher
string node_pub

# node id of the subscriber
string node_sub

# the statistics apply to this time window
time window_start
time window_stop

# number of messages delivered during the window
int32 delivered_msgs
# numbers of messages dropped during the window
int32 dropped_msgs

# traffic during the window, in bytes
int32 traffic

# mean/stddev/max period between two messages
duration period_mean
duration period_stddev
duration period_max

# mean/stddev/max age of the message based on the
# timestamp in the message header. In case the
# message does not have a header, it will be 0.
duration stamp_age_mean
duration stamp_age_stddev
duration stamp_age_max
"""
  __slots__ = ['topic','node_pub','node_sub','window_start','window_stop','delivered_msgs','dropped_msgs','traffic','period_mean','period_stddev','period_max','stamp_age_mean','stamp_age_stddev','stamp_age_max']
  _slot_types = ['string','string','string','time','time','int32','int32','int32','duration','duration','duration','duration','duration','duration']

  def __init__(self, *args, **kwds):
    """
    Constructor. Any message fields that are implicitly/explicitly
    set to None will be assigned a default value. The recommend
    use is keyword arguments as this is more robust to future message
    changes.  You cannot mix in-order arguments and keyword arguments.

    The available fields are:
       topic,node_pub,node_sub,window_start,window_stop,delivered_msgs,dropped_msgs,traffic,period_mean,period_stddev,period_max,stamp_age_mean,stamp_age_stddev,stamp_age_max

    :param args: complete set of field values, in .msg order
    :param kwds: use keyword arguments corresponding to message field names
    to set specific fields.
    """
    if args or kwds:
      super(TopicStatistics, self).__init__(*args, **kwds)
      #message fields cannot be None, assign default values for those that are
      if self.topic is None:
        self.topic = ''
      if self.node_pub is None:
        self.node_pub = ''
      if self.node_sub is None:
        self.node_sub = ''
      if self.window_start is None:
        self.window_start = genpy.Time()
      if self.window_stop is None:
        self.window_stop = genpy.Time()
      if self.delivered_msgs is None:
        self.delivered_msgs = 0
      if self.dropped_msgs is None:
        self.dropped_msgs = 0
      if self.traffic is None:
        self.traffic = 0
      if self.period_mean is None:
        self.period_mean = genpy.Duration()
      if self.period_stddev is None:
        self.period_stddev = genpy.Duration()
      if self.period_max is None:
        self.period_max = genpy.Duration()
      if self.stamp_age_mean is None:
        self.stamp_age_mean = genpy.Duration()
      if self.stamp_age_stddev is None:
        self.stamp_age_stddev = genpy.Duration()
      if self.stamp_age_max is None:
        self.stamp_age_max = genpy.Duration()
    else:
      self.topic = ''
      self.node_pub = ''
      self.node_sub = ''
      self.window_start = genpy.Time()
      self.window_stop = genpy.Time()
      self.delivered_msgs = 0
      self.dropped_msgs = 0
      self.traffic = 0
      self.period_mean = genpy.Duration()
      self.period_stddev = genpy.Duration()
      self.period_max = genpy.Duration()
      self.stamp_age_mean = genpy.Duration()
      self.stamp_age_stddev = genpy.Duration()
      self.stamp_age_max = genpy.Duration()

  def _get_types(self):
    """
    internal API method
    """
    return self._slot_types

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self.topic
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      _x = self.node_pub
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      _x = self.node_sub
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      _x = self
      buff.write(_get_struct_4I15i().pack(_x.window_start.secs, _x.window_start.nsecs, _x.window_stop.secs, _x.window_stop.nsecs, _x.delivered_msgs, _x.dropped_msgs, _x.traffic, _x.period_mean.secs, _x.period_mean.nsecs, _x.period_stddev.secs, _x.period_stddev.nsecs, _x.period_max.secs, _x.period_max.nsecs, _x.stamp_age_mean.secs, _x.stamp_age_mean.nsecs, _x.stamp_age_stddev.secs, _x.stamp_age_stddev.nsecs, _x.stamp_age_max.secs, _x.stamp_age_max.nsecs))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    try:
      if self.window_start is None:
        self.window_start = genpy.Time()
      if self.window_stop is None:
        self.window_stop = genpy.Time()
      if self.period_mean is None:
        self.period_mean = genpy.Duration()
      if self.period_stddev is None:
        self.period_stddev = genpy.Duration()
      if self.period_max is None:
        self.period_max = genpy.Duration()
      if self.stamp_age_mean is None:
        self.stamp_age_mean = genpy.Duration()
      if self.stamp_age_stddev is None:
        self.stamp_age_stddev = genpy.Duration()
      if self.stamp_age_max is None:
        self.stamp_age_max = genpy.Duration()
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.topic = str[start:end].decode('utf-8')
      else:
        self.topic = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.node_pub = str[start:end].decode('utf-8')
      else:
        self.node_pub = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.node_sub = str[start:end].decode('utf-8')
      else:
        self.node_sub = str[start:end]
      _x = self
      start = end
      end += 76
      (_x.window_start.secs, _x.window_start.nsecs, _x.window_stop.secs, _x.window_stop.nsecs, _x.delivered_msgs, _x.dropped_msgs, _x.traffic, _x.period_mean.secs, _x.period_mean.nsecs, _x.period_stddev.secs, _x.period_stddev.nsecs, _x.period_max.secs, _x.period_max.nsecs, _x.stamp_age_mean.secs, _x.stamp_age_mean.nsecs, _x.stamp_age_stddev.secs, _x.stamp_age_stddev.nsecs, _x.stamp_age_max.secs, _x.stamp_age_max.nsecs,) = _get_struct_4I15i().unpack(str[start:end])
      self.window_start.canon()
      self.window_stop.canon()
      self.period_mean.canon()
      self.period_stddev.canon()
      self.period_max.canon()
      self.stamp_age_mean.canon()
      self.stamp_age_stddev.canon()
      self.stamp_age_max.canon()
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e) #most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    :param buff: buffer, ``StringIO``
    :param numpy: numpy python module
    """
    try:
      _x = self.topic
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      _x = self.node_pub
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      _x = self.node_sub
      length = len(_x)
      if python3 or type(_x) == unicode:
        _x = _x.encode('utf-8')
        length = len(_x)
      buff.write(struct.pack('<I%ss'%length, length, _x))
      _x = self
      buff.write(_get_struct_4I15i().pack(_x.window_start.secs, _x.window_start.nsecs, _x.window_stop.secs, _x.window_stop.nsecs, _x.delivered_msgs, _x.dropped_msgs, _x.traffic, _x.period_mean.secs, _x.period_mean.nsecs, _x.period_stddev.secs, _x.period_stddev.nsecs, _x.period_max.secs, _x.period_max.nsecs, _x.stamp_age_mean.secs, _x.stamp_age_mean.nsecs, _x.stamp_age_stddev.secs, _x.stamp_age_stddev.nsecs, _x.stamp_age_max.secs, _x.stamp_age_max.nsecs))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize_numpy(self, str, numpy):
    """
    unpack serialized message in str into this message instance using numpy for array types
    :param str: byte array of serialized message, ``str``
    :param numpy: numpy python module
    """
    try:
      if self.window_start is None:
        self.window_start = genpy.Time()
      if self.window_stop is None:
        self.window_stop = genpy.Time()
      if self.period_mean is None:
        self.period_mean = genpy.Duration()
      if self.period_stddev is None:
        self.period_stddev = genpy.Duration()
      if self.period_max is None:
        self.period_max = genpy.Duration()
      if self.stamp_age_mean is None:
        self.stamp_age_mean = genpy.Duration()
      if self.stamp_age_stddev is None:
        self.stamp_age_stddev = genpy.Duration()
      if self.stamp_age_max is None:
        self.stamp_age_max = genpy.Duration()
      end = 0
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.topic = str[start:end].decode('utf-8')
      else:
        self.topic = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.node_pub = str[start:end].decode('utf-8')
      else:
        self.node_pub = str[start:end]
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      start = end
      end += length
      if python3:
        self.node_sub = str[start:end].decode('utf-8')
      else:
        self.node_sub = str[start:end]
      _x = self
      start = end
      end += 76
      (_x.window_start.secs, _x.window_start.nsecs, _x.window_stop.secs, _x.window_stop.nsecs, _x.delivered_msgs, _x.dropped_msgs, _x.traffic, _x.period_mean.secs, _x.period_mean.nsecs, _x.period_stddev.secs, _x.period_stddev.nsecs, _x.period_max.secs, _x.period_max.nsecs, _x.stamp_age_mean.secs, _x.stamp_age_mean.nsecs, _x.stamp_age_stddev.secs, _x.stamp_age_stddev.nsecs, _x.stamp_age_max.secs, _x.stamp_age_max.nsecs,) = _get_struct_4I15i().unpack(str[start:end])
      self.window_start.canon()
      self.window_stop.canon()
      self.period_mean.canon()
      self.period_stddev.canon()
      self.period_max.canon()
      self.stamp_age_mean.canon()
      self.stamp_age_stddev.canon()
      self.stamp_age_max.canon()
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e) #most likely buffer underfill

_struct_I = genpy.struct_I
def _get_struct_I():
    global _struct_I
    return _struct_I
_struct_4I15i = None
def _get_struct_4I15i():
    global _struct_4I15i
    if _struct_4I15i is None:
        _struct_4I15i = struct.Struct("<4I15i")
    return _struct_4I15i