00001 """autogenerated by genpy from concert_msgs/ConcertClientConfiguration.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 ConcertClientConfiguration(genpy.Message):
00009 _md5sum = "271180ccd464930e6cd371441f8f7bf5"
00010 _type = "concert_msgs/ConcertClientConfiguration"
00011 _has_header = False
00012 _full_text = """# This provides information about the concert client
00013 # and app configuration required by an implementation
00014 # of an orchestrated concert solution.
00015
00016 # The platform id triple
00017 string platform
00018 string system
00019 string robot
00020
00021 # App that should run
00022 string app
00023 """
00024 __slots__ = ['platform','system','robot','app']
00025 _slot_types = ['string','string','string','string']
00026
00027 def __init__(self, *args, **kwds):
00028 """
00029 Constructor. Any message fields that are implicitly/explicitly
00030 set to None will be assigned a default value. The recommend
00031 use is keyword arguments as this is more robust to future message
00032 changes. You cannot mix in-order arguments and keyword arguments.
00033
00034 The available fields are:
00035 platform,system,robot,app
00036
00037 :param args: complete set of field values, in .msg order
00038 :param kwds: use keyword arguments corresponding to message field names
00039 to set specific fields.
00040 """
00041 if args or kwds:
00042 super(ConcertClientConfiguration, self).__init__(*args, **kwds)
00043
00044 if self.platform is None:
00045 self.platform = ''
00046 if self.system is None:
00047 self.system = ''
00048 if self.robot is None:
00049 self.robot = ''
00050 if self.app is None:
00051 self.app = ''
00052 else:
00053 self.platform = ''
00054 self.system = ''
00055 self.robot = ''
00056 self.app = ''
00057
00058 def _get_types(self):
00059 """
00060 internal API method
00061 """
00062 return self._slot_types
00063
00064 def serialize(self, buff):
00065 """
00066 serialize message into buffer
00067 :param buff: buffer, ``StringIO``
00068 """
00069 try:
00070 _x = self.platform
00071 length = len(_x)
00072 if python3 or type(_x) == unicode:
00073 _x = _x.encode('utf-8')
00074 length = len(_x)
00075 buff.write(struct.pack('<I%ss'%length, length, _x))
00076 _x = self.system
00077 length = len(_x)
00078 if python3 or type(_x) == unicode:
00079 _x = _x.encode('utf-8')
00080 length = len(_x)
00081 buff.write(struct.pack('<I%ss'%length, length, _x))
00082 _x = self.robot
00083 length = len(_x)
00084 if python3 or type(_x) == unicode:
00085 _x = _x.encode('utf-8')
00086 length = len(_x)
00087 buff.write(struct.pack('<I%ss'%length, length, _x))
00088 _x = self.app
00089 length = len(_x)
00090 if python3 or type(_x) == unicode:
00091 _x = _x.encode('utf-8')
00092 length = len(_x)
00093 buff.write(struct.pack('<I%ss'%length, length, _x))
00094 except struct.error as se: self._check_types(se)
00095 except TypeError as te: self._check_types(te)
00096
00097 def deserialize(self, str):
00098 """
00099 unpack serialized message in str into this message instance
00100 :param str: byte array of serialized message, ``str``
00101 """
00102 try:
00103 end = 0
00104 start = end
00105 end += 4
00106 (length,) = _struct_I.unpack(str[start:end])
00107 start = end
00108 end += length
00109 if python3:
00110 self.platform = str[start:end].decode('utf-8')
00111 else:
00112 self.platform = str[start:end]
00113 start = end
00114 end += 4
00115 (length,) = _struct_I.unpack(str[start:end])
00116 start = end
00117 end += length
00118 if python3:
00119 self.system = str[start:end].decode('utf-8')
00120 else:
00121 self.system = str[start:end]
00122 start = end
00123 end += 4
00124 (length,) = _struct_I.unpack(str[start:end])
00125 start = end
00126 end += length
00127 if python3:
00128 self.robot = str[start:end].decode('utf-8')
00129 else:
00130 self.robot = str[start:end]
00131 start = end
00132 end += 4
00133 (length,) = _struct_I.unpack(str[start:end])
00134 start = end
00135 end += length
00136 if python3:
00137 self.app = str[start:end].decode('utf-8')
00138 else:
00139 self.app = str[start:end]
00140 return self
00141 except struct.error as e:
00142 raise genpy.DeserializationError(e)
00143
00144
00145 def serialize_numpy(self, buff, numpy):
00146 """
00147 serialize message with numpy array types into buffer
00148 :param buff: buffer, ``StringIO``
00149 :param numpy: numpy python module
00150 """
00151 try:
00152 _x = self.platform
00153 length = len(_x)
00154 if python3 or type(_x) == unicode:
00155 _x = _x.encode('utf-8')
00156 length = len(_x)
00157 buff.write(struct.pack('<I%ss'%length, length, _x))
00158 _x = self.system
00159 length = len(_x)
00160 if python3 or type(_x) == unicode:
00161 _x = _x.encode('utf-8')
00162 length = len(_x)
00163 buff.write(struct.pack('<I%ss'%length, length, _x))
00164 _x = self.robot
00165 length = len(_x)
00166 if python3 or type(_x) == unicode:
00167 _x = _x.encode('utf-8')
00168 length = len(_x)
00169 buff.write(struct.pack('<I%ss'%length, length, _x))
00170 _x = self.app
00171 length = len(_x)
00172 if python3 or type(_x) == unicode:
00173 _x = _x.encode('utf-8')
00174 length = len(_x)
00175 buff.write(struct.pack('<I%ss'%length, length, _x))
00176 except struct.error as se: self._check_types(se)
00177 except TypeError as te: self._check_types(te)
00178
00179 def deserialize_numpy(self, str, numpy):
00180 """
00181 unpack serialized message in str into this message instance using numpy for array types
00182 :param str: byte array of serialized message, ``str``
00183 :param numpy: numpy python module
00184 """
00185 try:
00186 end = 0
00187 start = end
00188 end += 4
00189 (length,) = _struct_I.unpack(str[start:end])
00190 start = end
00191 end += length
00192 if python3:
00193 self.platform = str[start:end].decode('utf-8')
00194 else:
00195 self.platform = str[start:end]
00196 start = end
00197 end += 4
00198 (length,) = _struct_I.unpack(str[start:end])
00199 start = end
00200 end += length
00201 if python3:
00202 self.system = str[start:end].decode('utf-8')
00203 else:
00204 self.system = str[start:end]
00205 start = end
00206 end += 4
00207 (length,) = _struct_I.unpack(str[start:end])
00208 start = end
00209 end += length
00210 if python3:
00211 self.robot = str[start:end].decode('utf-8')
00212 else:
00213 self.robot = str[start:end]
00214 start = end
00215 end += 4
00216 (length,) = _struct_I.unpack(str[start:end])
00217 start = end
00218 end += length
00219 if python3:
00220 self.app = str[start:end].decode('utf-8')
00221 else:
00222 self.app = str[start:end]
00223 return self
00224 except struct.error as e:
00225 raise genpy.DeserializationError(e)
00226
00227 _struct_I = genpy.struct_I