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