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


rosapi
Author(s): Jon
autogenerated on Thu Jan 2 2014 11:53:39