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


bipedRobin_msgs
Author(s): Studentenaccount
autogenerated on Fri Nov 15 2013 11:10:20