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