$search
00001 """autogenerated by genmsg_py from TestRequestGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 00007 class TestRequestGoal(roslib.message.Message): 00008 _md5sum = "db5d00ba98302d6c6dd3737e9a03ceea" 00009 _type = "actionlib/TestRequestGoal" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00012 int32 TERMINATE_SUCCESS = 0 00013 int32 TERMINATE_ABORTED = 1 00014 int32 TERMINATE_REJECTED = 2 00015 int32 TERMINATE_LOSE = 3 00016 int32 TERMINATE_DROP = 4 00017 int32 TERMINATE_EXCEPTION = 5 00018 int32 terminate_status 00019 bool ignore_cancel # If true, ignores requests to cancel 00020 string result_text 00021 int32 the_result # Desired value for the_result in the Result 00022 bool is_simple_client 00023 duration delay_accept # Delays accepting the goal by this amount of time 00024 duration delay_terminate # Delays terminating for this amount of time 00025 duration pause_status # Pauses the status messages for this amount of time 00026 00027 """ 00028 # Pseudo-constants 00029 TERMINATE_SUCCESS = 0 00030 TERMINATE_ABORTED = 1 00031 TERMINATE_REJECTED = 2 00032 TERMINATE_LOSE = 3 00033 TERMINATE_DROP = 4 00034 TERMINATE_EXCEPTION = 5 00035 00036 __slots__ = ['terminate_status','ignore_cancel','result_text','the_result','is_simple_client','delay_accept','delay_terminate','pause_status'] 00037 _slot_types = ['int32','bool','string','int32','bool','duration','duration','duration'] 00038 00039 def __init__(self, *args, **kwds): 00040 """ 00041 Constructor. Any message fields that are implicitly/explicitly 00042 set to None will be assigned a default value. The recommend 00043 use is keyword arguments as this is more robust to future message 00044 changes. You cannot mix in-order arguments and keyword arguments. 00045 00046 The available fields are: 00047 terminate_status,ignore_cancel,result_text,the_result,is_simple_client,delay_accept,delay_terminate,pause_status 00048 00049 @param args: complete set of field values, in .msg order 00050 @param kwds: use keyword arguments corresponding to message field names 00051 to set specific fields. 00052 """ 00053 if args or kwds: 00054 super(TestRequestGoal, self).__init__(*args, **kwds) 00055 #message fields cannot be None, assign default values for those that are 00056 if self.terminate_status is None: 00057 self.terminate_status = 0 00058 if self.ignore_cancel is None: 00059 self.ignore_cancel = False 00060 if self.result_text is None: 00061 self.result_text = '' 00062 if self.the_result is None: 00063 self.the_result = 0 00064 if self.is_simple_client is None: 00065 self.is_simple_client = False 00066 if self.delay_accept is None: 00067 self.delay_accept = roslib.rostime.Duration() 00068 if self.delay_terminate is None: 00069 self.delay_terminate = roslib.rostime.Duration() 00070 if self.pause_status is None: 00071 self.pause_status = roslib.rostime.Duration() 00072 else: 00073 self.terminate_status = 0 00074 self.ignore_cancel = False 00075 self.result_text = '' 00076 self.the_result = 0 00077 self.is_simple_client = False 00078 self.delay_accept = roslib.rostime.Duration() 00079 self.delay_terminate = roslib.rostime.Duration() 00080 self.pause_status = roslib.rostime.Duration() 00081 00082 def _get_types(self): 00083 """ 00084 internal API method 00085 """ 00086 return self._slot_types 00087 00088 def serialize(self, buff): 00089 """ 00090 serialize message into buffer 00091 @param buff: buffer 00092 @type buff: StringIO 00093 """ 00094 try: 00095 _x = self 00096 buff.write(_struct_iB.pack(_x.terminate_status, _x.ignore_cancel)) 00097 _x = self.result_text 00098 length = len(_x) 00099 buff.write(struct.pack('<I%ss'%length, length, _x)) 00100 _x = self 00101 buff.write(_struct_iB6i.pack(_x.the_result, _x.is_simple_client, _x.delay_accept.secs, _x.delay_accept.nsecs, _x.delay_terminate.secs, _x.delay_terminate.nsecs, _x.pause_status.secs, _x.pause_status.nsecs)) 00102 except struct.error as se: self._check_types(se) 00103 except TypeError as te: self._check_types(te) 00104 00105 def deserialize(self, str): 00106 """ 00107 unpack serialized message in str into this message instance 00108 @param str: byte array of serialized message 00109 @type str: str 00110 """ 00111 try: 00112 if self.delay_accept is None: 00113 self.delay_accept = roslib.rostime.Duration() 00114 if self.delay_terminate is None: 00115 self.delay_terminate = roslib.rostime.Duration() 00116 if self.pause_status is None: 00117 self.pause_status = roslib.rostime.Duration() 00118 end = 0 00119 _x = self 00120 start = end 00121 end += 5 00122 (_x.terminate_status, _x.ignore_cancel,) = _struct_iB.unpack(str[start:end]) 00123 self.ignore_cancel = bool(self.ignore_cancel) 00124 start = end 00125 end += 4 00126 (length,) = _struct_I.unpack(str[start:end]) 00127 start = end 00128 end += length 00129 self.result_text = str[start:end] 00130 _x = self 00131 start = end 00132 end += 29 00133 (_x.the_result, _x.is_simple_client, _x.delay_accept.secs, _x.delay_accept.nsecs, _x.delay_terminate.secs, _x.delay_terminate.nsecs, _x.pause_status.secs, _x.pause_status.nsecs,) = _struct_iB6i.unpack(str[start:end]) 00134 self.is_simple_client = bool(self.is_simple_client) 00135 self.delay_accept.canon() 00136 self.delay_terminate.canon() 00137 self.pause_status.canon() 00138 return self 00139 except struct.error as e: 00140 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00141 00142 00143 def serialize_numpy(self, buff, numpy): 00144 """ 00145 serialize message with numpy array types into buffer 00146 @param buff: buffer 00147 @type buff: StringIO 00148 @param numpy: numpy python module 00149 @type numpy module 00150 """ 00151 try: 00152 _x = self 00153 buff.write(_struct_iB.pack(_x.terminate_status, _x.ignore_cancel)) 00154 _x = self.result_text 00155 length = len(_x) 00156 buff.write(struct.pack('<I%ss'%length, length, _x)) 00157 _x = self 00158 buff.write(_struct_iB6i.pack(_x.the_result, _x.is_simple_client, _x.delay_accept.secs, _x.delay_accept.nsecs, _x.delay_terminate.secs, _x.delay_terminate.nsecs, _x.pause_status.secs, _x.pause_status.nsecs)) 00159 except struct.error as se: self._check_types(se) 00160 except TypeError as te: self._check_types(te) 00161 00162 def deserialize_numpy(self, str, numpy): 00163 """ 00164 unpack serialized message in str into this message instance using numpy for array types 00165 @param str: byte array of serialized message 00166 @type str: str 00167 @param numpy: numpy python module 00168 @type numpy: module 00169 """ 00170 try: 00171 if self.delay_accept is None: 00172 self.delay_accept = roslib.rostime.Duration() 00173 if self.delay_terminate is None: 00174 self.delay_terminate = roslib.rostime.Duration() 00175 if self.pause_status is None: 00176 self.pause_status = roslib.rostime.Duration() 00177 end = 0 00178 _x = self 00179 start = end 00180 end += 5 00181 (_x.terminate_status, _x.ignore_cancel,) = _struct_iB.unpack(str[start:end]) 00182 self.ignore_cancel = bool(self.ignore_cancel) 00183 start = end 00184 end += 4 00185 (length,) = _struct_I.unpack(str[start:end]) 00186 start = end 00187 end += length 00188 self.result_text = str[start:end] 00189 _x = self 00190 start = end 00191 end += 29 00192 (_x.the_result, _x.is_simple_client, _x.delay_accept.secs, _x.delay_accept.nsecs, _x.delay_terminate.secs, _x.delay_terminate.nsecs, _x.pause_status.secs, _x.pause_status.nsecs,) = _struct_iB6i.unpack(str[start:end]) 00193 self.is_simple_client = bool(self.is_simple_client) 00194 self.delay_accept.canon() 00195 self.delay_terminate.canon() 00196 self.pause_status.canon() 00197 return self 00198 except struct.error as e: 00199 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00200 00201 _struct_I = roslib.message.struct_I 00202 _struct_iB6i = struct.Struct("<iB6i") 00203 _struct_iB = struct.Struct("<iB")