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


industrial_msgs
Author(s): Shaun M. Edwards
autogenerated on Mon Oct 6 2014 00:53:40