1 """autogenerated by genpy from network_monitor_udp/LinktestActionFeedback.msg. Do not edit."""
2 import sys
3 python3 = True if sys.hexversion > 0x03000000 else False
4 import genpy
5 import struct
6
7 import network_monitor_udp.msg
8 import genpy
9 import actionlib_msgs.msg
10 import std_msgs.msg
11
13 _md5sum = "967522a816e5535acca726638b979f92"
14 _type = "network_monitor_udp/LinktestActionFeedback"
15 _has_header = True
16 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
17
18 Header header
19 actionlib_msgs/GoalStatus status
20 LinktestFeedback feedback
21
22 ================================================================================
23 MSG: std_msgs/Header
24 # Standard metadata for higher-level stamped data types.
25 # This is generally used to communicate timestamped data
26 # in a particular coordinate frame.
27 #
28 # sequence ID: consecutively increasing ID
29 uint32 seq
30 #Two-integer timestamp that is expressed as:
31 # * stamp.secs: seconds (stamp_secs) since epoch
32 # * stamp.nsecs: nanoseconds since stamp_secs
33 # time-handling sugar is provided by the client library
34 time stamp
35 #Frame this data is associated with
36 # 0: no frame
37 # 1: global frame
38 string frame_id
39
40 ================================================================================
41 MSG: actionlib_msgs/GoalStatus
42 GoalID goal_id
43 uint8 status
44 uint8 PENDING = 0 # The goal has yet to be processed by the action server
45 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
46 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
47 # and has since completed its execution (Terminal State)
48 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
49 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
50 # to some failure (Terminal State)
51 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
52 # because the goal was unattainable or invalid (Terminal State)
53 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
54 # and has not yet completed execution
55 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
56 # but the action server has not yet confirmed that the goal is canceled
57 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
58 # and was successfully cancelled (Terminal State)
59 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
60 # sent over the wire by an action server
61
62 #Allow for the user to associate a string with GoalStatus for debugging
63 string text
64
65
66 ================================================================================
67 MSG: actionlib_msgs/GoalID
68 # The stamp should store the time at which this goal was requested.
69 # It is used by an action server when it tries to preempt all
70 # goals that were requested before a certain time
71 time stamp
72
73 # The id provides a way to associate feedback and
74 # result message with specific goal requests. The id
75 # specified must be unique.
76 string id
77
78
79 ================================================================================
80 MSG: network_monitor_udp/LinktestFeedback
81 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
82 # Feedback definition
83 float32 latency
84 float32 loss
85 float32 bandwidth
86 float32[] latency_histogram
87 time stamp
88
89
90 """
91 __slots__ = ['header','status','feedback']
92 _slot_types = ['std_msgs/Header','actionlib_msgs/GoalStatus','network_monitor_udp/LinktestFeedback']
93
95 """
96 Constructor. Any message fields that are implicitly/explicitly
97 set to None will be assigned a default value. The recommend
98 use is keyword arguments as this is more robust to future message
99 changes. You cannot mix in-order arguments and keyword arguments.
100
101 The available fields are:
102 header,status,feedback
103
104 :param args: complete set of field values, in .msg order
105 :param kwds: use keyword arguments corresponding to message field names
106 to set specific fields.
107 """
108 if args or kwds:
109 super(LinktestActionFeedback, self).__init__(*args, **kwds)
110
111 if self.header is None:
112 self.header = std_msgs.msg.Header()
113 if self.status is None:
114 self.status = actionlib_msgs.msg.GoalStatus()
115 if self.feedback is None:
116 self.feedback = network_monitor_udp.msg.LinktestFeedback()
117 else:
118 self.header = std_msgs.msg.Header()
119 self.status = actionlib_msgs.msg.GoalStatus()
120 self.feedback = network_monitor_udp.msg.LinktestFeedback()
121
123 """
124 internal API method
125 """
126 return self._slot_types
127
129 """
130 serialize message into buffer
131 :param buff: buffer, ``StringIO``
132 """
133 try:
134 _x = self
135 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
136 _x = self.header.frame_id
137 length = len(_x)
138 if python3 or type(_x) == unicode:
139 _x = _x.encode('utf-8')
140 length = len(_x)
141 buff.write(struct.pack('<I%ss'%length, length, _x))
142 _x = self
143 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
144 _x = self.status.goal_id.id
145 length = len(_x)
146 if python3 or type(_x) == unicode:
147 _x = _x.encode('utf-8')
148 length = len(_x)
149 buff.write(struct.pack('<I%ss'%length, length, _x))
150 buff.write(_struct_B.pack(self.status.status))
151 _x = self.status.text
152 length = len(_x)
153 if python3 or type(_x) == unicode:
154 _x = _x.encode('utf-8')
155 length = len(_x)
156 buff.write(struct.pack('<I%ss'%length, length, _x))
157 _x = self
158 buff.write(_struct_3f.pack(_x.feedback.latency, _x.feedback.loss, _x.feedback.bandwidth))
159 length = len(self.feedback.latency_histogram)
160 buff.write(_struct_I.pack(length))
161 pattern = '<%sf'%length
162 buff.write(struct.pack(pattern, *self.feedback.latency_histogram))
163 _x = self
164 buff.write(_struct_2I.pack(_x.feedback.stamp.secs, _x.feedback.stamp.nsecs))
165 except struct.error as se: self._check_types(se)
166 except TypeError as te: self._check_types(te)
167
169 """
170 unpack serialized message in str into this message instance
171 :param str: byte array of serialized message, ``str``
172 """
173 try:
174 if self.header is None:
175 self.header = std_msgs.msg.Header()
176 if self.status is None:
177 self.status = actionlib_msgs.msg.GoalStatus()
178 if self.feedback is None:
179 self.feedback = network_monitor_udp.msg.LinktestFeedback()
180 end = 0
181 _x = self
182 start = end
183 end += 12
184 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
185 start = end
186 end += 4
187 (length,) = _struct_I.unpack(str[start:end])
188 start = end
189 end += length
190 if python3:
191 self.header.frame_id = str[start:end].decode('utf-8')
192 else:
193 self.header.frame_id = str[start:end]
194 _x = self
195 start = end
196 end += 8
197 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
198 start = end
199 end += 4
200 (length,) = _struct_I.unpack(str[start:end])
201 start = end
202 end += length
203 if python3:
204 self.status.goal_id.id = str[start:end].decode('utf-8')
205 else:
206 self.status.goal_id.id = str[start:end]
207 start = end
208 end += 1
209 (self.status.status,) = _struct_B.unpack(str[start:end])
210 start = end
211 end += 4
212 (length,) = _struct_I.unpack(str[start:end])
213 start = end
214 end += length
215 if python3:
216 self.status.text = str[start:end].decode('utf-8')
217 else:
218 self.status.text = str[start:end]
219 _x = self
220 start = end
221 end += 12
222 (_x.feedback.latency, _x.feedback.loss, _x.feedback.bandwidth,) = _struct_3f.unpack(str[start:end])
223 start = end
224 end += 4
225 (length,) = _struct_I.unpack(str[start:end])
226 pattern = '<%sf'%length
227 start = end
228 end += struct.calcsize(pattern)
229 self.feedback.latency_histogram = struct.unpack(pattern, str[start:end])
230 _x = self
231 start = end
232 end += 8
233 (_x.feedback.stamp.secs, _x.feedback.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
234 return self
235 except struct.error as e:
236 raise genpy.DeserializationError(e)
237
238
240 """
241 serialize message with numpy array types into buffer
242 :param buff: buffer, ``StringIO``
243 :param numpy: numpy python module
244 """
245 try:
246 _x = self
247 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
248 _x = self.header.frame_id
249 length = len(_x)
250 if python3 or type(_x) == unicode:
251 _x = _x.encode('utf-8')
252 length = len(_x)
253 buff.write(struct.pack('<I%ss'%length, length, _x))
254 _x = self
255 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
256 _x = self.status.goal_id.id
257 length = len(_x)
258 if python3 or type(_x) == unicode:
259 _x = _x.encode('utf-8')
260 length = len(_x)
261 buff.write(struct.pack('<I%ss'%length, length, _x))
262 buff.write(_struct_B.pack(self.status.status))
263 _x = self.status.text
264 length = len(_x)
265 if python3 or type(_x) == unicode:
266 _x = _x.encode('utf-8')
267 length = len(_x)
268 buff.write(struct.pack('<I%ss'%length, length, _x))
269 _x = self
270 buff.write(_struct_3f.pack(_x.feedback.latency, _x.feedback.loss, _x.feedback.bandwidth))
271 length = len(self.feedback.latency_histogram)
272 buff.write(_struct_I.pack(length))
273 pattern = '<%sf'%length
274 buff.write(self.feedback.latency_histogram.tostring())
275 _x = self
276 buff.write(_struct_2I.pack(_x.feedback.stamp.secs, _x.feedback.stamp.nsecs))
277 except struct.error as se: self._check_types(se)
278 except TypeError as te: self._check_types(te)
279
281 """
282 unpack serialized message in str into this message instance using numpy for array types
283 :param str: byte array of serialized message, ``str``
284 :param numpy: numpy python module
285 """
286 try:
287 if self.header is None:
288 self.header = std_msgs.msg.Header()
289 if self.status is None:
290 self.status = actionlib_msgs.msg.GoalStatus()
291 if self.feedback is None:
292 self.feedback = network_monitor_udp.msg.LinktestFeedback()
293 end = 0
294 _x = self
295 start = end
296 end += 12
297 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
298 start = end
299 end += 4
300 (length,) = _struct_I.unpack(str[start:end])
301 start = end
302 end += length
303 if python3:
304 self.header.frame_id = str[start:end].decode('utf-8')
305 else:
306 self.header.frame_id = str[start:end]
307 _x = self
308 start = end
309 end += 8
310 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
311 start = end
312 end += 4
313 (length,) = _struct_I.unpack(str[start:end])
314 start = end
315 end += length
316 if python3:
317 self.status.goal_id.id = str[start:end].decode('utf-8')
318 else:
319 self.status.goal_id.id = str[start:end]
320 start = end
321 end += 1
322 (self.status.status,) = _struct_B.unpack(str[start:end])
323 start = end
324 end += 4
325 (length,) = _struct_I.unpack(str[start:end])
326 start = end
327 end += length
328 if python3:
329 self.status.text = str[start:end].decode('utf-8')
330 else:
331 self.status.text = str[start:end]
332 _x = self
333 start = end
334 end += 12
335 (_x.feedback.latency, _x.feedback.loss, _x.feedback.bandwidth,) = _struct_3f.unpack(str[start:end])
336 start = end
337 end += 4
338 (length,) = _struct_I.unpack(str[start:end])
339 pattern = '<%sf'%length
340 start = end
341 end += struct.calcsize(pattern)
342 self.feedback.latency_histogram = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
343 _x = self
344 start = end
345 end += 8
346 (_x.feedback.stamp.secs, _x.feedback.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
347 return self
348 except struct.error as e:
349 raise genpy.DeserializationError(e)
350
351 _struct_I = genpy.struct_I
352 _struct_3I = struct.Struct("<3I")
353 _struct_B = struct.Struct("<B")
354 _struct_2I = struct.Struct("<2I")
355 _struct_3f = struct.Struct("<3f")
356