_StatusUpdate.py
Go to the documentation of this file.
1 """autogenerated by genpy from launchman/StatusUpdateRequest.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 StatusUpdateRequest(genpy.Message):
9  _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
10  _type = "launchman/StatusUpdateRequest"
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(StatusUpdateRequest, 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/StatusUpdateResponse.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 StatusUpdateResponse(genpy.Message):
94  _md5sum = "4fe5af303955c287688e7347e9b00278"
95  _type = "launchman/StatusUpdateResponse"
96  _has_header = False #flag to mark the presence of a Header object
97  _full_text = """string status
98 
99 """
100  __slots__ = ['status']
101  _slot_types = ['string']
102 
103  def __init__(self, *args, **kwds):
104  """
105  Constructor. Any message fields that are implicitly/explicitly
106  set to None will be assigned a default value. The recommend
107  use is keyword arguments as this is more robust to future message
108  changes. You cannot mix in-order arguments and keyword arguments.
109 
110  The available fields are:
111  status
112 
113  :param args: complete set of field values, in .msg order
114  :param kwds: use keyword arguments corresponding to message field names
115  to set specific fields.
116  """
117  if args or kwds:
118  super(StatusUpdateResponse, self).__init__(*args, **kwds)
119  #message fields cannot be None, assign default values for those that are
120  if self.status is None:
121  self.status = ''
122  else:
123  self.status = ''
124 
125  def _get_types(self):
126  """
127  internal API method
128  """
129  return self._slot_types
130 
131  def serialize(self, buff):
132  """
133  serialize message into buffer
134  :param buff: buffer, ``StringIO``
135  """
136  try:
137  _x = self.status
138  length = len(_x)
139  if python3 or type(_x) == unicode:
140  _x = _x.encode('utf-8')
141  length = len(_x)
142  buff.write(struct.pack('<I%ss'%length, length, _x))
143  except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
144  except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
145 
146  def deserialize(self, str):
147  """
148  unpack serialized message in str into this message instance
149  :param str: byte array of serialized message, ``str``
150  """
151  try:
152  end = 0
153  start = end
154  end += 4
155  (length,) = _struct_I.unpack(str[start:end])
156  start = end
157  end += length
158  if python3:
159  self.status = str[start:end].decode('utf-8')
160  else:
161  self.status = str[start:end]
162  return self
163  except struct.error as e:
164  raise genpy.DeserializationError(e) #most likely buffer underfill
165 
166 
167  def serialize_numpy(self, buff, numpy):
168  """
169  serialize message with numpy array types into buffer
170  :param buff: buffer, ``StringIO``
171  :param numpy: numpy python module
172  """
173  try:
174  _x = self.status
175  length = len(_x)
176  if python3 or type(_x) == unicode:
177  _x = _x.encode('utf-8')
178  length = len(_x)
179  buff.write(struct.pack('<I%ss'%length, length, _x))
180  except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
181  except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
182 
183  def deserialize_numpy(self, str, numpy):
184  """
185  unpack serialized message in str into this message instance using numpy for array types
186  :param str: byte array of serialized message, ``str``
187  :param numpy: numpy python module
188  """
189  try:
190  end = 0
191  start = end
192  end += 4
193  (length,) = _struct_I.unpack(str[start:end])
194  start = end
195  end += length
196  if python3:
197  self.status = str[start:end].decode('utf-8')
198  else:
199  self.status = str[start:end]
200  return self
201  except struct.error as e:
202  raise genpy.DeserializationError(e) #most likely buffer underfill
203 
204 _struct_I = genpy.struct_I
205 class StatusUpdate(object):
206  _type = 'launchman/StatusUpdate'
207  _md5sum = '4fe5af303955c287688e7347e9b00278'
208  _request_class = StatusUpdateRequest
209  _response_class = StatusUpdateResponse


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