00001 """autogenerated by genmsg_py from UserCommandFeedback.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class UserCommandFeedback(roslib.message.Message):
00007 _md5sum = "4fe5af303955c287688e7347e9b00278"
00008 _type = "pr2_interactive_object_detection/UserCommandFeedback"
00009 _has_header = False
00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00011 #feedback in the form of a status string
00012 string status
00013
00014
00015 """
00016 __slots__ = ['status']
00017 _slot_types = ['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 status
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(UserCommandFeedback, self).__init__(*args, **kwds)
00035
00036 if self.status is None:
00037 self.status = ''
00038 else:
00039 self.status = ''
00040
00041 def _get_types(self):
00042 """
00043 internal API method
00044 """
00045 return self._slot_types
00046
00047 def serialize(self, buff):
00048 """
00049 serialize message into buffer
00050 @param buff: buffer
00051 @type buff: StringIO
00052 """
00053 try:
00054 _x = self.status
00055 length = len(_x)
00056 buff.write(struct.pack('<I%ss'%length, length, _x))
00057 except struct.error, se: self._check_types(se)
00058 except TypeError, te: self._check_types(te)
00059
00060 def deserialize(self, str):
00061 """
00062 unpack serialized message in str into this message instance
00063 @param str: byte array of serialized message
00064 @type str: str
00065 """
00066 try:
00067 end = 0
00068 start = end
00069 end += 4
00070 (length,) = _struct_I.unpack(str[start:end])
00071 start = end
00072 end += length
00073 self.status = str[start:end]
00074 return self
00075 except struct.error, e:
00076 raise roslib.message.DeserializationError(e)
00077
00078
00079 def serialize_numpy(self, buff, numpy):
00080 """
00081 serialize message with numpy array types into buffer
00082 @param buff: buffer
00083 @type buff: StringIO
00084 @param numpy: numpy python module
00085 @type numpy module
00086 """
00087 try:
00088 _x = self.status
00089 length = len(_x)
00090 buff.write(struct.pack('<I%ss'%length, length, _x))
00091 except struct.error, se: self._check_types(se)
00092 except TypeError, te: self._check_types(te)
00093
00094 def deserialize_numpy(self, str, numpy):
00095 """
00096 unpack serialized message in str into this message instance using numpy for array types
00097 @param str: byte array of serialized message
00098 @type str: str
00099 @param numpy: numpy python module
00100 @type numpy: module
00101 """
00102 try:
00103 end = 0
00104 start = end
00105 end += 4
00106 (length,) = _struct_I.unpack(str[start:end])
00107 start = end
00108 end += length
00109 self.status = str[start:end]
00110 return self
00111 except struct.error, e:
00112 raise roslib.message.DeserializationError(e)
00113
00114 _struct_I = roslib.message.struct_I