_ListTasks.py
Go to the documentation of this file.
1 """autogenerated by genpy from launchman/ListTasksRequest.msg. Do not edit."""
2 import sys
3 python3 = True if sys.hexversion > 0x03000000 else False
4 import genpy
5 import struct
6 
7 
8 class ListTasksRequest(genpy.Message):
9  _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
10  _type = "launchman/ListTasksRequest"
11  _has_header = False #flag to mark the presence of a Header object
12  _full_text = """
13 """
14  __slots__ = []
15  _slot_types = []
16 
17  def __init__(self, *args, **kwds):
18  """
19  Constructor. Any message fields that are implicitly/explicitly
20  set to None will be assigned a default value. The recommend
21  use is keyword arguments as this is more robust to future message
22  changes. You cannot mix in-order arguments and keyword arguments.
23 
24  The available fields are:
25 
26 
27  :param args: complete set of field values, in .msg order
28  :param kwds: use keyword arguments corresponding to message field names
29  to set specific fields.
30  """
31  if args or kwds:
32  super(ListTasksRequest, self).__init__(*args, **kwds)
33 
34  def _get_types(self):
35  """
36  internal API method
37  """
38  return self._slot_types
39 
40  def serialize(self, buff):
41  """
42  serialize message into buffer
43  :param buff: buffer, ``StringIO``
44  """
45  try:
46  pass
47  except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
48  except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
49 
50  def deserialize(self, str):
51  """
52  unpack serialized message in str into this message instance
53  :param str: byte array of serialized message, ``str``
54  """
55  try:
56  end = 0
57  return self
58  except struct.error as e:
59  raise genpy.DeserializationError(e) #most likely buffer underfill
60 
61 
62  def serialize_numpy(self, buff, numpy):
63  """
64  serialize message with numpy array types into buffer
65  :param buff: buffer, ``StringIO``
66  :param numpy: numpy python module
67  """
68  try:
69  pass
70  except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
71  except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
72 
73  def deserialize_numpy(self, str, numpy):
74  """
75  unpack serialized message in str into this message instance using numpy for array types
76  :param str: byte array of serialized message, ``str``
77  :param numpy: numpy python module
78  """
79  try:
80  end = 0
81  return self
82  except struct.error as e:
83  raise genpy.DeserializationError(e) #most likely buffer underfill
84 
85 _struct_I = genpy.struct_I
86 """autogenerated by genpy from launchman/ListTasksResponse.msg. Do not edit."""
87 import sys
88 python3 = True if sys.hexversion > 0x03000000 else False
89 import genpy
90 import struct
91 
92 
93 class ListTasksResponse(genpy.Message):
94  _md5sum = "8e23a0a55cd0f3fcb9989be6ceff0145"
95  _type = "launchman/ListTasksResponse"
96  _has_header = False #flag to mark the presence of a Header object
97  _full_text = """string[] tasks
98 
99 
100 """
101  __slots__ = ['tasks']
102  _slot_types = ['string[]']
103 
104  def __init__(self, *args, **kwds):
105  """
106  Constructor. Any message fields that are implicitly/explicitly
107  set to None will be assigned a default value. The recommend
108  use is keyword arguments as this is more robust to future message
109  changes. You cannot mix in-order arguments and keyword arguments.
110 
111  The available fields are:
112  tasks
113 
114  :param args: complete set of field values, in .msg order
115  :param kwds: use keyword arguments corresponding to message field names
116  to set specific fields.
117  """
118  if args or kwds:
119  super(ListTasksResponse, self).__init__(*args, **kwds)
120  #message fields cannot be None, assign default values for those that are
121  if self.tasks is None:
122  self.tasks = []
123  else:
124  self.tasks = []
125 
126  def _get_types(self):
127  """
128  internal API method
129  """
130  return self._slot_types
131 
132  def serialize(self, buff):
133  """
134  serialize message into buffer
135  :param buff: buffer, ``StringIO``
136  """
137  try:
138  length = len(self.tasks)
139  buff.write(_struct_I.pack(length))
140  for val1 in self.tasks:
141  length = len(val1)
142  if python3 or type(val1) == unicode:
143  val1 = val1.encode('utf-8')
144  length = len(val1)
145  buff.write(struct.pack('<I%ss'%length, length, val1))
146  except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
147  except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
148 
149  def deserialize(self, str):
150  """
151  unpack serialized message in str into this message instance
152  :param str: byte array of serialized message, ``str``
153  """
154  try:
155  end = 0
156  start = end
157  end += 4
158  (length,) = _struct_I.unpack(str[start:end])
159  self.tasks = []
160  for i in range(0, length):
161  start = end
162  end += 4
163  (length,) = _struct_I.unpack(str[start:end])
164  start = end
165  end += length
166  if python3:
167  val1 = str[start:end].decode('utf-8')
168  else:
169  val1 = str[start:end]
170  self.tasks.append(val1)
171  return self
172  except struct.error as e:
173  raise genpy.DeserializationError(e) #most likely buffer underfill
174 
175 
176  def serialize_numpy(self, buff, numpy):
177  """
178  serialize message with numpy array types into buffer
179  :param buff: buffer, ``StringIO``
180  :param numpy: numpy python module
181  """
182  try:
183  length = len(self.tasks)
184  buff.write(_struct_I.pack(length))
185  for val1 in self.tasks:
186  length = len(val1)
187  if python3 or type(val1) == unicode:
188  val1 = val1.encode('utf-8')
189  length = len(val1)
190  buff.write(struct.pack('<I%ss'%length, length, val1))
191  except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
192  except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
193 
194  def deserialize_numpy(self, str, numpy):
195  """
196  unpack serialized message in str into this message instance using numpy for array types
197  :param str: byte array of serialized message, ``str``
198  :param numpy: numpy python module
199  """
200  try:
201  end = 0
202  start = end
203  end += 4
204  (length,) = _struct_I.unpack(str[start:end])
205  self.tasks = []
206  for i in range(0, length):
207  start = end
208  end += 4
209  (length,) = _struct_I.unpack(str[start:end])
210  start = end
211  end += length
212  if python3:
213  val1 = str[start:end].decode('utf-8')
214  else:
215  val1 = str[start:end]
216  self.tasks.append(val1)
217  return self
218  except struct.error as e:
219  raise genpy.DeserializationError(e) #most likely buffer underfill
220 
221 _struct_I = genpy.struct_I
222 class ListTasks(object):
223  _type = 'launchman/ListTasks'
224  _md5sum = '8e23a0a55cd0f3fcb9989be6ceff0145'
225  _request_class = ListTasksRequest
226  _response_class = ListTasksResponse
def deserialize_numpy(self, str, numpy)
Definition: _ListTasks.py:73
def serialize_numpy(self, buff, numpy)
Definition: _ListTasks.py:62
def serialize_numpy(self, buff, numpy)
Definition: _ListTasks.py:176


launchman
Author(s): Scott Noob Hassan
autogenerated on Mon Jun 10 2019 15:51:09