$search
00001 """autogenerated by genmsg_py from DM_UIcom.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class DM_UIcom(roslib.message.Message): 00007 _md5sum = "9fdc3806df41868867572f18d50a7c34" 00008 _type = "srs_msgs/DM_UIcom" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# this message contains information to define the comunication between the Decision making (DM) and UI_Pri in case of unexpected error in executing an previously issued command 00011 00012 string command # currently supported comands for user intervention are: continue? (meaning do you want to continue:yes/no), position? (where to go:kitchen,home,order or coordinate from the map) 00013 string message # some free text to be displayed in the popup window to the user 00014 uint32 requestID # the uniqie ID used by DM to distinguish which responce corresponds to which command. Note: the requestID MUST be included in the responceID. 00015 00016 """ 00017 __slots__ = ['command','message','requestID'] 00018 _slot_types = ['string','string','uint32'] 00019 00020 def __init__(self, *args, **kwds): 00021 """ 00022 Constructor. Any message fields that are implicitly/explicitly 00023 set to None will be assigned a default value. The recommend 00024 use is keyword arguments as this is more robust to future message 00025 changes. You cannot mix in-order arguments and keyword arguments. 00026 00027 The available fields are: 00028 command,message,requestID 00029 00030 @param args: complete set of field values, in .msg order 00031 @param kwds: use keyword arguments corresponding to message field names 00032 to set specific fields. 00033 """ 00034 if args or kwds: 00035 super(DM_UIcom, self).__init__(*args, **kwds) 00036 #message fields cannot be None, assign default values for those that are 00037 if self.command is None: 00038 self.command = '' 00039 if self.message is None: 00040 self.message = '' 00041 if self.requestID is None: 00042 self.requestID = 0 00043 else: 00044 self.command = '' 00045 self.message = '' 00046 self.requestID = 0 00047 00048 def _get_types(self): 00049 """ 00050 internal API method 00051 """ 00052 return self._slot_types 00053 00054 def serialize(self, buff): 00055 """ 00056 serialize message into buffer 00057 @param buff: buffer 00058 @type buff: StringIO 00059 """ 00060 try: 00061 _x = self.command 00062 length = len(_x) 00063 buff.write(struct.pack('<I%ss'%length, length, _x)) 00064 _x = self.message 00065 length = len(_x) 00066 buff.write(struct.pack('<I%ss'%length, length, _x)) 00067 buff.write(_struct_I.pack(self.requestID)) 00068 except struct.error as se: self._check_types(se) 00069 except TypeError as te: self._check_types(te) 00070 00071 def deserialize(self, str): 00072 """ 00073 unpack serialized message in str into this message instance 00074 @param str: byte array of serialized message 00075 @type str: str 00076 """ 00077 try: 00078 end = 0 00079 start = end 00080 end += 4 00081 (length,) = _struct_I.unpack(str[start:end]) 00082 start = end 00083 end += length 00084 self.command = str[start:end] 00085 start = end 00086 end += 4 00087 (length,) = _struct_I.unpack(str[start:end]) 00088 start = end 00089 end += length 00090 self.message = str[start:end] 00091 start = end 00092 end += 4 00093 (self.requestID,) = _struct_I.unpack(str[start:end]) 00094 return self 00095 except struct.error as e: 00096 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00097 00098 00099 def serialize_numpy(self, buff, numpy): 00100 """ 00101 serialize message with numpy array types into buffer 00102 @param buff: buffer 00103 @type buff: StringIO 00104 @param numpy: numpy python module 00105 @type numpy module 00106 """ 00107 try: 00108 _x = self.command 00109 length = len(_x) 00110 buff.write(struct.pack('<I%ss'%length, length, _x)) 00111 _x = self.message 00112 length = len(_x) 00113 buff.write(struct.pack('<I%ss'%length, length, _x)) 00114 buff.write(_struct_I.pack(self.requestID)) 00115 except struct.error as se: self._check_types(se) 00116 except TypeError as te: self._check_types(te) 00117 00118 def deserialize_numpy(self, str, numpy): 00119 """ 00120 unpack serialized message in str into this message instance using numpy for array types 00121 @param str: byte array of serialized message 00122 @type str: str 00123 @param numpy: numpy python module 00124 @type numpy: module 00125 """ 00126 try: 00127 end = 0 00128 start = end 00129 end += 4 00130 (length,) = _struct_I.unpack(str[start:end]) 00131 start = end 00132 end += length 00133 self.command = str[start:end] 00134 start = end 00135 end += 4 00136 (length,) = _struct_I.unpack(str[start:end]) 00137 start = end 00138 end += length 00139 self.message = str[start:end] 00140 start = end 00141 end += 4 00142 (self.requestID,) = _struct_I.unpack(str[start:end]) 00143 return self 00144 except struct.error as e: 00145 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00146 00147 _struct_I = roslib.message.struct_I