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