00001 """autogenerated by genpy from concert_msgs/InviteRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class InviteRequest(genpy.Message):
00009 _md5sum = "082cfd7cce8a75992c90b91803aba9c4"
00010 _type = "concert_msgs/InviteRequest"
00011 _has_header = False
00012 _full_text = """string mastername
00013 string[] clientnames
00014 bool ok_flag
00015
00016 """
00017 __slots__ = ['mastername','clientnames','ok_flag']
00018 _slot_types = ['string','string[]','bool']
00019
00020 def __init__(self, *args, **kwds):
00021 """
00022 Constructor. Any message fields that are implicitly/explicitly
00023 set to None will be assigned a default value. The recommend
00024 use is keyword arguments as this is more robust to future message
00025 changes. You cannot mix in-order arguments and keyword arguments.
00026
00027 The available fields are:
00028 mastername,clientnames,ok_flag
00029
00030 :param args: complete set of field values, in .msg order
00031 :param kwds: use keyword arguments corresponding to message field names
00032 to set specific fields.
00033 """
00034 if args or kwds:
00035 super(InviteRequest, self).__init__(*args, **kwds)
00036
00037 if self.mastername is None:
00038 self.mastername = ''
00039 if self.clientnames is None:
00040 self.clientnames = []
00041 if self.ok_flag is None:
00042 self.ok_flag = False
00043 else:
00044 self.mastername = ''
00045 self.clientnames = []
00046 self.ok_flag = False
00047
00048 def _get_types(self):
00049 """
00050 internal API method
00051 """
00052 return self._slot_types
00053
00054 def serialize(self, buff):
00055 """
00056 serialize message into buffer
00057 :param buff: buffer, ``StringIO``
00058 """
00059 try:
00060 _x = self.mastername
00061 length = len(_x)
00062 if python3 or type(_x) == unicode:
00063 _x = _x.encode('utf-8')
00064 length = len(_x)
00065 buff.write(struct.pack('<I%ss'%length, length, _x))
00066 length = len(self.clientnames)
00067 buff.write(_struct_I.pack(length))
00068 for val1 in self.clientnames:
00069 length = len(val1)
00070 if python3 or type(val1) == unicode:
00071 val1 = val1.encode('utf-8')
00072 length = len(val1)
00073 buff.write(struct.pack('<I%ss'%length, length, val1))
00074 buff.write(_struct_B.pack(self.ok_flag))
00075 except struct.error as se: self._check_types(se)
00076 except TypeError as te: self._check_types(te)
00077
00078 def deserialize(self, str):
00079 """
00080 unpack serialized message in str into this message instance
00081 :param str: byte array of serialized message, ``str``
00082 """
00083 try:
00084 end = 0
00085 start = end
00086 end += 4
00087 (length,) = _struct_I.unpack(str[start:end])
00088 start = end
00089 end += length
00090 if python3:
00091 self.mastername = str[start:end].decode('utf-8')
00092 else:
00093 self.mastername = str[start:end]
00094 start = end
00095 end += 4
00096 (length,) = _struct_I.unpack(str[start:end])
00097 self.clientnames = []
00098 for i in range(0, length):
00099 start = end
00100 end += 4
00101 (length,) = _struct_I.unpack(str[start:end])
00102 start = end
00103 end += length
00104 if python3:
00105 val1 = str[start:end].decode('utf-8')
00106 else:
00107 val1 = str[start:end]
00108 self.clientnames.append(val1)
00109 start = end
00110 end += 1
00111 (self.ok_flag,) = _struct_B.unpack(str[start:end])
00112 self.ok_flag = bool(self.ok_flag)
00113 return self
00114 except struct.error as e:
00115 raise genpy.DeserializationError(e)
00116
00117
00118 def serialize_numpy(self, buff, numpy):
00119 """
00120 serialize message with numpy array types into buffer
00121 :param buff: buffer, ``StringIO``
00122 :param numpy: numpy python module
00123 """
00124 try:
00125 _x = self.mastername
00126 length = len(_x)
00127 if python3 or type(_x) == unicode:
00128 _x = _x.encode('utf-8')
00129 length = len(_x)
00130 buff.write(struct.pack('<I%ss'%length, length, _x))
00131 length = len(self.clientnames)
00132 buff.write(_struct_I.pack(length))
00133 for val1 in self.clientnames:
00134 length = len(val1)
00135 if python3 or type(val1) == unicode:
00136 val1 = val1.encode('utf-8')
00137 length = len(val1)
00138 buff.write(struct.pack('<I%ss'%length, length, val1))
00139 buff.write(_struct_B.pack(self.ok_flag))
00140 except struct.error as se: self._check_types(se)
00141 except TypeError as te: self._check_types(te)
00142
00143 def deserialize_numpy(self, str, numpy):
00144 """
00145 unpack serialized message in str into this message instance using numpy for array types
00146 :param str: byte array of serialized message, ``str``
00147 :param numpy: numpy python module
00148 """
00149 try:
00150 end = 0
00151 start = end
00152 end += 4
00153 (length,) = _struct_I.unpack(str[start:end])
00154 start = end
00155 end += length
00156 if python3:
00157 self.mastername = str[start:end].decode('utf-8')
00158 else:
00159 self.mastername = str[start:end]
00160 start = end
00161 end += 4
00162 (length,) = _struct_I.unpack(str[start:end])
00163 self.clientnames = []
00164 for i in range(0, length):
00165 start = end
00166 end += 4
00167 (length,) = _struct_I.unpack(str[start:end])
00168 start = end
00169 end += length
00170 if python3:
00171 val1 = str[start:end].decode('utf-8')
00172 else:
00173 val1 = str[start:end]
00174 self.clientnames.append(val1)
00175 start = end
00176 end += 1
00177 (self.ok_flag,) = _struct_B.unpack(str[start:end])
00178 self.ok_flag = bool(self.ok_flag)
00179 return self
00180 except struct.error as e:
00181 raise genpy.DeserializationError(e)
00182
00183 _struct_I = genpy.struct_I
00184 _struct_B = struct.Struct("<B")
00185 """autogenerated by genpy from concert_msgs/InviteResponse.msg. Do not edit."""
00186 import sys
00187 python3 = True if sys.hexversion > 0x03000000 else False
00188 import genpy
00189 import struct
00190
00191
00192 class InviteResponse(genpy.Message):
00193 _md5sum = "c22f2a1ed8654a0b365f1bb3f7ff2c0f"
00194 _type = "concert_msgs/InviteResponse"
00195 _has_header = False
00196 _full_text = """string result
00197
00198
00199 """
00200 __slots__ = ['result']
00201 _slot_types = ['string']
00202
00203 def __init__(self, *args, **kwds):
00204 """
00205 Constructor. Any message fields that are implicitly/explicitly
00206 set to None will be assigned a default value. The recommend
00207 use is keyword arguments as this is more robust to future message
00208 changes. You cannot mix in-order arguments and keyword arguments.
00209
00210 The available fields are:
00211 result
00212
00213 :param args: complete set of field values, in .msg order
00214 :param kwds: use keyword arguments corresponding to message field names
00215 to set specific fields.
00216 """
00217 if args or kwds:
00218 super(InviteResponse, self).__init__(*args, **kwds)
00219
00220 if self.result is None:
00221 self.result = ''
00222 else:
00223 self.result = ''
00224
00225 def _get_types(self):
00226 """
00227 internal API method
00228 """
00229 return self._slot_types
00230
00231 def serialize(self, buff):
00232 """
00233 serialize message into buffer
00234 :param buff: buffer, ``StringIO``
00235 """
00236 try:
00237 _x = self.result
00238 length = len(_x)
00239 if python3 or type(_x) == unicode:
00240 _x = _x.encode('utf-8')
00241 length = len(_x)
00242 buff.write(struct.pack('<I%ss'%length, length, _x))
00243 except struct.error as se: self._check_types(se)
00244 except TypeError as te: self._check_types(te)
00245
00246 def deserialize(self, str):
00247 """
00248 unpack serialized message in str into this message instance
00249 :param str: byte array of serialized message, ``str``
00250 """
00251 try:
00252 end = 0
00253 start = end
00254 end += 4
00255 (length,) = _struct_I.unpack(str[start:end])
00256 start = end
00257 end += length
00258 if python3:
00259 self.result = str[start:end].decode('utf-8')
00260 else:
00261 self.result = str[start:end]
00262 return self
00263 except struct.error as e:
00264 raise genpy.DeserializationError(e)
00265
00266
00267 def serialize_numpy(self, buff, numpy):
00268 """
00269 serialize message with numpy array types into buffer
00270 :param buff: buffer, ``StringIO``
00271 :param numpy: numpy python module
00272 """
00273 try:
00274 _x = self.result
00275 length = len(_x)
00276 if python3 or type(_x) == unicode:
00277 _x = _x.encode('utf-8')
00278 length = len(_x)
00279 buff.write(struct.pack('<I%ss'%length, length, _x))
00280 except struct.error as se: self._check_types(se)
00281 except TypeError as te: self._check_types(te)
00282
00283 def deserialize_numpy(self, str, numpy):
00284 """
00285 unpack serialized message in str into this message instance using numpy for array types
00286 :param str: byte array of serialized message, ``str``
00287 :param numpy: numpy python module
00288 """
00289 try:
00290 end = 0
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 start = end
00295 end += length
00296 if python3:
00297 self.result = str[start:end].decode('utf-8')
00298 else:
00299 self.result = str[start:end]
00300 return self
00301 except struct.error as e:
00302 raise genpy.DeserializationError(e)
00303
00304 _struct_I = genpy.struct_I
00305 class Invite(object):
00306 _type = 'concert_msgs/Invite'
00307 _md5sum = 'e3e2a995bd586ad4fe15886d3ec6ece5'
00308 _request_class = InviteRequest
00309 _response_class = InviteResponse