_Implementation.py
Go to the documentation of this file.
00001 """autogenerated by genpy from concert_msgs/Implementation.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import concert_msgs.msg
00008 
00009 class Implementation(genpy.Message):
00010   _md5sum = "b164073c64b5bc2bd5e660391a1bf0f8"
00011   _type = "concert_msgs/Implementation"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """string name
00014 LinkGraph link_graph
00015 string dot_graph
00016 
00017 ================================================================================
00018 MSG: concert_msgs/LinkGraph
00019 # A list of 'named' nodes, e.g. linux.ros.robosem.rocon_teleop
00020 
00021 LinkNode[] nodes
00022 LinkConnection[] topics
00023 LinkConnection[] actions
00024 LinkEdge[] edges
00025 
00026 ================================================================================
00027 MSG: concert_msgs/LinkNode
00028 # Representation of a concert client node in the 
00029 # implementation graph
00030 
00031 # unique identifier
00032 string id
00033 # tuple representing the client node - platform.system.robot.app, e.g. linux.ros.turtlebot.turtle_stroll
00034 string tuple
00035 
00036 ================================================================================
00037 MSG: concert_msgs/LinkConnection
00038 # Representation of a topic/action node in the 
00039 # implementation graph
00040 
00041 # unique identifier
00042 string id
00043 # type of the topic, e.g. std_msgs/String
00044 string type
00045 
00046 ================================================================================
00047 MSG: concert_msgs/LinkEdge
00048 # Edge of the implementation graph. Client-Topic, or 
00049 # Topic-Client or Client-Action or Action-Client
00050 
00051 string start
00052 string finish
00053 string remap_from
00054 string remap_to
00055 """
00056   __slots__ = ['name','link_graph','dot_graph']
00057   _slot_types = ['string','concert_msgs/LinkGraph','string']
00058 
00059   def __init__(self, *args, **kwds):
00060     """
00061     Constructor. Any message fields that are implicitly/explicitly
00062     set to None will be assigned a default value. The recommend
00063     use is keyword arguments as this is more robust to future message
00064     changes.  You cannot mix in-order arguments and keyword arguments.
00065 
00066     The available fields are:
00067        name,link_graph,dot_graph
00068 
00069     :param args: complete set of field values, in .msg order
00070     :param kwds: use keyword arguments corresponding to message field names
00071     to set specific fields.
00072     """
00073     if args or kwds:
00074       super(Implementation, self).__init__(*args, **kwds)
00075       #message fields cannot be None, assign default values for those that are
00076       if self.name is None:
00077         self.name = ''
00078       if self.link_graph is None:
00079         self.link_graph = concert_msgs.msg.LinkGraph()
00080       if self.dot_graph is None:
00081         self.dot_graph = ''
00082     else:
00083       self.name = ''
00084       self.link_graph = concert_msgs.msg.LinkGraph()
00085       self.dot_graph = ''
00086 
00087   def _get_types(self):
00088     """
00089     internal API method
00090     """
00091     return self._slot_types
00092 
00093   def serialize(self, buff):
00094     """
00095     serialize message into buffer
00096     :param buff: buffer, ``StringIO``
00097     """
00098     try:
00099       _x = self.name
00100       length = len(_x)
00101       if python3 or type(_x) == unicode:
00102         _x = _x.encode('utf-8')
00103         length = len(_x)
00104       buff.write(struct.pack('<I%ss'%length, length, _x))
00105       length = len(self.link_graph.nodes)
00106       buff.write(_struct_I.pack(length))
00107       for val1 in self.link_graph.nodes:
00108         _x = val1.id
00109         length = len(_x)
00110         if python3 or type(_x) == unicode:
00111           _x = _x.encode('utf-8')
00112           length = len(_x)
00113         buff.write(struct.pack('<I%ss'%length, length, _x))
00114         _x = val1.tuple
00115         length = len(_x)
00116         if python3 or type(_x) == unicode:
00117           _x = _x.encode('utf-8')
00118           length = len(_x)
00119         buff.write(struct.pack('<I%ss'%length, length, _x))
00120       length = len(self.link_graph.topics)
00121       buff.write(_struct_I.pack(length))
00122       for val1 in self.link_graph.topics:
00123         _x = val1.id
00124         length = len(_x)
00125         if python3 or type(_x) == unicode:
00126           _x = _x.encode('utf-8')
00127           length = len(_x)
00128         buff.write(struct.pack('<I%ss'%length, length, _x))
00129         _x = val1.type
00130         length = len(_x)
00131         if python3 or type(_x) == unicode:
00132           _x = _x.encode('utf-8')
00133           length = len(_x)
00134         buff.write(struct.pack('<I%ss'%length, length, _x))
00135       length = len(self.link_graph.actions)
00136       buff.write(_struct_I.pack(length))
00137       for val1 in self.link_graph.actions:
00138         _x = val1.id
00139         length = len(_x)
00140         if python3 or type(_x) == unicode:
00141           _x = _x.encode('utf-8')
00142           length = len(_x)
00143         buff.write(struct.pack('<I%ss'%length, length, _x))
00144         _x = val1.type
00145         length = len(_x)
00146         if python3 or type(_x) == unicode:
00147           _x = _x.encode('utf-8')
00148           length = len(_x)
00149         buff.write(struct.pack('<I%ss'%length, length, _x))
00150       length = len(self.link_graph.edges)
00151       buff.write(_struct_I.pack(length))
00152       for val1 in self.link_graph.edges:
00153         _x = val1.start
00154         length = len(_x)
00155         if python3 or type(_x) == unicode:
00156           _x = _x.encode('utf-8')
00157           length = len(_x)
00158         buff.write(struct.pack('<I%ss'%length, length, _x))
00159         _x = val1.finish
00160         length = len(_x)
00161         if python3 or type(_x) == unicode:
00162           _x = _x.encode('utf-8')
00163           length = len(_x)
00164         buff.write(struct.pack('<I%ss'%length, length, _x))
00165         _x = val1.remap_from
00166         length = len(_x)
00167         if python3 or type(_x) == unicode:
00168           _x = _x.encode('utf-8')
00169           length = len(_x)
00170         buff.write(struct.pack('<I%ss'%length, length, _x))
00171         _x = val1.remap_to
00172         length = len(_x)
00173         if python3 or type(_x) == unicode:
00174           _x = _x.encode('utf-8')
00175           length = len(_x)
00176         buff.write(struct.pack('<I%ss'%length, length, _x))
00177       _x = self.dot_graph
00178       length = len(_x)
00179       if python3 or type(_x) == unicode:
00180         _x = _x.encode('utf-8')
00181         length = len(_x)
00182       buff.write(struct.pack('<I%ss'%length, length, _x))
00183     except struct.error as se: self._check_types(se)
00184     except TypeError as te: self._check_types(te)
00185 
00186   def deserialize(self, str):
00187     """
00188     unpack serialized message in str into this message instance
00189     :param str: byte array of serialized message, ``str``
00190     """
00191     try:
00192       if self.link_graph is None:
00193         self.link_graph = concert_msgs.msg.LinkGraph()
00194       end = 0
00195       start = end
00196       end += 4
00197       (length,) = _struct_I.unpack(str[start:end])
00198       start = end
00199       end += length
00200       if python3:
00201         self.name = str[start:end].decode('utf-8')
00202       else:
00203         self.name = str[start:end]
00204       start = end
00205       end += 4
00206       (length,) = _struct_I.unpack(str[start:end])
00207       self.link_graph.nodes = []
00208       for i in range(0, length):
00209         val1 = concert_msgs.msg.LinkNode()
00210         start = end
00211         end += 4
00212         (length,) = _struct_I.unpack(str[start:end])
00213         start = end
00214         end += length
00215         if python3:
00216           val1.id = str[start:end].decode('utf-8')
00217         else:
00218           val1.id = str[start:end]
00219         start = end
00220         end += 4
00221         (length,) = _struct_I.unpack(str[start:end])
00222         start = end
00223         end += length
00224         if python3:
00225           val1.tuple = str[start:end].decode('utf-8')
00226         else:
00227           val1.tuple = str[start:end]
00228         self.link_graph.nodes.append(val1)
00229       start = end
00230       end += 4
00231       (length,) = _struct_I.unpack(str[start:end])
00232       self.link_graph.topics = []
00233       for i in range(0, length):
00234         val1 = concert_msgs.msg.LinkConnection()
00235         start = end
00236         end += 4
00237         (length,) = _struct_I.unpack(str[start:end])
00238         start = end
00239         end += length
00240         if python3:
00241           val1.id = str[start:end].decode('utf-8')
00242         else:
00243           val1.id = str[start:end]
00244         start = end
00245         end += 4
00246         (length,) = _struct_I.unpack(str[start:end])
00247         start = end
00248         end += length
00249         if python3:
00250           val1.type = str[start:end].decode('utf-8')
00251         else:
00252           val1.type = str[start:end]
00253         self.link_graph.topics.append(val1)
00254       start = end
00255       end += 4
00256       (length,) = _struct_I.unpack(str[start:end])
00257       self.link_graph.actions = []
00258       for i in range(0, length):
00259         val1 = concert_msgs.msg.LinkConnection()
00260         start = end
00261         end += 4
00262         (length,) = _struct_I.unpack(str[start:end])
00263         start = end
00264         end += length
00265         if python3:
00266           val1.id = str[start:end].decode('utf-8')
00267         else:
00268           val1.id = str[start:end]
00269         start = end
00270         end += 4
00271         (length,) = _struct_I.unpack(str[start:end])
00272         start = end
00273         end += length
00274         if python3:
00275           val1.type = str[start:end].decode('utf-8')
00276         else:
00277           val1.type = str[start:end]
00278         self.link_graph.actions.append(val1)
00279       start = end
00280       end += 4
00281       (length,) = _struct_I.unpack(str[start:end])
00282       self.link_graph.edges = []
00283       for i in range(0, length):
00284         val1 = concert_msgs.msg.LinkEdge()
00285         start = end
00286         end += 4
00287         (length,) = _struct_I.unpack(str[start:end])
00288         start = end
00289         end += length
00290         if python3:
00291           val1.start = str[start:end].decode('utf-8')
00292         else:
00293           val1.start = str[start:end]
00294         start = end
00295         end += 4
00296         (length,) = _struct_I.unpack(str[start:end])
00297         start = end
00298         end += length
00299         if python3:
00300           val1.finish = str[start:end].decode('utf-8')
00301         else:
00302           val1.finish = str[start:end]
00303         start = end
00304         end += 4
00305         (length,) = _struct_I.unpack(str[start:end])
00306         start = end
00307         end += length
00308         if python3:
00309           val1.remap_from = str[start:end].decode('utf-8')
00310         else:
00311           val1.remap_from = str[start:end]
00312         start = end
00313         end += 4
00314         (length,) = _struct_I.unpack(str[start:end])
00315         start = end
00316         end += length
00317         if python3:
00318           val1.remap_to = str[start:end].decode('utf-8')
00319         else:
00320           val1.remap_to = str[start:end]
00321         self.link_graph.edges.append(val1)
00322       start = end
00323       end += 4
00324       (length,) = _struct_I.unpack(str[start:end])
00325       start = end
00326       end += length
00327       if python3:
00328         self.dot_graph = str[start:end].decode('utf-8')
00329       else:
00330         self.dot_graph = str[start:end]
00331       return self
00332     except struct.error as e:
00333       raise genpy.DeserializationError(e) #most likely buffer underfill
00334 
00335 
00336   def serialize_numpy(self, buff, numpy):
00337     """
00338     serialize message with numpy array types into buffer
00339     :param buff: buffer, ``StringIO``
00340     :param numpy: numpy python module
00341     """
00342     try:
00343       _x = self.name
00344       length = len(_x)
00345       if python3 or type(_x) == unicode:
00346         _x = _x.encode('utf-8')
00347         length = len(_x)
00348       buff.write(struct.pack('<I%ss'%length, length, _x))
00349       length = len(self.link_graph.nodes)
00350       buff.write(_struct_I.pack(length))
00351       for val1 in self.link_graph.nodes:
00352         _x = val1.id
00353         length = len(_x)
00354         if python3 or type(_x) == unicode:
00355           _x = _x.encode('utf-8')
00356           length = len(_x)
00357         buff.write(struct.pack('<I%ss'%length, length, _x))
00358         _x = val1.tuple
00359         length = len(_x)
00360         if python3 or type(_x) == unicode:
00361           _x = _x.encode('utf-8')
00362           length = len(_x)
00363         buff.write(struct.pack('<I%ss'%length, length, _x))
00364       length = len(self.link_graph.topics)
00365       buff.write(_struct_I.pack(length))
00366       for val1 in self.link_graph.topics:
00367         _x = val1.id
00368         length = len(_x)
00369         if python3 or type(_x) == unicode:
00370           _x = _x.encode('utf-8')
00371           length = len(_x)
00372         buff.write(struct.pack('<I%ss'%length, length, _x))
00373         _x = val1.type
00374         length = len(_x)
00375         if python3 or type(_x) == unicode:
00376           _x = _x.encode('utf-8')
00377           length = len(_x)
00378         buff.write(struct.pack('<I%ss'%length, length, _x))
00379       length = len(self.link_graph.actions)
00380       buff.write(_struct_I.pack(length))
00381       for val1 in self.link_graph.actions:
00382         _x = val1.id
00383         length = len(_x)
00384         if python3 or type(_x) == unicode:
00385           _x = _x.encode('utf-8')
00386           length = len(_x)
00387         buff.write(struct.pack('<I%ss'%length, length, _x))
00388         _x = val1.type
00389         length = len(_x)
00390         if python3 or type(_x) == unicode:
00391           _x = _x.encode('utf-8')
00392           length = len(_x)
00393         buff.write(struct.pack('<I%ss'%length, length, _x))
00394       length = len(self.link_graph.edges)
00395       buff.write(_struct_I.pack(length))
00396       for val1 in self.link_graph.edges:
00397         _x = val1.start
00398         length = len(_x)
00399         if python3 or type(_x) == unicode:
00400           _x = _x.encode('utf-8')
00401           length = len(_x)
00402         buff.write(struct.pack('<I%ss'%length, length, _x))
00403         _x = val1.finish
00404         length = len(_x)
00405         if python3 or type(_x) == unicode:
00406           _x = _x.encode('utf-8')
00407           length = len(_x)
00408         buff.write(struct.pack('<I%ss'%length, length, _x))
00409         _x = val1.remap_from
00410         length = len(_x)
00411         if python3 or type(_x) == unicode:
00412           _x = _x.encode('utf-8')
00413           length = len(_x)
00414         buff.write(struct.pack('<I%ss'%length, length, _x))
00415         _x = val1.remap_to
00416         length = len(_x)
00417         if python3 or type(_x) == unicode:
00418           _x = _x.encode('utf-8')
00419           length = len(_x)
00420         buff.write(struct.pack('<I%ss'%length, length, _x))
00421       _x = self.dot_graph
00422       length = len(_x)
00423       if python3 or type(_x) == unicode:
00424         _x = _x.encode('utf-8')
00425         length = len(_x)
00426       buff.write(struct.pack('<I%ss'%length, length, _x))
00427     except struct.error as se: self._check_types(se)
00428     except TypeError as te: self._check_types(te)
00429 
00430   def deserialize_numpy(self, str, numpy):
00431     """
00432     unpack serialized message in str into this message instance using numpy for array types
00433     :param str: byte array of serialized message, ``str``
00434     :param numpy: numpy python module
00435     """
00436     try:
00437       if self.link_graph is None:
00438         self.link_graph = concert_msgs.msg.LinkGraph()
00439       end = 0
00440       start = end
00441       end += 4
00442       (length,) = _struct_I.unpack(str[start:end])
00443       start = end
00444       end += length
00445       if python3:
00446         self.name = str[start:end].decode('utf-8')
00447       else:
00448         self.name = str[start:end]
00449       start = end
00450       end += 4
00451       (length,) = _struct_I.unpack(str[start:end])
00452       self.link_graph.nodes = []
00453       for i in range(0, length):
00454         val1 = concert_msgs.msg.LinkNode()
00455         start = end
00456         end += 4
00457         (length,) = _struct_I.unpack(str[start:end])
00458         start = end
00459         end += length
00460         if python3:
00461           val1.id = str[start:end].decode('utf-8')
00462         else:
00463           val1.id = str[start:end]
00464         start = end
00465         end += 4
00466         (length,) = _struct_I.unpack(str[start:end])
00467         start = end
00468         end += length
00469         if python3:
00470           val1.tuple = str[start:end].decode('utf-8')
00471         else:
00472           val1.tuple = str[start:end]
00473         self.link_graph.nodes.append(val1)
00474       start = end
00475       end += 4
00476       (length,) = _struct_I.unpack(str[start:end])
00477       self.link_graph.topics = []
00478       for i in range(0, length):
00479         val1 = concert_msgs.msg.LinkConnection()
00480         start = end
00481         end += 4
00482         (length,) = _struct_I.unpack(str[start:end])
00483         start = end
00484         end += length
00485         if python3:
00486           val1.id = str[start:end].decode('utf-8')
00487         else:
00488           val1.id = str[start:end]
00489         start = end
00490         end += 4
00491         (length,) = _struct_I.unpack(str[start:end])
00492         start = end
00493         end += length
00494         if python3:
00495           val1.type = str[start:end].decode('utf-8')
00496         else:
00497           val1.type = str[start:end]
00498         self.link_graph.topics.append(val1)
00499       start = end
00500       end += 4
00501       (length,) = _struct_I.unpack(str[start:end])
00502       self.link_graph.actions = []
00503       for i in range(0, length):
00504         val1 = concert_msgs.msg.LinkConnection()
00505         start = end
00506         end += 4
00507         (length,) = _struct_I.unpack(str[start:end])
00508         start = end
00509         end += length
00510         if python3:
00511           val1.id = str[start:end].decode('utf-8')
00512         else:
00513           val1.id = str[start:end]
00514         start = end
00515         end += 4
00516         (length,) = _struct_I.unpack(str[start:end])
00517         start = end
00518         end += length
00519         if python3:
00520           val1.type = str[start:end].decode('utf-8')
00521         else:
00522           val1.type = str[start:end]
00523         self.link_graph.actions.append(val1)
00524       start = end
00525       end += 4
00526       (length,) = _struct_I.unpack(str[start:end])
00527       self.link_graph.edges = []
00528       for i in range(0, length):
00529         val1 = concert_msgs.msg.LinkEdge()
00530         start = end
00531         end += 4
00532         (length,) = _struct_I.unpack(str[start:end])
00533         start = end
00534         end += length
00535         if python3:
00536           val1.start = str[start:end].decode('utf-8')
00537         else:
00538           val1.start = str[start:end]
00539         start = end
00540         end += 4
00541         (length,) = _struct_I.unpack(str[start:end])
00542         start = end
00543         end += length
00544         if python3:
00545           val1.finish = str[start:end].decode('utf-8')
00546         else:
00547           val1.finish = str[start:end]
00548         start = end
00549         end += 4
00550         (length,) = _struct_I.unpack(str[start:end])
00551         start = end
00552         end += length
00553         if python3:
00554           val1.remap_from = str[start:end].decode('utf-8')
00555         else:
00556           val1.remap_from = str[start:end]
00557         start = end
00558         end += 4
00559         (length,) = _struct_I.unpack(str[start:end])
00560         start = end
00561         end += length
00562         if python3:
00563           val1.remap_to = str[start:end].decode('utf-8')
00564         else:
00565           val1.remap_to = str[start:end]
00566         self.link_graph.edges.append(val1)
00567       start = end
00568       end += 4
00569       (length,) = _struct_I.unpack(str[start:end])
00570       start = end
00571       end += length
00572       if python3:
00573         self.dot_graph = str[start:end].decode('utf-8')
00574       else:
00575         self.dot_graph = str[start:end]
00576       return self
00577     except struct.error as e:
00578       raise genpy.DeserializationError(e) #most likely buffer underfill
00579 
00580 _struct_I = genpy.struct_I
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


concert_msgs
Author(s): Daniel Stonier
autogenerated on Tue Jan 15 2013 17:43:37