_SetPidGains.py
Go to the documentation of this file.
00001 """autogenerated by genpy from control_toolbox/SetPidGainsRequest.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 SetPidGainsRequest(genpy.Message):
00009   _md5sum = "b06494a6fc3d5b972ded4e2a9a71535a"
00010   _type = "control_toolbox/SetPidGainsRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """float64 p
00013 float64 i
00014 float64 d
00015 float64 i_clamp
00016 
00017 """
00018   __slots__ = ['p','i','d','i_clamp']
00019   _slot_types = ['float64','float64','float64','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        p,i,d,i_clamp
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(SetPidGainsRequest, self).__init__(*args, **kwds)
00037       #message fields cannot be None, assign default values for those that are
00038       if self.p is None:
00039         self.p = 0.
00040       if self.i is None:
00041         self.i = 0.
00042       if self.d is None:
00043         self.d = 0.
00044       if self.i_clamp is None:
00045         self.i_clamp = 0.
00046     else:
00047       self.p = 0.
00048       self.i = 0.
00049       self.d = 0.
00050       self.i_clamp = 0.
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
00065       buff.write(_struct_4d.pack(_x.p, _x.i, _x.d, _x.i_clamp))
00066     except struct.error as se: self._check_types(se)
00067     except TypeError as te: self._check_types(te)
00068 
00069   def deserialize(self, str):
00070     """
00071     unpack serialized message in str into this message instance
00072     :param str: byte array of serialized message, ``str``
00073     """
00074     try:
00075       end = 0
00076       _x = self
00077       start = end
00078       end += 32
00079       (_x.p, _x.i, _x.d, _x.i_clamp,) = _struct_4d.unpack(str[start:end])
00080       return self
00081     except struct.error as e:
00082       raise genpy.DeserializationError(e) #most likely buffer underfill
00083 
00084 
00085   def serialize_numpy(self, buff, numpy):
00086     """
00087     serialize message with numpy array types into buffer
00088     :param buff: buffer, ``StringIO``
00089     :param numpy: numpy python module
00090     """
00091     try:
00092       _x = self
00093       buff.write(_struct_4d.pack(_x.p, _x.i, _x.d, _x.i_clamp))
00094     except struct.error as se: self._check_types(se)
00095     except TypeError as te: self._check_types(te)
00096 
00097   def deserialize_numpy(self, str, numpy):
00098     """
00099     unpack serialized message in str into this message instance using numpy for array types
00100     :param str: byte array of serialized message, ``str``
00101     :param numpy: numpy python module
00102     """
00103     try:
00104       end = 0
00105       _x = self
00106       start = end
00107       end += 32
00108       (_x.p, _x.i, _x.d, _x.i_clamp,) = _struct_4d.unpack(str[start:end])
00109       return self
00110     except struct.error as e:
00111       raise genpy.DeserializationError(e) #most likely buffer underfill
00112 
00113 _struct_I = genpy.struct_I
00114 _struct_4d = struct.Struct("<4d")
00115 """autogenerated by genpy from control_toolbox/SetPidGainsResponse.msg. Do not edit."""
00116 import sys
00117 python3 = True if sys.hexversion > 0x03000000 else False
00118 import genpy
00119 import struct
00120 
00121 
00122 class SetPidGainsResponse(genpy.Message):
00123   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00124   _type = "control_toolbox/SetPidGainsResponse"
00125   _has_header = False #flag to mark the presence of a Header object
00126   _full_text = """
00127 
00128 """
00129   __slots__ = []
00130   _slot_types = []
00131 
00132   def __init__(self, *args, **kwds):
00133     """
00134     Constructor. Any message fields that are implicitly/explicitly
00135     set to None will be assigned a default value. The recommend
00136     use is keyword arguments as this is more robust to future message
00137     changes.  You cannot mix in-order arguments and keyword arguments.
00138 
00139     The available fields are:
00140        
00141 
00142     :param args: complete set of field values, in .msg order
00143     :param kwds: use keyword arguments corresponding to message field names
00144     to set specific fields.
00145     """
00146     if args or kwds:
00147       super(SetPidGainsResponse, self).__init__(*args, **kwds)
00148 
00149   def _get_types(self):
00150     """
00151     internal API method
00152     """
00153     return self._slot_types
00154 
00155   def serialize(self, buff):
00156     """
00157     serialize message into buffer
00158     :param buff: buffer, ``StringIO``
00159     """
00160     try:
00161       pass
00162     except struct.error as se: self._check_types(se)
00163     except TypeError as te: self._check_types(te)
00164 
00165   def deserialize(self, str):
00166     """
00167     unpack serialized message in str into this message instance
00168     :param str: byte array of serialized message, ``str``
00169     """
00170     try:
00171       end = 0
00172       return self
00173     except struct.error as e:
00174       raise genpy.DeserializationError(e) #most likely buffer underfill
00175 
00176 
00177   def serialize_numpy(self, buff, numpy):
00178     """
00179     serialize message with numpy array types into buffer
00180     :param buff: buffer, ``StringIO``
00181     :param numpy: numpy python module
00182     """
00183     try:
00184       pass
00185     except struct.error as se: self._check_types(se)
00186     except TypeError as te: self._check_types(te)
00187 
00188   def deserialize_numpy(self, str, numpy):
00189     """
00190     unpack serialized message in str into this message instance using numpy for array types
00191     :param str: byte array of serialized message, ``str``
00192     :param numpy: numpy python module
00193     """
00194     try:
00195       end = 0
00196       return self
00197     except struct.error as e:
00198       raise genpy.DeserializationError(e) #most likely buffer underfill
00199 
00200 _struct_I = genpy.struct_I
00201 class SetPidGains(object):
00202   _type          = 'control_toolbox/SetPidGains'
00203   _md5sum = 'b06494a6fc3d5b972ded4e2a9a71535a'
00204   _request_class  = SetPidGainsRequest
00205   _response_class = SetPidGainsResponse


control_toolbox
Author(s): Melonee Wise, Sachin Chitta, John Hsu
autogenerated on Fri Jan 3 2014 11:41:22