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