Go to the documentation of this file.00001 """autogenerated by genpy from cram_plan_actionserver/ExecutePlanGoal.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class ExecutePlanGoal(genpy.Message):
00009 _md5sum = "8679d31415ef7c28c2943d328e5cf58b"
00010 _type = "cram_plan_actionserver/ExecutePlanGoal"
00011 _has_header = False
00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 string plan
00014 string[] parameters
00015
00016 """
00017 __slots__ = ['plan','parameters']
00018 _slot_types = ['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 plan,parameters
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(ExecutePlanGoal, self).__init__(*args, **kwds)
00036
00037 if self.plan is None:
00038 self.plan = ''
00039 if self.parameters is None:
00040 self.parameters = []
00041 else:
00042 self.plan = ''
00043 self.parameters = []
00044
00045 def _get_types(self):
00046 """
00047 internal API method
00048 """
00049 return self._slot_types
00050
00051 def serialize(self, buff):
00052 """
00053 serialize message into buffer
00054 :param buff: buffer, ``StringIO``
00055 """
00056 try:
00057 _x = self.plan
00058 length = len(_x)
00059 if python3 or type(_x) == unicode:
00060 _x = _x.encode('utf-8')
00061 length = len(_x)
00062 buff.write(struct.pack('<I%ss'%length, length, _x))
00063 length = len(self.parameters)
00064 buff.write(_struct_I.pack(length))
00065 for val1 in self.parameters:
00066 length = len(val1)
00067 if python3 or type(val1) == unicode:
00068 val1 = val1.encode('utf-8')
00069 length = len(val1)
00070 buff.write(struct.pack('<I%ss'%length, length, val1))
00071 except struct.error as se: self._check_types(se)
00072 except TypeError as te: self._check_types(te)
00073
00074 def deserialize(self, str):
00075 """
00076 unpack serialized message in str into this message instance
00077 :param str: byte array of serialized message, ``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 if python3:
00087 self.plan = str[start:end].decode('utf-8')
00088 else:
00089 self.plan = str[start:end]
00090 start = end
00091 end += 4
00092 (length,) = _struct_I.unpack(str[start:end])
00093 self.parameters = []
00094 for i in range(0, length):
00095 start = end
00096 end += 4
00097 (length,) = _struct_I.unpack(str[start:end])
00098 start = end
00099 end += length
00100 if python3:
00101 val1 = str[start:end].decode('utf-8')
00102 else:
00103 val1 = str[start:end]
00104 self.parameters.append(val1)
00105 return self
00106 except struct.error as e:
00107 raise genpy.DeserializationError(e)
00108
00109
00110 def serialize_numpy(self, buff, numpy):
00111 """
00112 serialize message with numpy array types into buffer
00113 :param buff: buffer, ``StringIO``
00114 :param numpy: numpy python module
00115 """
00116 try:
00117 _x = self.plan
00118 length = len(_x)
00119 if python3 or type(_x) == unicode:
00120 _x = _x.encode('utf-8')
00121 length = len(_x)
00122 buff.write(struct.pack('<I%ss'%length, length, _x))
00123 length = len(self.parameters)
00124 buff.write(_struct_I.pack(length))
00125 for val1 in self.parameters:
00126 length = len(val1)
00127 if python3 or type(val1) == unicode:
00128 val1 = val1.encode('utf-8')
00129 length = len(val1)
00130 buff.write(struct.pack('<I%ss'%length, length, val1))
00131 except struct.error as se: self._check_types(se)
00132 except TypeError as te: self._check_types(te)
00133
00134 def deserialize_numpy(self, str, numpy):
00135 """
00136 unpack serialized message in str into this message instance using numpy for array types
00137 :param str: byte array of serialized message, ``str``
00138 :param numpy: numpy python module
00139 """
00140 try:
00141 end = 0
00142 start = end
00143 end += 4
00144 (length,) = _struct_I.unpack(str[start:end])
00145 start = end
00146 end += length
00147 if python3:
00148 self.plan = str[start:end].decode('utf-8')
00149 else:
00150 self.plan = str[start:end]
00151 start = end
00152 end += 4
00153 (length,) = _struct_I.unpack(str[start:end])
00154 self.parameters = []
00155 for i in range(0, length):
00156 start = end
00157 end += 4
00158 (length,) = _struct_I.unpack(str[start:end])
00159 start = end
00160 end += length
00161 if python3:
00162 val1 = str[start:end].decode('utf-8')
00163 else:
00164 val1 = str[start:end]
00165 self.parameters.append(val1)
00166 return self
00167 except struct.error as e:
00168 raise genpy.DeserializationError(e)
00169
00170 _struct_I = genpy.struct_I