00001 """autogenerated by genmsg_py from ScriptGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class ScriptGoal(roslib.message.Message):
00007 _md5sum = "af211056287b617497edc705175646e0"
00008 _type = "cob_script_server/ScriptGoal"
00009 _has_header = False
00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00011 #goal definition
00012 string function_name
00013 string component_name
00014 string parameter_name
00015
00016 """
00017 __slots__ = ['function_name','component_name','parameter_name']
00018 _slot_types = ['string','string','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 function_name,component_name,parameter_name
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(ScriptGoal, self).__init__(*args, **kwds)
00036
00037 if self.function_name is None:
00038 self.function_name = ''
00039 if self.component_name is None:
00040 self.component_name = ''
00041 if self.parameter_name is None:
00042 self.parameter_name = ''
00043 else:
00044 self.function_name = ''
00045 self.component_name = ''
00046 self.parameter_name = ''
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.function_name
00062 length = len(_x)
00063 buff.write(struct.pack('<I%ss'%length, length, _x))
00064 _x = self.component_name
00065 length = len(_x)
00066 buff.write(struct.pack('<I%ss'%length, length, _x))
00067 _x = self.parameter_name
00068 length = len(_x)
00069 buff.write(struct.pack('<I%ss'%length, length, _x))
00070 except struct.error, se: self._check_types(se)
00071 except TypeError, te: self._check_types(te)
00072
00073 def deserialize(self, str):
00074 """
00075 unpack serialized message in str into this message instance
00076 @param str: byte array of serialized message
00077 @type str: str
00078 """
00079 try:
00080 end = 0
00081 start = end
00082 end += 4
00083 (length,) = _struct_I.unpack(str[start:end])
00084 start = end
00085 end += length
00086 self.function_name = str[start:end]
00087 start = end
00088 end += 4
00089 (length,) = _struct_I.unpack(str[start:end])
00090 start = end
00091 end += length
00092 self.component_name = str[start:end]
00093 start = end
00094 end += 4
00095 (length,) = _struct_I.unpack(str[start:end])
00096 start = end
00097 end += length
00098 self.parameter_name = str[start:end]
00099 return self
00100 except struct.error, e:
00101 raise roslib.message.DeserializationError(e)
00102
00103
00104 def serialize_numpy(self, buff, numpy):
00105 """
00106 serialize message with numpy array types into buffer
00107 @param buff: buffer
00108 @type buff: StringIO
00109 @param numpy: numpy python module
00110 @type numpy module
00111 """
00112 try:
00113 _x = self.function_name
00114 length = len(_x)
00115 buff.write(struct.pack('<I%ss'%length, length, _x))
00116 _x = self.component_name
00117 length = len(_x)
00118 buff.write(struct.pack('<I%ss'%length, length, _x))
00119 _x = self.parameter_name
00120 length = len(_x)
00121 buff.write(struct.pack('<I%ss'%length, length, _x))
00122 except struct.error, se: self._check_types(se)
00123 except TypeError, te: self._check_types(te)
00124
00125 def deserialize_numpy(self, str, numpy):
00126 """
00127 unpack serialized message in str into this message instance using numpy for array types
00128 @param str: byte array of serialized message
00129 @type str: str
00130 @param numpy: numpy python module
00131 @type numpy: module
00132 """
00133 try:
00134 end = 0
00135 start = end
00136 end += 4
00137 (length,) = _struct_I.unpack(str[start:end])
00138 start = end
00139 end += length
00140 self.function_name = str[start:end]
00141 start = end
00142 end += 4
00143 (length,) = _struct_I.unpack(str[start:end])
00144 start = end
00145 end += length
00146 self.component_name = str[start:end]
00147 start = end
00148 end += 4
00149 (length,) = _struct_I.unpack(str[start:end])
00150 start = end
00151 end += length
00152 self.parameter_name = str[start:end]
00153 return self
00154 except struct.error, e:
00155 raise roslib.message.DeserializationError(e)
00156
00157 _struct_I = roslib.message.struct_I