$search
00001 """autogenerated by genmsg_py from ArmNavSetAttachedRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ArmNavSetAttachedRequest(roslib.message.Message): 00007 _md5sum = "949ff577f796198bba988756d700222d" 00008 _type = "srs_assisted_arm_navigation_msgs/ArmNavSetAttachedRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """string object_name 00011 bool attached 00012 00013 """ 00014 __slots__ = ['object_name','attached'] 00015 _slot_types = ['string','bool'] 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 object_name,attached 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(ArmNavSetAttachedRequest, self).__init__(*args, **kwds) 00033 #message fields cannot be None, assign default values for those that are 00034 if self.object_name is None: 00035 self.object_name = '' 00036 if self.attached is None: 00037 self.attached = False 00038 else: 00039 self.object_name = '' 00040 self.attached = False 00041 00042 def _get_types(self): 00043 """ 00044 internal API method 00045 """ 00046 return self._slot_types 00047 00048 def serialize(self, buff): 00049 """ 00050 serialize message into buffer 00051 @param buff: buffer 00052 @type buff: StringIO 00053 """ 00054 try: 00055 _x = self.object_name 00056 length = len(_x) 00057 buff.write(struct.pack('<I%ss'%length, length, _x)) 00058 buff.write(_struct_B.pack(self.attached)) 00059 except struct.error as se: self._check_types(se) 00060 except TypeError as te: self._check_types(te) 00061 00062 def deserialize(self, str): 00063 """ 00064 unpack serialized message in str into this message instance 00065 @param str: byte array of serialized message 00066 @type str: str 00067 """ 00068 try: 00069 end = 0 00070 start = end 00071 end += 4 00072 (length,) = _struct_I.unpack(str[start:end]) 00073 start = end 00074 end += length 00075 self.object_name = str[start:end] 00076 start = end 00077 end += 1 00078 (self.attached,) = _struct_B.unpack(str[start:end]) 00079 self.attached = bool(self.attached) 00080 return self 00081 except struct.error as e: 00082 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00083 00084 00085 def serialize_numpy(self, buff, numpy): 00086 """ 00087 serialize message with numpy array types into buffer 00088 @param buff: buffer 00089 @type buff: StringIO 00090 @param numpy: numpy python module 00091 @type numpy module 00092 """ 00093 try: 00094 _x = self.object_name 00095 length = len(_x) 00096 buff.write(struct.pack('<I%ss'%length, length, _x)) 00097 buff.write(_struct_B.pack(self.attached)) 00098 except struct.error as se: self._check_types(se) 00099 except TypeError as te: self._check_types(te) 00100 00101 def deserialize_numpy(self, str, numpy): 00102 """ 00103 unpack serialized message in str into this message instance using numpy for array types 00104 @param str: byte array of serialized message 00105 @type str: str 00106 @param numpy: numpy python module 00107 @type numpy: module 00108 """ 00109 try: 00110 end = 0 00111 start = end 00112 end += 4 00113 (length,) = _struct_I.unpack(str[start:end]) 00114 start = end 00115 end += length 00116 self.object_name = str[start:end] 00117 start = end 00118 end += 1 00119 (self.attached,) = _struct_B.unpack(str[start:end]) 00120 self.attached = bool(self.attached) 00121 return self 00122 except struct.error as e: 00123 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00124 00125 _struct_I = roslib.message.struct_I 00126 _struct_B = struct.Struct("<B") 00127 """autogenerated by genmsg_py from ArmNavSetAttachedResponse.msg. Do not edit.""" 00128 import roslib.message 00129 import struct 00130 00131 00132 class ArmNavSetAttachedResponse(roslib.message.Message): 00133 _md5sum = "7de7f4695a268566c2ce9ae9e3a34e73" 00134 _type = "srs_assisted_arm_navigation_msgs/ArmNavSetAttachedResponse" 00135 _has_header = False #flag to mark the presence of a Header object 00136 _full_text = """bool completed 00137 string msg 00138 00139 00140 """ 00141 __slots__ = ['completed','msg'] 00142 _slot_types = ['bool','string'] 00143 00144 def __init__(self, *args, **kwds): 00145 """ 00146 Constructor. Any message fields that are implicitly/explicitly 00147 set to None will be assigned a default value. The recommend 00148 use is keyword arguments as this is more robust to future message 00149 changes. You cannot mix in-order arguments and keyword arguments. 00150 00151 The available fields are: 00152 completed,msg 00153 00154 @param args: complete set of field values, in .msg order 00155 @param kwds: use keyword arguments corresponding to message field names 00156 to set specific fields. 00157 """ 00158 if args or kwds: 00159 super(ArmNavSetAttachedResponse, self).__init__(*args, **kwds) 00160 #message fields cannot be None, assign default values for those that are 00161 if self.completed is None: 00162 self.completed = False 00163 if self.msg is None: 00164 self.msg = '' 00165 else: 00166 self.completed = False 00167 self.msg = '' 00168 00169 def _get_types(self): 00170 """ 00171 internal API method 00172 """ 00173 return self._slot_types 00174 00175 def serialize(self, buff): 00176 """ 00177 serialize message into buffer 00178 @param buff: buffer 00179 @type buff: StringIO 00180 """ 00181 try: 00182 buff.write(_struct_B.pack(self.completed)) 00183 _x = self.msg 00184 length = len(_x) 00185 buff.write(struct.pack('<I%ss'%length, length, _x)) 00186 except struct.error as se: self._check_types(se) 00187 except TypeError as te: self._check_types(te) 00188 00189 def deserialize(self, str): 00190 """ 00191 unpack serialized message in str into this message instance 00192 @param str: byte array of serialized message 00193 @type str: str 00194 """ 00195 try: 00196 end = 0 00197 start = end 00198 end += 1 00199 (self.completed,) = _struct_B.unpack(str[start:end]) 00200 self.completed = bool(self.completed) 00201 start = end 00202 end += 4 00203 (length,) = _struct_I.unpack(str[start:end]) 00204 start = end 00205 end += length 00206 self.msg = str[start:end] 00207 return self 00208 except struct.error as e: 00209 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00210 00211 00212 def serialize_numpy(self, buff, numpy): 00213 """ 00214 serialize message with numpy array types into buffer 00215 @param buff: buffer 00216 @type buff: StringIO 00217 @param numpy: numpy python module 00218 @type numpy module 00219 """ 00220 try: 00221 buff.write(_struct_B.pack(self.completed)) 00222 _x = self.msg 00223 length = len(_x) 00224 buff.write(struct.pack('<I%ss'%length, length, _x)) 00225 except struct.error as se: self._check_types(se) 00226 except TypeError as te: self._check_types(te) 00227 00228 def deserialize_numpy(self, str, numpy): 00229 """ 00230 unpack serialized message in str into this message instance using numpy for array types 00231 @param str: byte array of serialized message 00232 @type str: str 00233 @param numpy: numpy python module 00234 @type numpy: module 00235 """ 00236 try: 00237 end = 0 00238 start = end 00239 end += 1 00240 (self.completed,) = _struct_B.unpack(str[start:end]) 00241 self.completed = bool(self.completed) 00242 start = end 00243 end += 4 00244 (length,) = _struct_I.unpack(str[start:end]) 00245 start = end 00246 end += length 00247 self.msg = str[start:end] 00248 return self 00249 except struct.error as e: 00250 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00251 00252 _struct_I = roslib.message.struct_I 00253 _struct_B = struct.Struct("<B") 00254 class ArmNavSetAttached(roslib.message.ServiceDefinition): 00255 _type = 'srs_assisted_arm_navigation_msgs/ArmNavSetAttached' 00256 _md5sum = 'a032bb669ab7592b282ce054d7d2ea6d' 00257 _request_class = ArmNavSetAttachedRequest 00258 _response_class = ArmNavSetAttachedResponse