$search
00001 """autogenerated by genmsg_py from TopicLoggerResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class TopicLoggerResult(roslib.message.Message): 00007 _md5sum = "d8f288c73d2dfcebb5e4fb8a1eb85278" 00008 _type = "topic_logger/TopicLoggerResult" 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 #result definition 00012 string downloadURL 00013 string target_filename 00014 00015 """ 00016 __slots__ = ['downloadURL','target_filename'] 00017 _slot_types = ['string','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 downloadURL,target_filename 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(TopicLoggerResult, self).__init__(*args, **kwds) 00035 #message fields cannot be None, assign default values for those that are 00036 if self.downloadURL is None: 00037 self.downloadURL = '' 00038 if self.target_filename is None: 00039 self.target_filename = '' 00040 else: 00041 self.downloadURL = '' 00042 self.target_filename = '' 00043 00044 def _get_types(self): 00045 """ 00046 internal API method 00047 """ 00048 return self._slot_types 00049 00050 def serialize(self, buff): 00051 """ 00052 serialize message into buffer 00053 @param buff: buffer 00054 @type buff: StringIO 00055 """ 00056 try: 00057 _x = self.downloadURL 00058 length = len(_x) 00059 buff.write(struct.pack('<I%ss'%length, length, _x)) 00060 _x = self.target_filename 00061 length = len(_x) 00062 buff.write(struct.pack('<I%ss'%length, length, _x)) 00063 except struct.error as se: self._check_types(se) 00064 except TypeError as te: self._check_types(te) 00065 00066 def deserialize(self, str): 00067 """ 00068 unpack serialized message in str into this message instance 00069 @param str: byte array of serialized message 00070 @type str: str 00071 """ 00072 try: 00073 end = 0 00074 start = end 00075 end += 4 00076 (length,) = _struct_I.unpack(str[start:end]) 00077 start = end 00078 end += length 00079 self.downloadURL = str[start:end] 00080 start = end 00081 end += 4 00082 (length,) = _struct_I.unpack(str[start:end]) 00083 start = end 00084 end += length 00085 self.target_filename = str[start:end] 00086 return self 00087 except struct.error as e: 00088 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00089 00090 00091 def serialize_numpy(self, buff, numpy): 00092 """ 00093 serialize message with numpy array types into buffer 00094 @param buff: buffer 00095 @type buff: StringIO 00096 @param numpy: numpy python module 00097 @type numpy module 00098 """ 00099 try: 00100 _x = self.downloadURL 00101 length = len(_x) 00102 buff.write(struct.pack('<I%ss'%length, length, _x)) 00103 _x = self.target_filename 00104 length = len(_x) 00105 buff.write(struct.pack('<I%ss'%length, length, _x)) 00106 except struct.error as se: self._check_types(se) 00107 except TypeError as te: self._check_types(te) 00108 00109 def deserialize_numpy(self, str, numpy): 00110 """ 00111 unpack serialized message in str into this message instance using numpy for array types 00112 @param str: byte array of serialized message 00113 @type str: str 00114 @param numpy: numpy python module 00115 @type numpy: module 00116 """ 00117 try: 00118 end = 0 00119 start = end 00120 end += 4 00121 (length,) = _struct_I.unpack(str[start:end]) 00122 start = end 00123 end += length 00124 self.downloadURL = str[start:end] 00125 start = end 00126 end += 4 00127 (length,) = _struct_I.unpack(str[start:end]) 00128 start = end 00129 end += length 00130 self.target_filename = str[start:end] 00131 return self 00132 except struct.error as e: 00133 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00134 00135 _struct_I = roslib.message.struct_I