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