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


hector_roll_pitch_stabilizer
Author(s): Stefan Kohlbrecher
autogenerated on Wed Sep 16 2015 04:29:57