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