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


corobot_srvs
Author(s): Morgan Cormier/mcormier@coroware.com
autogenerated on Tue Jan 7 2014 11:38:11