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