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