00001 """autogenerated by genmsg_py from ConfigGoal.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class ConfigGoal(roslib.message.Message):
00007 _md5sum = "b0eef9a05d4e829092fc2f2c3c2aad3d"
00008 _type = "interval_intersection/ConfigGoal"
00009 _has_header = False
00010 _full_text = """string[] topics
00011
00012 """
00013 __slots__ = ['topics']
00014 _slot_types = ['string[]']
00015
00016 def __init__(self, *args, **kwds):
00017 """
00018 Constructor. Any message fields that are implicitly/explicitly
00019 set to None will be assigned a default value. The recommend
00020 use is keyword arguments as this is more robust to future message
00021 changes. You cannot mix in-order arguments and keyword arguments.
00022
00023 The available fields are:
00024 topics
00025
00026 @param args: complete set of field values, in .msg order
00027 @param kwds: use keyword arguments corresponding to message field names
00028 to set specific fields.
00029 """
00030 if args or kwds:
00031 super(ConfigGoal, self).__init__(*args, **kwds)
00032
00033 if self.topics is None:
00034 self.topics = []
00035 else:
00036 self.topics = []
00037
00038 def _get_types(self):
00039 """
00040 internal API method
00041 """
00042 return self._slot_types
00043
00044 def serialize(self, buff):
00045 """
00046 serialize message into buffer
00047 @param buff: buffer
00048 @type buff: StringIO
00049 """
00050 try:
00051 length = len(self.topics)
00052 buff.write(_struct_I.pack(length))
00053 for val1 in self.topics:
00054 length = len(val1)
00055 buff.write(struct.pack('<I%ss'%length, length, val1))
00056 except struct.error, se: self._check_types(se)
00057 except TypeError, te: self._check_types(te)
00058
00059 def deserialize(self, str):
00060 """
00061 unpack serialized message in str into this message instance
00062 @param str: byte array of serialized message
00063 @type str: str
00064 """
00065 try:
00066 end = 0
00067 start = end
00068 end += 4
00069 (length,) = _struct_I.unpack(str[start:end])
00070 self.topics = []
00071 for i in xrange(0, length):
00072 start = end
00073 end += 4
00074 (length,) = _struct_I.unpack(str[start:end])
00075 start = end
00076 end += length
00077 val1 = str[start:end]
00078 self.topics.append(val1)
00079 return self
00080 except struct.error, e:
00081 raise roslib.message.DeserializationError(e)
00082
00083
00084 def serialize_numpy(self, buff, numpy):
00085 """
00086 serialize message with numpy array types into buffer
00087 @param buff: buffer
00088 @type buff: StringIO
00089 @param numpy: numpy python module
00090 @type numpy module
00091 """
00092 try:
00093 length = len(self.topics)
00094 buff.write(_struct_I.pack(length))
00095 for val1 in self.topics:
00096 length = len(val1)
00097 buff.write(struct.pack('<I%ss'%length, length, val1))
00098 except struct.error, se: self._check_types(se)
00099 except TypeError, te: self._check_types(te)
00100
00101 def deserialize_numpy(self, str, numpy):
00102 """
00103 unpack serialized message in str into this message instance using numpy for array types
00104 @param str: byte array of serialized message
00105 @type str: str
00106 @param numpy: numpy python module
00107 @type numpy: module
00108 """
00109 try:
00110 end = 0
00111 start = end
00112 end += 4
00113 (length,) = _struct_I.unpack(str[start:end])
00114 self.topics = []
00115 for i in xrange(0, length):
00116 start = end
00117 end += 4
00118 (length,) = _struct_I.unpack(str[start:end])
00119 start = end
00120 end += length
00121 val1 = str[start:end]
00122 self.topics.append(val1)
00123 return self
00124 except struct.error, e:
00125 raise roslib.message.DeserializationError(e)
00126
00127 _struct_I = roslib.message.struct_I