00001 """autogenerated by genpy from concert_msgs/LinkEdge.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 LinkEdge(genpy.Message):
00009 _md5sum = "01f86ee3e51dd78d2e2153a94d6f3865"
00010 _type = "concert_msgs/LinkEdge"
00011 _has_header = False
00012 _full_text = """# Edge of the implementation graph. Client-Topic, or
00013 # Topic-Client or Client-Action or Action-Client
00014
00015 string start
00016 string finish
00017 string remap_from
00018 string remap_to
00019 """
00020 __slots__ = ['start','finish','remap_from','remap_to']
00021 _slot_types = ['string','string','string','string']
00022
00023 def __init__(self, *args, **kwds):
00024 """
00025 Constructor. Any message fields that are implicitly/explicitly
00026 set to None will be assigned a default value. The recommend
00027 use is keyword arguments as this is more robust to future message
00028 changes. You cannot mix in-order arguments and keyword arguments.
00029
00030 The available fields are:
00031 start,finish,remap_from,remap_to
00032
00033 :param args: complete set of field values, in .msg order
00034 :param kwds: use keyword arguments corresponding to message field names
00035 to set specific fields.
00036 """
00037 if args or kwds:
00038 super(LinkEdge, self).__init__(*args, **kwds)
00039
00040 if self.start is None:
00041 self.start = ''
00042 if self.finish is None:
00043 self.finish = ''
00044 if self.remap_from is None:
00045 self.remap_from = ''
00046 if self.remap_to is None:
00047 self.remap_to = ''
00048 else:
00049 self.start = ''
00050 self.finish = ''
00051 self.remap_from = ''
00052 self.remap_to = ''
00053
00054 def _get_types(self):
00055 """
00056 internal API method
00057 """
00058 return self._slot_types
00059
00060 def serialize(self, buff):
00061 """
00062 serialize message into buffer
00063 :param buff: buffer, ``StringIO``
00064 """
00065 try:
00066 _x = self.start
00067 length = len(_x)
00068 if python3 or type(_x) == unicode:
00069 _x = _x.encode('utf-8')
00070 length = len(_x)
00071 buff.write(struct.pack('<I%ss'%length, length, _x))
00072 _x = self.finish
00073 length = len(_x)
00074 if python3 or type(_x) == unicode:
00075 _x = _x.encode('utf-8')
00076 length = len(_x)
00077 buff.write(struct.pack('<I%ss'%length, length, _x))
00078 _x = self.remap_from
00079 length = len(_x)
00080 if python3 or type(_x) == unicode:
00081 _x = _x.encode('utf-8')
00082 length = len(_x)
00083 buff.write(struct.pack('<I%ss'%length, length, _x))
00084 _x = self.remap_to
00085 length = len(_x)
00086 if python3 or type(_x) == unicode:
00087 _x = _x.encode('utf-8')
00088 length = len(_x)
00089 buff.write(struct.pack('<I%ss'%length, length, _x))
00090 except struct.error as se: self._check_types(se)
00091 except TypeError as te: self._check_types(te)
00092
00093 def deserialize(self, str):
00094 """
00095 unpack serialized message in str into this message instance
00096 :param str: byte array of serialized message, ``str``
00097 """
00098 try:
00099 end = 0
00100 start = end
00101 end += 4
00102 (length,) = _struct_I.unpack(str[start:end])
00103 start = end
00104 end += length
00105 if python3:
00106 self.start = str[start:end].decode('utf-8')
00107 else:
00108 self.start = str[start:end]
00109 start = end
00110 end += 4
00111 (length,) = _struct_I.unpack(str[start:end])
00112 start = end
00113 end += length
00114 if python3:
00115 self.finish = str[start:end].decode('utf-8')
00116 else:
00117 self.finish = str[start:end]
00118 start = end
00119 end += 4
00120 (length,) = _struct_I.unpack(str[start:end])
00121 start = end
00122 end += length
00123 if python3:
00124 self.remap_from = str[start:end].decode('utf-8')
00125 else:
00126 self.remap_from = str[start:end]
00127 start = end
00128 end += 4
00129 (length,) = _struct_I.unpack(str[start:end])
00130 start = end
00131 end += length
00132 if python3:
00133 self.remap_to = str[start:end].decode('utf-8')
00134 else:
00135 self.remap_to = str[start:end]
00136 return self
00137 except struct.error as e:
00138 raise genpy.DeserializationError(e)
00139
00140
00141 def serialize_numpy(self, buff, numpy):
00142 """
00143 serialize message with numpy array types into buffer
00144 :param buff: buffer, ``StringIO``
00145 :param numpy: numpy python module
00146 """
00147 try:
00148 _x = self.start
00149 length = len(_x)
00150 if python3 or type(_x) == unicode:
00151 _x = _x.encode('utf-8')
00152 length = len(_x)
00153 buff.write(struct.pack('<I%ss'%length, length, _x))
00154 _x = self.finish
00155 length = len(_x)
00156 if python3 or type(_x) == unicode:
00157 _x = _x.encode('utf-8')
00158 length = len(_x)
00159 buff.write(struct.pack('<I%ss'%length, length, _x))
00160 _x = self.remap_from
00161 length = len(_x)
00162 if python3 or type(_x) == unicode:
00163 _x = _x.encode('utf-8')
00164 length = len(_x)
00165 buff.write(struct.pack('<I%ss'%length, length, _x))
00166 _x = self.remap_to
00167 length = len(_x)
00168 if python3 or type(_x) == unicode:
00169 _x = _x.encode('utf-8')
00170 length = len(_x)
00171 buff.write(struct.pack('<I%ss'%length, length, _x))
00172 except struct.error as se: self._check_types(se)
00173 except TypeError as te: self._check_types(te)
00174
00175 def deserialize_numpy(self, str, numpy):
00176 """
00177 unpack serialized message in str into this message instance using numpy for array types
00178 :param str: byte array of serialized message, ``str``
00179 :param numpy: numpy python module
00180 """
00181 try:
00182 end = 0
00183 start = end
00184 end += 4
00185 (length,) = _struct_I.unpack(str[start:end])
00186 start = end
00187 end += length
00188 if python3:
00189 self.start = str[start:end].decode('utf-8')
00190 else:
00191 self.start = str[start:end]
00192 start = end
00193 end += 4
00194 (length,) = _struct_I.unpack(str[start:end])
00195 start = end
00196 end += length
00197 if python3:
00198 self.finish = str[start:end].decode('utf-8')
00199 else:
00200 self.finish = str[start:end]
00201 start = end
00202 end += 4
00203 (length,) = _struct_I.unpack(str[start:end])
00204 start = end
00205 end += length
00206 if python3:
00207 self.remap_from = str[start:end].decode('utf-8')
00208 else:
00209 self.remap_from = str[start:end]
00210 start = end
00211 end += 4
00212 (length,) = _struct_I.unpack(str[start:end])
00213 start = end
00214 end += length
00215 if python3:
00216 self.remap_to = str[start:end].decode('utf-8')
00217 else:
00218 self.remap_to = str[start:end]
00219 return self
00220 except struct.error as e:
00221 raise genpy.DeserializationError(e)
00222
00223 _struct_I = genpy.struct_I