$search
00001 """autogenerated by genmsg_py from StringsFeedback.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class StringsFeedback(roslib.message.Message): 00007 _md5sum = "35f7fc7955c0cdf0cd377d8ba989b61c" 00008 _type = "cogman_msgs/StringsFeedback" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 #feedback 00012 string rightnow 00013 00014 00015 """ 00016 __slots__ = ['rightnow'] 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 rightnow 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(StringsFeedback, self).__init__(*args, **kwds) 00035 #message fields cannot be None, assign default values for those that are 00036 if self.rightnow is None: 00037 self.rightnow = '' 00038 else: 00039 self.rightnow = '' 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.rightnow 00055 length = len(_x) 00056 buff.write(struct.pack('<I%ss'%length, length, _x)) 00057 except struct.error as se: self._check_types(se) 00058 except TypeError as 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.rightnow = str[start:end] 00074 return self 00075 except struct.error as e: 00076 raise roslib.message.DeserializationError(e) #most likely buffer underfill 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.rightnow 00089 length = len(_x) 00090 buff.write(struct.pack('<I%ss'%length, length, _x)) 00091 except struct.error as se: self._check_types(se) 00092 except TypeError as 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.rightnow = str[start:end] 00110 return self 00111 except struct.error as e: 00112 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00113 00114 _struct_I = roslib.message.struct_I