_srs_dm_ui_interface.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_decision_making_interface/srs_dm_ui_interfaceRequest.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 srs_dm_ui_interfaceRequest(genpy.Message):
00009   _md5sum = "d11b439a1b3617adc456a03d991efc60"
00010   _type = "srs_decision_making_interface/srs_dm_ui_interfaceRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string action
00013 string parameter
00014 string priority
00015 string json_parameters
00016 
00017 """
00018   __slots__ = ['action','parameter','priority','json_parameters']
00019   _slot_types = ['string','string','string','string']
00020 
00021   def __init__(self, *args, **kwds):
00022     """
00023     Constructor. Any message fields that are implicitly/explicitly
00024     set to None will be assigned a default value. The recommend
00025     use is keyword arguments as this is more robust to future message
00026     changes.  You cannot mix in-order arguments and keyword arguments.
00027 
00028     The available fields are:
00029        action,parameter,priority,json_parameters
00030 
00031     :param args: complete set of field values, in .msg order
00032     :param kwds: use keyword arguments corresponding to message field names
00033     to set specific fields.
00034     """
00035     if args or kwds:
00036       super(srs_dm_ui_interfaceRequest, self).__init__(*args, **kwds)
00037       #message fields cannot be None, assign default values for those that are
00038       if self.action is None:
00039         self.action = ''
00040       if self.parameter is None:
00041         self.parameter = ''
00042       if self.priority is None:
00043         self.priority = ''
00044       if self.json_parameters is None:
00045         self.json_parameters = ''
00046     else:
00047       self.action = ''
00048       self.parameter = ''
00049       self.priority = ''
00050       self.json_parameters = ''
00051 
00052   def _get_types(self):
00053     """
00054     internal API method
00055     """
00056     return self._slot_types
00057 
00058   def serialize(self, buff):
00059     """
00060     serialize message into buffer
00061     :param buff: buffer, ``StringIO``
00062     """
00063     try:
00064       _x = self.action
00065       length = len(_x)
00066       if python3 or type(_x) == unicode:
00067         _x = _x.encode('utf-8')
00068         length = len(_x)
00069       buff.write(struct.pack('<I%ss'%length, length, _x))
00070       _x = self.parameter
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.priority
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.json_parameters
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     except struct.error as se: self._check_types(se)
00089     except TypeError as te: self._check_types(te)
00090 
00091   def deserialize(self, str):
00092     """
00093     unpack serialized message in str into this message instance
00094     :param str: byte array of serialized message, ``str``
00095     """
00096     try:
00097       end = 0
00098       start = end
00099       end += 4
00100       (length,) = _struct_I.unpack(str[start:end])
00101       start = end
00102       end += length
00103       if python3:
00104         self.action = str[start:end].decode('utf-8')
00105       else:
00106         self.action = str[start:end]
00107       start = end
00108       end += 4
00109       (length,) = _struct_I.unpack(str[start:end])
00110       start = end
00111       end += length
00112       if python3:
00113         self.parameter = str[start:end].decode('utf-8')
00114       else:
00115         self.parameter = str[start:end]
00116       start = end
00117       end += 4
00118       (length,) = _struct_I.unpack(str[start:end])
00119       start = end
00120       end += length
00121       if python3:
00122         self.priority = str[start:end].decode('utf-8')
00123       else:
00124         self.priority = str[start:end]
00125       start = end
00126       end += 4
00127       (length,) = _struct_I.unpack(str[start:end])
00128       start = end
00129       end += length
00130       if python3:
00131         self.json_parameters = str[start:end].decode('utf-8')
00132       else:
00133         self.json_parameters = str[start:end]
00134       return self
00135     except struct.error as e:
00136       raise genpy.DeserializationError(e) #most likely buffer underfill
00137 
00138 
00139   def serialize_numpy(self, buff, numpy):
00140     """
00141     serialize message with numpy array types into buffer
00142     :param buff: buffer, ``StringIO``
00143     :param numpy: numpy python module
00144     """
00145     try:
00146       _x = self.action
00147       length = len(_x)
00148       if python3 or type(_x) == unicode:
00149         _x = _x.encode('utf-8')
00150         length = len(_x)
00151       buff.write(struct.pack('<I%ss'%length, length, _x))
00152       _x = self.parameter
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.priority
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.json_parameters
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     except struct.error as se: self._check_types(se)
00171     except TypeError as te: self._check_types(te)
00172 
00173   def deserialize_numpy(self, str, numpy):
00174     """
00175     unpack serialized message in str into this message instance using numpy for array types
00176     :param str: byte array of serialized message, ``str``
00177     :param numpy: numpy python module
00178     """
00179     try:
00180       end = 0
00181       start = end
00182       end += 4
00183       (length,) = _struct_I.unpack(str[start:end])
00184       start = end
00185       end += length
00186       if python3:
00187         self.action = str[start:end].decode('utf-8')
00188       else:
00189         self.action = str[start:end]
00190       start = end
00191       end += 4
00192       (length,) = _struct_I.unpack(str[start:end])
00193       start = end
00194       end += length
00195       if python3:
00196         self.parameter = str[start:end].decode('utf-8')
00197       else:
00198         self.parameter = str[start:end]
00199       start = end
00200       end += 4
00201       (length,) = _struct_I.unpack(str[start:end])
00202       start = end
00203       end += length
00204       if python3:
00205         self.priority = str[start:end].decode('utf-8')
00206       else:
00207         self.priority = str[start:end]
00208       start = end
00209       end += 4
00210       (length,) = _struct_I.unpack(str[start:end])
00211       start = end
00212       end += length
00213       if python3:
00214         self.json_parameters = str[start:end].decode('utf-8')
00215       else:
00216         self.json_parameters = str[start:end]
00217       return self
00218     except struct.error as e:
00219       raise genpy.DeserializationError(e) #most likely buffer underfill
00220 
00221 _struct_I = genpy.struct_I
00222 """autogenerated by genpy from srs_decision_making_interface/srs_dm_ui_interfaceResponse.msg. Do not edit."""
00223 import sys
00224 python3 = True if sys.hexversion > 0x03000000 else False
00225 import genpy
00226 import struct
00227 
00228 
00229 class srs_dm_ui_interfaceResponse(genpy.Message):
00230   _md5sum = "bbfcda76036ebbe3d36caf7af80b260c"
00231   _type = "srs_decision_making_interface/srs_dm_ui_interfaceResponse"
00232   _has_header = False #flag to mark the presence of a Header object
00233   _full_text = """string id
00234 
00235 """
00236   __slots__ = ['id']
00237   _slot_types = ['string']
00238 
00239   def __init__(self, *args, **kwds):
00240     """
00241     Constructor. Any message fields that are implicitly/explicitly
00242     set to None will be assigned a default value. The recommend
00243     use is keyword arguments as this is more robust to future message
00244     changes.  You cannot mix in-order arguments and keyword arguments.
00245 
00246     The available fields are:
00247        id
00248 
00249     :param args: complete set of field values, in .msg order
00250     :param kwds: use keyword arguments corresponding to message field names
00251     to set specific fields.
00252     """
00253     if args or kwds:
00254       super(srs_dm_ui_interfaceResponse, self).__init__(*args, **kwds)
00255       #message fields cannot be None, assign default values for those that are
00256       if self.id is None:
00257         self.id = ''
00258     else:
00259       self.id = ''
00260 
00261   def _get_types(self):
00262     """
00263     internal API method
00264     """
00265     return self._slot_types
00266 
00267   def serialize(self, buff):
00268     """
00269     serialize message into buffer
00270     :param buff: buffer, ``StringIO``
00271     """
00272     try:
00273       _x = self.id
00274       length = len(_x)
00275       if python3 or type(_x) == unicode:
00276         _x = _x.encode('utf-8')
00277         length = len(_x)
00278       buff.write(struct.pack('<I%ss'%length, length, _x))
00279     except struct.error as se: self._check_types(se)
00280     except TypeError as te: self._check_types(te)
00281 
00282   def deserialize(self, str):
00283     """
00284     unpack serialized message in str into this message instance
00285     :param str: byte array of serialized message, ``str``
00286     """
00287     try:
00288       end = 0
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.id = str[start:end].decode('utf-8')
00296       else:
00297         self.id = str[start:end]
00298       return self
00299     except struct.error as e:
00300       raise genpy.DeserializationError(e) #most likely buffer underfill
00301 
00302 
00303   def serialize_numpy(self, buff, numpy):
00304     """
00305     serialize message with numpy array types into buffer
00306     :param buff: buffer, ``StringIO``
00307     :param numpy: numpy python module
00308     """
00309     try:
00310       _x = self.id
00311       length = len(_x)
00312       if python3 or type(_x) == unicode:
00313         _x = _x.encode('utf-8')
00314         length = len(_x)
00315       buff.write(struct.pack('<I%ss'%length, length, _x))
00316     except struct.error as se: self._check_types(se)
00317     except TypeError as te: self._check_types(te)
00318 
00319   def deserialize_numpy(self, str, numpy):
00320     """
00321     unpack serialized message in str into this message instance using numpy for array types
00322     :param str: byte array of serialized message, ``str``
00323     :param numpy: numpy python module
00324     """
00325     try:
00326       end = 0
00327       start = end
00328       end += 4
00329       (length,) = _struct_I.unpack(str[start:end])
00330       start = end
00331       end += length
00332       if python3:
00333         self.id = str[start:end].decode('utf-8')
00334       else:
00335         self.id = str[start:end]
00336       return self
00337     except struct.error as e:
00338       raise genpy.DeserializationError(e) #most likely buffer underfill
00339 
00340 _struct_I = genpy.struct_I
00341 class srs_dm_ui_interface(object):
00342   _type          = 'srs_decision_making_interface/srs_dm_ui_interface'
00343   _md5sum = 'f89ee43caf57428a1c4b0b000fa69923'
00344   _request_class  = srs_dm_ui_interfaceRequest
00345   _response_class = srs_dm_ui_interfaceResponse


srs_decision_making_interface
Author(s): renxi
autogenerated on Sun Jan 5 2014 12:07:47