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