00001 """autogenerated by genmsg_py from MatchRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006
00007 class MatchRequest(roslib.message.Message):
00008 _md5sum = "84d365d08d5fc49dde870daba1c7992c"
00009 _type = "kidnapped_robot/MatchRequest"
00010 _has_header = False
00011 _full_text = """time stamp # Time stamp of stereo pair to match against the database
00012
00013 """
00014 __slots__ = ['stamp']
00015 _slot_types = ['time']
00016
00017 def __init__(self, *args, **kwds):
00018 """
00019 Constructor. Any message fields that are implicitly/explicitly
00020 set to None will be assigned a default value. The recommend
00021 use is keyword arguments as this is more robust to future message
00022 changes. You cannot mix in-order arguments and keyword arguments.
00023
00024 The available fields are:
00025 stamp
00026
00027 @param args: complete set of field values, in .msg order
00028 @param kwds: use keyword arguments corresponding to message field names
00029 to set specific fields.
00030 """
00031 if args or kwds:
00032 super(MatchRequest, self).__init__(*args, **kwds)
00033
00034 if self.stamp is None:
00035 self.stamp = roslib.rostime.Time()
00036 else:
00037 self.stamp = roslib.rostime.Time()
00038
00039 def _get_types(self):
00040 """
00041 internal API method
00042 """
00043 return self._slot_types
00044
00045 def serialize(self, buff):
00046 """
00047 serialize message into buffer
00048 @param buff: buffer
00049 @type buff: StringIO
00050 """
00051 try:
00052 _x = self
00053 buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs))
00054 except struct.error, se: self._check_types(se)
00055 except TypeError, te: self._check_types(te)
00056
00057 def deserialize(self, str):
00058 """
00059 unpack serialized message in str into this message instance
00060 @param str: byte array of serialized message
00061 @type str: str
00062 """
00063 try:
00064 if self.stamp is None:
00065 self.stamp = roslib.rostime.Time()
00066 end = 0
00067 _x = self
00068 start = end
00069 end += 8
00070 (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00071 self.stamp.canon()
00072 return self
00073 except struct.error, e:
00074 raise roslib.message.DeserializationError(e)
00075
00076
00077 def serialize_numpy(self, buff, numpy):
00078 """
00079 serialize message with numpy array types into buffer
00080 @param buff: buffer
00081 @type buff: StringIO
00082 @param numpy: numpy python module
00083 @type numpy module
00084 """
00085 try:
00086 _x = self
00087 buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs))
00088 except struct.error, se: self._check_types(se)
00089 except TypeError, te: self._check_types(te)
00090
00091 def deserialize_numpy(self, str, numpy):
00092 """
00093 unpack serialized message in str into this message instance using numpy for array types
00094 @param str: byte array of serialized message
00095 @type str: str
00096 @param numpy: numpy python module
00097 @type numpy: module
00098 """
00099 try:
00100 if self.stamp is None:
00101 self.stamp = roslib.rostime.Time()
00102 end = 0
00103 _x = self
00104 start = end
00105 end += 8
00106 (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00107 self.stamp.canon()
00108 return self
00109 except struct.error, e:
00110 raise roslib.message.DeserializationError(e)
00111
00112 _struct_I = roslib.message.struct_I
00113 _struct_2I = struct.Struct("<2I")