_UpdatePosInfo.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_knowledge/UpdatePosInfoRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import geometry_msgs.msg
00008 import srs_msgs.msg
00009 
00010 class UpdatePosInfoRequest(genpy.Message):
00011   _md5sum = "c78c3aca32d4c1731c1e02b813f9a187"
00012   _type = "srs_knowledge/UpdatePosInfoRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """
00015 
00016 string objectName
00017 
00018 
00019 uint32 hhObjectID
00020 
00021 srs_msgs/SRSSpatialInfo spatialInfo
00022 
00023 
00024 
00025 
00026 string objectURI
00027 
00028 
00029 ================================================================================
00030 MSG: srs_msgs/SRSSpatialInfo
00031 # Point point
00032 # Orientation angles
00033 float32 l
00034 float32 w
00035 float32 h
00036 
00037 geometry_msgs/Pose pose
00038 
00039 ================================================================================
00040 MSG: geometry_msgs/Pose
00041 # A representation of pose in free space, composed of postion and orientation. 
00042 Point position
00043 Quaternion orientation
00044 
00045 ================================================================================
00046 MSG: geometry_msgs/Point
00047 # This contains the position of a point in free space
00048 float64 x
00049 float64 y
00050 float64 z
00051 
00052 ================================================================================
00053 MSG: geometry_msgs/Quaternion
00054 # This represents an orientation in free space in quaternion form.
00055 
00056 float64 x
00057 float64 y
00058 float64 z
00059 float64 w
00060 
00061 """
00062   __slots__ = ['objectName','hhObjectID','spatialInfo','objectURI']
00063   _slot_types = ['string','uint32','srs_msgs/SRSSpatialInfo','string']
00064 
00065   def __init__(self, *args, **kwds):
00066     """
00067     Constructor. Any message fields that are implicitly/explicitly
00068     set to None will be assigned a default value. The recommend
00069     use is keyword arguments as this is more robust to future message
00070     changes.  You cannot mix in-order arguments and keyword arguments.
00071 
00072     The available fields are:
00073        objectName,hhObjectID,spatialInfo,objectURI
00074 
00075     :param args: complete set of field values, in .msg order
00076     :param kwds: use keyword arguments corresponding to message field names
00077     to set specific fields.
00078     """
00079     if args or kwds:
00080       super(UpdatePosInfoRequest, self).__init__(*args, **kwds)
00081       #message fields cannot be None, assign default values for those that are
00082       if self.objectName is None:
00083         self.objectName = ''
00084       if self.hhObjectID is None:
00085         self.hhObjectID = 0
00086       if self.spatialInfo is None:
00087         self.spatialInfo = srs_msgs.msg.SRSSpatialInfo()
00088       if self.objectURI is None:
00089         self.objectURI = ''
00090     else:
00091       self.objectName = ''
00092       self.hhObjectID = 0
00093       self.spatialInfo = srs_msgs.msg.SRSSpatialInfo()
00094       self.objectURI = ''
00095 
00096   def _get_types(self):
00097     """
00098     internal API method
00099     """
00100     return self._slot_types
00101 
00102   def serialize(self, buff):
00103     """
00104     serialize message into buffer
00105     :param buff: buffer, ``StringIO``
00106     """
00107     try:
00108       _x = self.objectName
00109       length = len(_x)
00110       if python3 or type(_x) == unicode:
00111         _x = _x.encode('utf-8')
00112         length = len(_x)
00113       buff.write(struct.pack('<I%ss'%length, length, _x))
00114       _x = self
00115       buff.write(_struct_I3f7d.pack(_x.hhObjectID, _x.spatialInfo.l, _x.spatialInfo.w, _x.spatialInfo.h, _x.spatialInfo.pose.position.x, _x.spatialInfo.pose.position.y, _x.spatialInfo.pose.position.z, _x.spatialInfo.pose.orientation.x, _x.spatialInfo.pose.orientation.y, _x.spatialInfo.pose.orientation.z, _x.spatialInfo.pose.orientation.w))
00116       _x = self.objectURI
00117       length = len(_x)
00118       if python3 or type(_x) == unicode:
00119         _x = _x.encode('utf-8')
00120         length = len(_x)
00121       buff.write(struct.pack('<I%ss'%length, length, _x))
00122     except struct.error as se: self._check_types(se)
00123     except TypeError as te: self._check_types(te)
00124 
00125   def deserialize(self, str):
00126     """
00127     unpack serialized message in str into this message instance
00128     :param str: byte array of serialized message, ``str``
00129     """
00130     try:
00131       if self.spatialInfo is None:
00132         self.spatialInfo = srs_msgs.msg.SRSSpatialInfo()
00133       end = 0
00134       start = end
00135       end += 4
00136       (length,) = _struct_I.unpack(str[start:end])
00137       start = end
00138       end += length
00139       if python3:
00140         self.objectName = str[start:end].decode('utf-8')
00141       else:
00142         self.objectName = str[start:end]
00143       _x = self
00144       start = end
00145       end += 72
00146       (_x.hhObjectID, _x.spatialInfo.l, _x.spatialInfo.w, _x.spatialInfo.h, _x.spatialInfo.pose.position.x, _x.spatialInfo.pose.position.y, _x.spatialInfo.pose.position.z, _x.spatialInfo.pose.orientation.x, _x.spatialInfo.pose.orientation.y, _x.spatialInfo.pose.orientation.z, _x.spatialInfo.pose.orientation.w,) = _struct_I3f7d.unpack(str[start:end])
00147       start = end
00148       end += 4
00149       (length,) = _struct_I.unpack(str[start:end])
00150       start = end
00151       end += length
00152       if python3:
00153         self.objectURI = str[start:end].decode('utf-8')
00154       else:
00155         self.objectURI = str[start:end]
00156       return self
00157     except struct.error as e:
00158       raise genpy.DeserializationError(e) #most likely buffer underfill
00159 
00160 
00161   def serialize_numpy(self, buff, numpy):
00162     """
00163     serialize message with numpy array types into buffer
00164     :param buff: buffer, ``StringIO``
00165     :param numpy: numpy python module
00166     """
00167     try:
00168       _x = self.objectName
00169       length = len(_x)
00170       if python3 or type(_x) == unicode:
00171         _x = _x.encode('utf-8')
00172         length = len(_x)
00173       buff.write(struct.pack('<I%ss'%length, length, _x))
00174       _x = self
00175       buff.write(_struct_I3f7d.pack(_x.hhObjectID, _x.spatialInfo.l, _x.spatialInfo.w, _x.spatialInfo.h, _x.spatialInfo.pose.position.x, _x.spatialInfo.pose.position.y, _x.spatialInfo.pose.position.z, _x.spatialInfo.pose.orientation.x, _x.spatialInfo.pose.orientation.y, _x.spatialInfo.pose.orientation.z, _x.spatialInfo.pose.orientation.w))
00176       _x = self.objectURI
00177       length = len(_x)
00178       if python3 or type(_x) == unicode:
00179         _x = _x.encode('utf-8')
00180         length = len(_x)
00181       buff.write(struct.pack('<I%ss'%length, length, _x))
00182     except struct.error as se: self._check_types(se)
00183     except TypeError as te: self._check_types(te)
00184 
00185   def deserialize_numpy(self, str, numpy):
00186     """
00187     unpack serialized message in str into this message instance using numpy for array types
00188     :param str: byte array of serialized message, ``str``
00189     :param numpy: numpy python module
00190     """
00191     try:
00192       if self.spatialInfo is None:
00193         self.spatialInfo = srs_msgs.msg.SRSSpatialInfo()
00194       end = 0
00195       start = end
00196       end += 4
00197       (length,) = _struct_I.unpack(str[start:end])
00198       start = end
00199       end += length
00200       if python3:
00201         self.objectName = str[start:end].decode('utf-8')
00202       else:
00203         self.objectName = str[start:end]
00204       _x = self
00205       start = end
00206       end += 72
00207       (_x.hhObjectID, _x.spatialInfo.l, _x.spatialInfo.w, _x.spatialInfo.h, _x.spatialInfo.pose.position.x, _x.spatialInfo.pose.position.y, _x.spatialInfo.pose.position.z, _x.spatialInfo.pose.orientation.x, _x.spatialInfo.pose.orientation.y, _x.spatialInfo.pose.orientation.z, _x.spatialInfo.pose.orientation.w,) = _struct_I3f7d.unpack(str[start:end])
00208       start = end
00209       end += 4
00210       (length,) = _struct_I.unpack(str[start:end])
00211       start = end
00212       end += length
00213       if python3:
00214         self.objectURI = str[start:end].decode('utf-8')
00215       else:
00216         self.objectURI = str[start:end]
00217       return self
00218     except struct.error as e:
00219       raise genpy.DeserializationError(e) #most likely buffer underfill
00220 
00221 _struct_I = genpy.struct_I
00222 _struct_I3f7d = struct.Struct("<I3f7d")
00223 """autogenerated by genpy from srs_knowledge/UpdatePosInfoResponse.msg. Do not edit."""
00224 import sys
00225 python3 = True if sys.hexversion > 0x03000000 else False
00226 import genpy
00227 import struct
00228 
00229 
00230 class UpdatePosInfoResponse(genpy.Message):
00231   _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15"
00232   _type = "srs_knowledge/UpdatePosInfoResponse"
00233   _has_header = False #flag to mark the presence of a Header object
00234   _full_text = """bool success
00235 
00236 """
00237   __slots__ = ['success']
00238   _slot_types = ['bool']
00239 
00240   def __init__(self, *args, **kwds):
00241     """
00242     Constructor. Any message fields that are implicitly/explicitly
00243     set to None will be assigned a default value. The recommend
00244     use is keyword arguments as this is more robust to future message
00245     changes.  You cannot mix in-order arguments and keyword arguments.
00246 
00247     The available fields are:
00248        success
00249 
00250     :param args: complete set of field values, in .msg order
00251     :param kwds: use keyword arguments corresponding to message field names
00252     to set specific fields.
00253     """
00254     if args or kwds:
00255       super(UpdatePosInfoResponse, self).__init__(*args, **kwds)
00256       #message fields cannot be None, assign default values for those that are
00257       if self.success is None:
00258         self.success = False
00259     else:
00260       self.success = False
00261 
00262   def _get_types(self):
00263     """
00264     internal API method
00265     """
00266     return self._slot_types
00267 
00268   def serialize(self, buff):
00269     """
00270     serialize message into buffer
00271     :param buff: buffer, ``StringIO``
00272     """
00273     try:
00274       buff.write(_struct_B.pack(self.success))
00275     except struct.error as se: self._check_types(se)
00276     except TypeError as te: self._check_types(te)
00277 
00278   def deserialize(self, str):
00279     """
00280     unpack serialized message in str into this message instance
00281     :param str: byte array of serialized message, ``str``
00282     """
00283     try:
00284       end = 0
00285       start = end
00286       end += 1
00287       (self.success,) = _struct_B.unpack(str[start:end])
00288       self.success = bool(self.success)
00289       return self
00290     except struct.error as e:
00291       raise genpy.DeserializationError(e) #most likely buffer underfill
00292 
00293 
00294   def serialize_numpy(self, buff, numpy):
00295     """
00296     serialize message with numpy array types into buffer
00297     :param buff: buffer, ``StringIO``
00298     :param numpy: numpy python module
00299     """
00300     try:
00301       buff.write(_struct_B.pack(self.success))
00302     except struct.error as se: self._check_types(se)
00303     except TypeError as te: self._check_types(te)
00304 
00305   def deserialize_numpy(self, str, numpy):
00306     """
00307     unpack serialized message in str into this message instance using numpy for array types
00308     :param str: byte array of serialized message, ``str``
00309     :param numpy: numpy python module
00310     """
00311     try:
00312       end = 0
00313       start = end
00314       end += 1
00315       (self.success,) = _struct_B.unpack(str[start:end])
00316       self.success = bool(self.success)
00317       return self
00318     except struct.error as e:
00319       raise genpy.DeserializationError(e) #most likely buffer underfill
00320 
00321 _struct_I = genpy.struct_I
00322 _struct_B = struct.Struct("<B")
00323 class UpdatePosInfo(object):
00324   _type          = 'srs_knowledge/UpdatePosInfo'
00325   _md5sum = '870a2e0b3efb754b5f3e5f212cb3b217'
00326   _request_class  = UpdatePosInfoRequest
00327   _response_class = UpdatePosInfoResponse


srs_knowledge
Author(s): Ze Ji
autogenerated on Sun Jan 5 2014 12:03:27