00001 """autogenerated by genpy from roscpp_sessions/add_variablesRequest.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 add_variablesRequest(genpy.Message):
00009 _md5sum = "d14cc3cb09d105ec5c963edd2748d6fb"
00010 _type = "roscpp_sessions/add_variablesRequest"
00011 _has_header = False
00012 _full_text = """string variable1
00013 string variable2
00014 string result
00015
00016 """
00017 __slots__ = ['variable1','variable2','result']
00018 _slot_types = ['string','string','string']
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 variable1,variable2,result
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(add_variablesRequest, self).__init__(*args, **kwds)
00036
00037 if self.variable1 is None:
00038 self.variable1 = ''
00039 if self.variable2 is None:
00040 self.variable2 = ''
00041 if self.result is None:
00042 self.result = ''
00043 else:
00044 self.variable1 = ''
00045 self.variable2 = ''
00046 self.result = ''
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.variable1
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 _x = self.variable2
00067 length = len(_x)
00068 if python3 or type(_x) == unicode:
00069 _x = _x.encode('utf-8')
00070 length = len(_x)
00071 buff.write(struct.pack('<I%ss'%length, length, _x))
00072 _x = self.result
00073 length = len(_x)
00074 if python3 or type(_x) == unicode:
00075 _x = _x.encode('utf-8')
00076 length = len(_x)
00077 buff.write(struct.pack('<I%ss'%length, length, _x))
00078 except struct.error as se: self._check_types(se)
00079 except TypeError as te: self._check_types(te)
00080
00081 def deserialize(self, str):
00082 """
00083 unpack serialized message in str into this message instance
00084 :param str: byte array of serialized message, ``str``
00085 """
00086 try:
00087 end = 0
00088 start = end
00089 end += 4
00090 (length,) = _struct_I.unpack(str[start:end])
00091 start = end
00092 end += length
00093 if python3:
00094 self.variable1 = str[start:end].decode('utf-8')
00095 else:
00096 self.variable1 = str[start:end]
00097 start = end
00098 end += 4
00099 (length,) = _struct_I.unpack(str[start:end])
00100 start = end
00101 end += length
00102 if python3:
00103 self.variable2 = str[start:end].decode('utf-8')
00104 else:
00105 self.variable2 = str[start:end]
00106 start = end
00107 end += 4
00108 (length,) = _struct_I.unpack(str[start:end])
00109 start = end
00110 end += length
00111 if python3:
00112 self.result = str[start:end].decode('utf-8')
00113 else:
00114 self.result = str[start:end]
00115 return self
00116 except struct.error as e:
00117 raise genpy.DeserializationError(e)
00118
00119
00120 def serialize_numpy(self, buff, numpy):
00121 """
00122 serialize message with numpy array types into buffer
00123 :param buff: buffer, ``StringIO``
00124 :param numpy: numpy python module
00125 """
00126 try:
00127 _x = self.variable1
00128 length = len(_x)
00129 if python3 or type(_x) == unicode:
00130 _x = _x.encode('utf-8')
00131 length = len(_x)
00132 buff.write(struct.pack('<I%ss'%length, length, _x))
00133 _x = self.variable2
00134 length = len(_x)
00135 if python3 or type(_x) == unicode:
00136 _x = _x.encode('utf-8')
00137 length = len(_x)
00138 buff.write(struct.pack('<I%ss'%length, length, _x))
00139 _x = self.result
00140 length = len(_x)
00141 if python3 or type(_x) == unicode:
00142 _x = _x.encode('utf-8')
00143 length = len(_x)
00144 buff.write(struct.pack('<I%ss'%length, length, _x))
00145 except struct.error as se: self._check_types(se)
00146 except TypeError as te: self._check_types(te)
00147
00148 def deserialize_numpy(self, str, numpy):
00149 """
00150 unpack serialized message in str into this message instance using numpy for array types
00151 :param str: byte array of serialized message, ``str``
00152 :param numpy: numpy python module
00153 """
00154 try:
00155 end = 0
00156 start = end
00157 end += 4
00158 (length,) = _struct_I.unpack(str[start:end])
00159 start = end
00160 end += length
00161 if python3:
00162 self.variable1 = str[start:end].decode('utf-8')
00163 else:
00164 self.variable1 = str[start:end]
00165 start = end
00166 end += 4
00167 (length,) = _struct_I.unpack(str[start:end])
00168 start = end
00169 end += length
00170 if python3:
00171 self.variable2 = str[start:end].decode('utf-8')
00172 else:
00173 self.variable2 = str[start:end]
00174 start = end
00175 end += 4
00176 (length,) = _struct_I.unpack(str[start:end])
00177 start = end
00178 end += length
00179 if python3:
00180 self.result = str[start:end].decode('utf-8')
00181 else:
00182 self.result = str[start:end]
00183 return self
00184 except struct.error as e:
00185 raise genpy.DeserializationError(e)
00186
00187 _struct_I = genpy.struct_I
00188 """autogenerated by genpy from roscpp_sessions/add_variablesResponse.msg. Do not edit."""
00189 import sys
00190 python3 = True if sys.hexversion > 0x03000000 else False
00191 import genpy
00192 import struct
00193
00194
00195 class add_variablesResponse(genpy.Message):
00196 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00197 _type = "roscpp_sessions/add_variablesResponse"
00198 _has_header = False
00199 _full_text = """
00200
00201 """
00202 __slots__ = []
00203 _slot_types = []
00204
00205 def __init__(self, *args, **kwds):
00206 """
00207 Constructor. Any message fields that are implicitly/explicitly
00208 set to None will be assigned a default value. The recommend
00209 use is keyword arguments as this is more robust to future message
00210 changes. You cannot mix in-order arguments and keyword arguments.
00211
00212 The available fields are:
00213
00214
00215 :param args: complete set of field values, in .msg order
00216 :param kwds: use keyword arguments corresponding to message field names
00217 to set specific fields.
00218 """
00219 if args or kwds:
00220 super(add_variablesResponse, self).__init__(*args, **kwds)
00221
00222 def _get_types(self):
00223 """
00224 internal API method
00225 """
00226 return self._slot_types
00227
00228 def serialize(self, buff):
00229 """
00230 serialize message into buffer
00231 :param buff: buffer, ``StringIO``
00232 """
00233 try:
00234 pass
00235 except struct.error as se: self._check_types(se)
00236 except TypeError as te: self._check_types(te)
00237
00238 def deserialize(self, str):
00239 """
00240 unpack serialized message in str into this message instance
00241 :param str: byte array of serialized message, ``str``
00242 """
00243 try:
00244 end = 0
00245 return self
00246 except struct.error as e:
00247 raise genpy.DeserializationError(e)
00248
00249
00250 def serialize_numpy(self, buff, numpy):
00251 """
00252 serialize message with numpy array types into buffer
00253 :param buff: buffer, ``StringIO``
00254 :param numpy: numpy python module
00255 """
00256 try:
00257 pass
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 end = 0
00269 return self
00270 except struct.error as e:
00271 raise genpy.DeserializationError(e)
00272
00273 _struct_I = genpy.struct_I
00274 class add_variables(object):
00275 _type = 'roscpp_sessions/add_variables'
00276 _md5sum = 'd14cc3cb09d105ec5c963edd2748d6fb'
00277 _request_class = add_variablesRequest
00278 _response_class = add_variablesResponse