_ArmMovingWait.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_collision_monitor/ArmMovingWaitRequest.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 ArmMovingWaitRequest(genpy.Message):
00009   _md5sum = "7e7e43e04506cf890cb2cd193e18f0f7"
00010   _type = "pr2_collision_monitor/ArmMovingWaitRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """bool block
00013 float32 timeout
00014 
00015 """
00016   __slots__ = ['block','timeout']
00017   _slot_types = ['bool','float32']
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        block,timeout
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(ArmMovingWaitRequest, self).__init__(*args, **kwds)
00035       #message fields cannot be None, assign default values for those that are
00036       if self.block is None:
00037         self.block = False
00038       if self.timeout is None:
00039         self.timeout = 0.
00040     else:
00041       self.block = False
00042       self.timeout = 0.
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
00057       buff.write(_struct_Bf.pack(_x.block, _x.timeout))
00058     except struct.error as se: self._check_types(se)
00059     except TypeError as te: self._check_types(te)
00060 
00061   def deserialize(self, str):
00062     """
00063     unpack serialized message in str into this message instance
00064     :param str: byte array of serialized message, ``str``
00065     """
00066     try:
00067       end = 0
00068       _x = self
00069       start = end
00070       end += 5
00071       (_x.block, _x.timeout,) = _struct_Bf.unpack(str[start:end])
00072       self.block = bool(self.block)
00073       return self
00074     except struct.error as e:
00075       raise genpy.DeserializationError(e) #most likely buffer underfill
00076 
00077 
00078   def serialize_numpy(self, buff, numpy):
00079     """
00080     serialize message with numpy array types into buffer
00081     :param buff: buffer, ``StringIO``
00082     :param numpy: numpy python module
00083     """
00084     try:
00085       _x = self
00086       buff.write(_struct_Bf.pack(_x.block, _x.timeout))
00087     except struct.error as se: self._check_types(se)
00088     except TypeError as te: self._check_types(te)
00089 
00090   def deserialize_numpy(self, str, numpy):
00091     """
00092     unpack serialized message in str into this message instance using numpy for array types
00093     :param str: byte array of serialized message, ``str``
00094     :param numpy: numpy python module
00095     """
00096     try:
00097       end = 0
00098       _x = self
00099       start = end
00100       end += 5
00101       (_x.block, _x.timeout,) = _struct_Bf.unpack(str[start:end])
00102       self.block = bool(self.block)
00103       return self
00104     except struct.error as e:
00105       raise genpy.DeserializationError(e) #most likely buffer underfill
00106 
00107 _struct_I = genpy.struct_I
00108 _struct_Bf = struct.Struct("<Bf")
00109 """autogenerated by genpy from pr2_collision_monitor/ArmMovingWaitResponse.msg. Do not edit."""
00110 import sys
00111 python3 = True if sys.hexversion > 0x03000000 else False
00112 import genpy
00113 import struct
00114 
00115 
00116 class ArmMovingWaitResponse(genpy.Message):
00117   _md5sum = "552aeb9cf1ea5fa2b0b9d933540d4e52"
00118   _type = "pr2_collision_monitor/ArmMovingWaitResponse"
00119   _has_header = False #flag to mark the presence of a Header object
00120   _full_text = """bool is_moving
00121 
00122 
00123 """
00124   __slots__ = ['is_moving']
00125   _slot_types = ['bool']
00126 
00127   def __init__(self, *args, **kwds):
00128     """
00129     Constructor. Any message fields that are implicitly/explicitly
00130     set to None will be assigned a default value. The recommend
00131     use is keyword arguments as this is more robust to future message
00132     changes.  You cannot mix in-order arguments and keyword arguments.
00133 
00134     The available fields are:
00135        is_moving
00136 
00137     :param args: complete set of field values, in .msg order
00138     :param kwds: use keyword arguments corresponding to message field names
00139     to set specific fields.
00140     """
00141     if args or kwds:
00142       super(ArmMovingWaitResponse, self).__init__(*args, **kwds)
00143       #message fields cannot be None, assign default values for those that are
00144       if self.is_moving is None:
00145         self.is_moving = False
00146     else:
00147       self.is_moving = False
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       buff.write(_struct_B.pack(self.is_moving))
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       start = end
00173       end += 1
00174       (self.is_moving,) = _struct_B.unpack(str[start:end])
00175       self.is_moving = bool(self.is_moving)
00176       return self
00177     except struct.error as e:
00178       raise genpy.DeserializationError(e) #most likely buffer underfill
00179 
00180 
00181   def serialize_numpy(self, buff, numpy):
00182     """
00183     serialize message with numpy array types into buffer
00184     :param buff: buffer, ``StringIO``
00185     :param numpy: numpy python module
00186     """
00187     try:
00188       buff.write(_struct_B.pack(self.is_moving))
00189     except struct.error as se: self._check_types(se)
00190     except TypeError as te: self._check_types(te)
00191 
00192   def deserialize_numpy(self, str, numpy):
00193     """
00194     unpack serialized message in str into this message instance using numpy for array types
00195     :param str: byte array of serialized message, ``str``
00196     :param numpy: numpy python module
00197     """
00198     try:
00199       end = 0
00200       start = end
00201       end += 1
00202       (self.is_moving,) = _struct_B.unpack(str[start:end])
00203       self.is_moving = bool(self.is_moving)
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 _struct_B = struct.Struct("<B")
00210 class ArmMovingWait(object):
00211   _type          = 'pr2_collision_monitor/ArmMovingWait'
00212   _md5sum = 'b8b14812854da4b207356f77a80ea05b'
00213   _request_class  = ArmMovingWaitRequest
00214   _response_class = ArmMovingWaitResponse


pr2_collision_monitor
Author(s): Kelsey Hawkins, Advisor: Prof. Charlie Kemp (Healthcare Robotics Lab at Georgia Tech)
autogenerated on Wed Nov 27 2013 11:40:10