_GatewayInfo.py
Go to the documentation of this file.
00001 """autogenerated by genpy from gateway_comms/GatewayInfoRequest.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 GatewayInfoRequest(genpy.Message):
00009   _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010   _type = "gateway_comms/GatewayInfoRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 """
00014   __slots__ = []
00015   _slot_types = []
00016 
00017   def __init__(self, *args, **kwds):
00018     """
00019     Constructor. Any message fields that are implicitly/explicitly
00020     set to None will be assigned a default value. The recommend
00021     use is keyword arguments as this is more robust to future message
00022     changes.  You cannot mix in-order arguments and keyword arguments.
00023 
00024     The available fields are:
00025        
00026 
00027     :param args: complete set of field values, in .msg order
00028     :param kwds: use keyword arguments corresponding to message field names
00029     to set specific fields.
00030     """
00031     if args or kwds:
00032       super(GatewayInfoRequest, self).__init__(*args, **kwds)
00033 
00034   def _get_types(self):
00035     """
00036     internal API method
00037     """
00038     return self._slot_types
00039 
00040   def serialize(self, buff):
00041     """
00042     serialize message into buffer
00043     :param buff: buffer, ``StringIO``
00044     """
00045     try:
00046       pass
00047     except struct.error as se: self._check_types(se)
00048     except TypeError as te: self._check_types(te)
00049 
00050   def deserialize(self, str):
00051     """
00052     unpack serialized message in str into this message instance
00053     :param str: byte array of serialized message, ``str``
00054     """
00055     try:
00056       end = 0
00057       return self
00058     except struct.error as e:
00059       raise genpy.DeserializationError(e) #most likely buffer underfill
00060 
00061 
00062   def serialize_numpy(self, buff, numpy):
00063     """
00064     serialize message with numpy array types into buffer
00065     :param buff: buffer, ``StringIO``
00066     :param numpy: numpy python module
00067     """
00068     try:
00069       pass
00070     except struct.error as se: self._check_types(se)
00071     except TypeError as te: self._check_types(te)
00072 
00073   def deserialize_numpy(self, str, numpy):
00074     """
00075     unpack serialized message in str into this message instance using numpy for array types
00076     :param str: byte array of serialized message, ``str``
00077     :param numpy: numpy python module
00078     """
00079     try:
00080       end = 0
00081       return self
00082     except struct.error as e:
00083       raise genpy.DeserializationError(e) #most likely buffer underfill
00084 
00085 _struct_I = genpy.struct_I
00086 """autogenerated by genpy from gateway_comms/GatewayInfoResponse.msg. Do not edit."""
00087 import sys
00088 python3 = True if sys.hexversion > 0x03000000 else False
00089 import genpy
00090 import struct
00091 
00092 import gateway_comms.msg
00093 
00094 class GatewayInfoResponse(genpy.Message):
00095   _md5sum = "edc5eb8189dbcdfeda797d1a085d5665"
00096   _type = "gateway_comms/GatewayInfoResponse"
00097   _has_header = False #flag to mark the presence of a Header object
00098   _full_text = """
00099 
00100 string name
00101 bool connected
00102 string hub_name
00103 bool firewall
00104 
00105 
00106 
00107 Rule[] public_watchlist
00108 Rule[] public_interface
00109 
00110 
00111 
00112 RemoteRule[] flipped_connections
00113 RemoteRule[] flip_watchlist
00114 RemoteRule[] flipped_in_connections
00115 
00116 
00117 
00118 RemoteRule[] pull_watchlist
00119 RemoteRule[] pulled_connections
00120 
00121 
00122 
00123 ================================================================================
00124 MSG: gateway_comms/Rule
00125 # Standard gateway connection rule
00126 
00127 # type of connection (from gateway_comms.msg.Connection)
00128 string type
00129 
00130 # this is the topic/service name or the action base name (a regex is supported)
00131 string name 
00132 
00133 # (optional) an optional node name can be provided. if node name is not provided
00134 # then all nodes are matched (also supports regex)
00135 string node
00136 
00137 ================================================================================
00138 MSG: gateway_comms/RemoteRule
00139 # Definition for a flip. It represents either:
00140 #
00141 # 1) an existing flipped connection (from the local gateway)
00142 # 2) a rule that is put on a watchlist
00143 
00144 # The target recipient of the flip
00145 string gateway
00146 
00147 # Connection has the following parameters that need setting
00148 # - name : fully qualified name of the connection (str)
00149 # - type : connection type (str)
00150 #  
00151 # Use one of the types defined in Connection string constants:
00152 #     (publisher, subscriber, service, action_client, action_server)
00153 #
00154 # - node : name of the node it originates from (str)(optional)
00155 #
00156 # Node name is necessary, for instance, if you have multiple subscribers
00157 # publishing to a single topic. Most of the time it is not necessary,
00158 # but in some cases it helps refine the rule. It helps refine the rule.
00159 #
00160 Rule rule
00161 
00162 """
00163   __slots__ = ['name','connected','hub_name','firewall','public_watchlist','public_interface','flipped_connections','flip_watchlist','flipped_in_connections','pull_watchlist','pulled_connections']
00164   _slot_types = ['string','bool','string','bool','gateway_comms/Rule[]','gateway_comms/Rule[]','gateway_comms/RemoteRule[]','gateway_comms/RemoteRule[]','gateway_comms/RemoteRule[]','gateway_comms/RemoteRule[]','gateway_comms/RemoteRule[]']
00165 
00166   def __init__(self, *args, **kwds):
00167     """
00168     Constructor. Any message fields that are implicitly/explicitly
00169     set to None will be assigned a default value. The recommend
00170     use is keyword arguments as this is more robust to future message
00171     changes.  You cannot mix in-order arguments and keyword arguments.
00172 
00173     The available fields are:
00174        name,connected,hub_name,firewall,public_watchlist,public_interface,flipped_connections,flip_watchlist,flipped_in_connections,pull_watchlist,pulled_connections
00175 
00176     :param args: complete set of field values, in .msg order
00177     :param kwds: use keyword arguments corresponding to message field names
00178     to set specific fields.
00179     """
00180     if args or kwds:
00181       super(GatewayInfoResponse, self).__init__(*args, **kwds)
00182       #message fields cannot be None, assign default values for those that are
00183       if self.name is None:
00184         self.name = ''
00185       if self.connected is None:
00186         self.connected = False
00187       if self.hub_name is None:
00188         self.hub_name = ''
00189       if self.firewall is None:
00190         self.firewall = False
00191       if self.public_watchlist is None:
00192         self.public_watchlist = []
00193       if self.public_interface is None:
00194         self.public_interface = []
00195       if self.flipped_connections is None:
00196         self.flipped_connections = []
00197       if self.flip_watchlist is None:
00198         self.flip_watchlist = []
00199       if self.flipped_in_connections is None:
00200         self.flipped_in_connections = []
00201       if self.pull_watchlist is None:
00202         self.pull_watchlist = []
00203       if self.pulled_connections is None:
00204         self.pulled_connections = []
00205     else:
00206       self.name = ''
00207       self.connected = False
00208       self.hub_name = ''
00209       self.firewall = False
00210       self.public_watchlist = []
00211       self.public_interface = []
00212       self.flipped_connections = []
00213       self.flip_watchlist = []
00214       self.flipped_in_connections = []
00215       self.pull_watchlist = []
00216       self.pulled_connections = []
00217 
00218   def _get_types(self):
00219     """
00220     internal API method
00221     """
00222     return self._slot_types
00223 
00224   def serialize(self, buff):
00225     """
00226     serialize message into buffer
00227     :param buff: buffer, ``StringIO``
00228     """
00229     try:
00230       _x = self.name
00231       length = len(_x)
00232       if python3 or type(_x) == unicode:
00233         _x = _x.encode('utf-8')
00234         length = len(_x)
00235       buff.write(struct.pack('<I%ss'%length, length, _x))
00236       buff.write(_struct_B.pack(self.connected))
00237       _x = self.hub_name
00238       length = len(_x)
00239       if python3 or type(_x) == unicode:
00240         _x = _x.encode('utf-8')
00241         length = len(_x)
00242       buff.write(struct.pack('<I%ss'%length, length, _x))
00243       buff.write(_struct_B.pack(self.firewall))
00244       length = len(self.public_watchlist)
00245       buff.write(_struct_I.pack(length))
00246       for val1 in self.public_watchlist:
00247         _x = val1.type
00248         length = len(_x)
00249         if python3 or type(_x) == unicode:
00250           _x = _x.encode('utf-8')
00251           length = len(_x)
00252         buff.write(struct.pack('<I%ss'%length, length, _x))
00253         _x = val1.name
00254         length = len(_x)
00255         if python3 or type(_x) == unicode:
00256           _x = _x.encode('utf-8')
00257           length = len(_x)
00258         buff.write(struct.pack('<I%ss'%length, length, _x))
00259         _x = val1.node
00260         length = len(_x)
00261         if python3 or type(_x) == unicode:
00262           _x = _x.encode('utf-8')
00263           length = len(_x)
00264         buff.write(struct.pack('<I%ss'%length, length, _x))
00265       length = len(self.public_interface)
00266       buff.write(_struct_I.pack(length))
00267       for val1 in self.public_interface:
00268         _x = val1.type
00269         length = len(_x)
00270         if python3 or type(_x) == unicode:
00271           _x = _x.encode('utf-8')
00272           length = len(_x)
00273         buff.write(struct.pack('<I%ss'%length, length, _x))
00274         _x = val1.name
00275         length = len(_x)
00276         if python3 or type(_x) == unicode:
00277           _x = _x.encode('utf-8')
00278           length = len(_x)
00279         buff.write(struct.pack('<I%ss'%length, length, _x))
00280         _x = val1.node
00281         length = len(_x)
00282         if python3 or type(_x) == unicode:
00283           _x = _x.encode('utf-8')
00284           length = len(_x)
00285         buff.write(struct.pack('<I%ss'%length, length, _x))
00286       length = len(self.flipped_connections)
00287       buff.write(_struct_I.pack(length))
00288       for val1 in self.flipped_connections:
00289         _x = val1.gateway
00290         length = len(_x)
00291         if python3 or type(_x) == unicode:
00292           _x = _x.encode('utf-8')
00293           length = len(_x)
00294         buff.write(struct.pack('<I%ss'%length, length, _x))
00295         _v1 = val1.rule
00296         _x = _v1.type
00297         length = len(_x)
00298         if python3 or type(_x) == unicode:
00299           _x = _x.encode('utf-8')
00300           length = len(_x)
00301         buff.write(struct.pack('<I%ss'%length, length, _x))
00302         _x = _v1.name
00303         length = len(_x)
00304         if python3 or type(_x) == unicode:
00305           _x = _x.encode('utf-8')
00306           length = len(_x)
00307         buff.write(struct.pack('<I%ss'%length, length, _x))
00308         _x = _v1.node
00309         length = len(_x)
00310         if python3 or type(_x) == unicode:
00311           _x = _x.encode('utf-8')
00312           length = len(_x)
00313         buff.write(struct.pack('<I%ss'%length, length, _x))
00314       length = len(self.flip_watchlist)
00315       buff.write(_struct_I.pack(length))
00316       for val1 in self.flip_watchlist:
00317         _x = val1.gateway
00318         length = len(_x)
00319         if python3 or type(_x) == unicode:
00320           _x = _x.encode('utf-8')
00321           length = len(_x)
00322         buff.write(struct.pack('<I%ss'%length, length, _x))
00323         _v2 = val1.rule
00324         _x = _v2.type
00325         length = len(_x)
00326         if python3 or type(_x) == unicode:
00327           _x = _x.encode('utf-8')
00328           length = len(_x)
00329         buff.write(struct.pack('<I%ss'%length, length, _x))
00330         _x = _v2.name
00331         length = len(_x)
00332         if python3 or type(_x) == unicode:
00333           _x = _x.encode('utf-8')
00334           length = len(_x)
00335         buff.write(struct.pack('<I%ss'%length, length, _x))
00336         _x = _v2.node
00337         length = len(_x)
00338         if python3 or type(_x) == unicode:
00339           _x = _x.encode('utf-8')
00340           length = len(_x)
00341         buff.write(struct.pack('<I%ss'%length, length, _x))
00342       length = len(self.flipped_in_connections)
00343       buff.write(_struct_I.pack(length))
00344       for val1 in self.flipped_in_connections:
00345         _x = val1.gateway
00346         length = len(_x)
00347         if python3 or type(_x) == unicode:
00348           _x = _x.encode('utf-8')
00349           length = len(_x)
00350         buff.write(struct.pack('<I%ss'%length, length, _x))
00351         _v3 = val1.rule
00352         _x = _v3.type
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 = _v3.name
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         _x = _v3.node
00365         length = len(_x)
00366         if python3 or type(_x) == unicode:
00367           _x = _x.encode('utf-8')
00368           length = len(_x)
00369         buff.write(struct.pack('<I%ss'%length, length, _x))
00370       length = len(self.pull_watchlist)
00371       buff.write(_struct_I.pack(length))
00372       for val1 in self.pull_watchlist:
00373         _x = val1.gateway
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         _v4 = val1.rule
00380         _x = _v4.type
00381         length = len(_x)
00382         if python3 or type(_x) == unicode:
00383           _x = _x.encode('utf-8')
00384           length = len(_x)
00385         buff.write(struct.pack('<I%ss'%length, length, _x))
00386         _x = _v4.name
00387         length = len(_x)
00388         if python3 or type(_x) == unicode:
00389           _x = _x.encode('utf-8')
00390           length = len(_x)
00391         buff.write(struct.pack('<I%ss'%length, length, _x))
00392         _x = _v4.node
00393         length = len(_x)
00394         if python3 or type(_x) == unicode:
00395           _x = _x.encode('utf-8')
00396           length = len(_x)
00397         buff.write(struct.pack('<I%ss'%length, length, _x))
00398       length = len(self.pulled_connections)
00399       buff.write(_struct_I.pack(length))
00400       for val1 in self.pulled_connections:
00401         _x = val1.gateway
00402         length = len(_x)
00403         if python3 or type(_x) == unicode:
00404           _x = _x.encode('utf-8')
00405           length = len(_x)
00406         buff.write(struct.pack('<I%ss'%length, length, _x))
00407         _v5 = val1.rule
00408         _x = _v5.type
00409         length = len(_x)
00410         if python3 or type(_x) == unicode:
00411           _x = _x.encode('utf-8')
00412           length = len(_x)
00413         buff.write(struct.pack('<I%ss'%length, length, _x))
00414         _x = _v5.name
00415         length = len(_x)
00416         if python3 or type(_x) == unicode:
00417           _x = _x.encode('utf-8')
00418           length = len(_x)
00419         buff.write(struct.pack('<I%ss'%length, length, _x))
00420         _x = _v5.node
00421         length = len(_x)
00422         if python3 or type(_x) == unicode:
00423           _x = _x.encode('utf-8')
00424           length = len(_x)
00425         buff.write(struct.pack('<I%ss'%length, length, _x))
00426     except struct.error as se: self._check_types(se)
00427     except TypeError as te: self._check_types(te)
00428 
00429   def deserialize(self, str):
00430     """
00431     unpack serialized message in str into this message instance
00432     :param str: byte array of serialized message, ``str``
00433     """
00434     try:
00435       if self.public_watchlist is None:
00436         self.public_watchlist = None
00437       if self.public_interface is None:
00438         self.public_interface = None
00439       if self.flipped_connections is None:
00440         self.flipped_connections = None
00441       if self.flip_watchlist is None:
00442         self.flip_watchlist = None
00443       if self.flipped_in_connections is None:
00444         self.flipped_in_connections = None
00445       if self.pull_watchlist is None:
00446         self.pull_watchlist = None
00447       if self.pulled_connections is None:
00448         self.pulled_connections = None
00449       end = 0
00450       start = end
00451       end += 4
00452       (length,) = _struct_I.unpack(str[start:end])
00453       start = end
00454       end += length
00455       if python3:
00456         self.name = str[start:end].decode('utf-8')
00457       else:
00458         self.name = str[start:end]
00459       start = end
00460       end += 1
00461       (self.connected,) = _struct_B.unpack(str[start:end])
00462       self.connected = bool(self.connected)
00463       start = end
00464       end += 4
00465       (length,) = _struct_I.unpack(str[start:end])
00466       start = end
00467       end += length
00468       if python3:
00469         self.hub_name = str[start:end].decode('utf-8')
00470       else:
00471         self.hub_name = str[start:end]
00472       start = end
00473       end += 1
00474       (self.firewall,) = _struct_B.unpack(str[start:end])
00475       self.firewall = bool(self.firewall)
00476       start = end
00477       end += 4
00478       (length,) = _struct_I.unpack(str[start:end])
00479       self.public_watchlist = []
00480       for i in range(0, length):
00481         val1 = gateway_comms.msg.Rule()
00482         start = end
00483         end += 4
00484         (length,) = _struct_I.unpack(str[start:end])
00485         start = end
00486         end += length
00487         if python3:
00488           val1.type = str[start:end].decode('utf-8')
00489         else:
00490           val1.type = str[start:end]
00491         start = end
00492         end += 4
00493         (length,) = _struct_I.unpack(str[start:end])
00494         start = end
00495         end += length
00496         if python3:
00497           val1.name = str[start:end].decode('utf-8')
00498         else:
00499           val1.name = str[start:end]
00500         start = end
00501         end += 4
00502         (length,) = _struct_I.unpack(str[start:end])
00503         start = end
00504         end += length
00505         if python3:
00506           val1.node = str[start:end].decode('utf-8')
00507         else:
00508           val1.node = str[start:end]
00509         self.public_watchlist.append(val1)
00510       start = end
00511       end += 4
00512       (length,) = _struct_I.unpack(str[start:end])
00513       self.public_interface = []
00514       for i in range(0, length):
00515         val1 = gateway_comms.msg.Rule()
00516         start = end
00517         end += 4
00518         (length,) = _struct_I.unpack(str[start:end])
00519         start = end
00520         end += length
00521         if python3:
00522           val1.type = str[start:end].decode('utf-8')
00523         else:
00524           val1.type = str[start:end]
00525         start = end
00526         end += 4
00527         (length,) = _struct_I.unpack(str[start:end])
00528         start = end
00529         end += length
00530         if python3:
00531           val1.name = str[start:end].decode('utf-8')
00532         else:
00533           val1.name = str[start:end]
00534         start = end
00535         end += 4
00536         (length,) = _struct_I.unpack(str[start:end])
00537         start = end
00538         end += length
00539         if python3:
00540           val1.node = str[start:end].decode('utf-8')
00541         else:
00542           val1.node = str[start:end]
00543         self.public_interface.append(val1)
00544       start = end
00545       end += 4
00546       (length,) = _struct_I.unpack(str[start:end])
00547       self.flipped_connections = []
00548       for i in range(0, length):
00549         val1 = gateway_comms.msg.RemoteRule()
00550         start = end
00551         end += 4
00552         (length,) = _struct_I.unpack(str[start:end])
00553         start = end
00554         end += length
00555         if python3:
00556           val1.gateway = str[start:end].decode('utf-8')
00557         else:
00558           val1.gateway = str[start:end]
00559         _v6 = val1.rule
00560         start = end
00561         end += 4
00562         (length,) = _struct_I.unpack(str[start:end])
00563         start = end
00564         end += length
00565         if python3:
00566           _v6.type = str[start:end].decode('utf-8')
00567         else:
00568           _v6.type = str[start:end]
00569         start = end
00570         end += 4
00571         (length,) = _struct_I.unpack(str[start:end])
00572         start = end
00573         end += length
00574         if python3:
00575           _v6.name = str[start:end].decode('utf-8')
00576         else:
00577           _v6.name = str[start:end]
00578         start = end
00579         end += 4
00580         (length,) = _struct_I.unpack(str[start:end])
00581         start = end
00582         end += length
00583         if python3:
00584           _v6.node = str[start:end].decode('utf-8')
00585         else:
00586           _v6.node = str[start:end]
00587         self.flipped_connections.append(val1)
00588       start = end
00589       end += 4
00590       (length,) = _struct_I.unpack(str[start:end])
00591       self.flip_watchlist = []
00592       for i in range(0, length):
00593         val1 = gateway_comms.msg.RemoteRule()
00594         start = end
00595         end += 4
00596         (length,) = _struct_I.unpack(str[start:end])
00597         start = end
00598         end += length
00599         if python3:
00600           val1.gateway = str[start:end].decode('utf-8')
00601         else:
00602           val1.gateway = str[start:end]
00603         _v7 = val1.rule
00604         start = end
00605         end += 4
00606         (length,) = _struct_I.unpack(str[start:end])
00607         start = end
00608         end += length
00609         if python3:
00610           _v7.type = str[start:end].decode('utf-8')
00611         else:
00612           _v7.type = str[start:end]
00613         start = end
00614         end += 4
00615         (length,) = _struct_I.unpack(str[start:end])
00616         start = end
00617         end += length
00618         if python3:
00619           _v7.name = str[start:end].decode('utf-8')
00620         else:
00621           _v7.name = str[start:end]
00622         start = end
00623         end += 4
00624         (length,) = _struct_I.unpack(str[start:end])
00625         start = end
00626         end += length
00627         if python3:
00628           _v7.node = str[start:end].decode('utf-8')
00629         else:
00630           _v7.node = str[start:end]
00631         self.flip_watchlist.append(val1)
00632       start = end
00633       end += 4
00634       (length,) = _struct_I.unpack(str[start:end])
00635       self.flipped_in_connections = []
00636       for i in range(0, length):
00637         val1 = gateway_comms.msg.RemoteRule()
00638         start = end
00639         end += 4
00640         (length,) = _struct_I.unpack(str[start:end])
00641         start = end
00642         end += length
00643         if python3:
00644           val1.gateway = str[start:end].decode('utf-8')
00645         else:
00646           val1.gateway = str[start:end]
00647         _v8 = val1.rule
00648         start = end
00649         end += 4
00650         (length,) = _struct_I.unpack(str[start:end])
00651         start = end
00652         end += length
00653         if python3:
00654           _v8.type = str[start:end].decode('utf-8')
00655         else:
00656           _v8.type = str[start:end]
00657         start = end
00658         end += 4
00659         (length,) = _struct_I.unpack(str[start:end])
00660         start = end
00661         end += length
00662         if python3:
00663           _v8.name = str[start:end].decode('utf-8')
00664         else:
00665           _v8.name = str[start:end]
00666         start = end
00667         end += 4
00668         (length,) = _struct_I.unpack(str[start:end])
00669         start = end
00670         end += length
00671         if python3:
00672           _v8.node = str[start:end].decode('utf-8')
00673         else:
00674           _v8.node = str[start:end]
00675         self.flipped_in_connections.append(val1)
00676       start = end
00677       end += 4
00678       (length,) = _struct_I.unpack(str[start:end])
00679       self.pull_watchlist = []
00680       for i in range(0, length):
00681         val1 = gateway_comms.msg.RemoteRule()
00682         start = end
00683         end += 4
00684         (length,) = _struct_I.unpack(str[start:end])
00685         start = end
00686         end += length
00687         if python3:
00688           val1.gateway = str[start:end].decode('utf-8')
00689         else:
00690           val1.gateway = str[start:end]
00691         _v9 = val1.rule
00692         start = end
00693         end += 4
00694         (length,) = _struct_I.unpack(str[start:end])
00695         start = end
00696         end += length
00697         if python3:
00698           _v9.type = str[start:end].decode('utf-8')
00699         else:
00700           _v9.type = str[start:end]
00701         start = end
00702         end += 4
00703         (length,) = _struct_I.unpack(str[start:end])
00704         start = end
00705         end += length
00706         if python3:
00707           _v9.name = str[start:end].decode('utf-8')
00708         else:
00709           _v9.name = str[start:end]
00710         start = end
00711         end += 4
00712         (length,) = _struct_I.unpack(str[start:end])
00713         start = end
00714         end += length
00715         if python3:
00716           _v9.node = str[start:end].decode('utf-8')
00717         else:
00718           _v9.node = str[start:end]
00719         self.pull_watchlist.append(val1)
00720       start = end
00721       end += 4
00722       (length,) = _struct_I.unpack(str[start:end])
00723       self.pulled_connections = []
00724       for i in range(0, length):
00725         val1 = gateway_comms.msg.RemoteRule()
00726         start = end
00727         end += 4
00728         (length,) = _struct_I.unpack(str[start:end])
00729         start = end
00730         end += length
00731         if python3:
00732           val1.gateway = str[start:end].decode('utf-8')
00733         else:
00734           val1.gateway = str[start:end]
00735         _v10 = val1.rule
00736         start = end
00737         end += 4
00738         (length,) = _struct_I.unpack(str[start:end])
00739         start = end
00740         end += length
00741         if python3:
00742           _v10.type = str[start:end].decode('utf-8')
00743         else:
00744           _v10.type = str[start:end]
00745         start = end
00746         end += 4
00747         (length,) = _struct_I.unpack(str[start:end])
00748         start = end
00749         end += length
00750         if python3:
00751           _v10.name = str[start:end].decode('utf-8')
00752         else:
00753           _v10.name = str[start:end]
00754         start = end
00755         end += 4
00756         (length,) = _struct_I.unpack(str[start:end])
00757         start = end
00758         end += length
00759         if python3:
00760           _v10.node = str[start:end].decode('utf-8')
00761         else:
00762           _v10.node = str[start:end]
00763         self.pulled_connections.append(val1)
00764       return self
00765     except struct.error as e:
00766       raise genpy.DeserializationError(e) #most likely buffer underfill
00767 
00768 
00769   def serialize_numpy(self, buff, numpy):
00770     """
00771     serialize message with numpy array types into buffer
00772     :param buff: buffer, ``StringIO``
00773     :param numpy: numpy python module
00774     """
00775     try:
00776       _x = self.name
00777       length = len(_x)
00778       if python3 or type(_x) == unicode:
00779         _x = _x.encode('utf-8')
00780         length = len(_x)
00781       buff.write(struct.pack('<I%ss'%length, length, _x))
00782       buff.write(_struct_B.pack(self.connected))
00783       _x = self.hub_name
00784       length = len(_x)
00785       if python3 or type(_x) == unicode:
00786         _x = _x.encode('utf-8')
00787         length = len(_x)
00788       buff.write(struct.pack('<I%ss'%length, length, _x))
00789       buff.write(_struct_B.pack(self.firewall))
00790       length = len(self.public_watchlist)
00791       buff.write(_struct_I.pack(length))
00792       for val1 in self.public_watchlist:
00793         _x = val1.type
00794         length = len(_x)
00795         if python3 or type(_x) == unicode:
00796           _x = _x.encode('utf-8')
00797           length = len(_x)
00798         buff.write(struct.pack('<I%ss'%length, length, _x))
00799         _x = val1.name
00800         length = len(_x)
00801         if python3 or type(_x) == unicode:
00802           _x = _x.encode('utf-8')
00803           length = len(_x)
00804         buff.write(struct.pack('<I%ss'%length, length, _x))
00805         _x = val1.node
00806         length = len(_x)
00807         if python3 or type(_x) == unicode:
00808           _x = _x.encode('utf-8')
00809           length = len(_x)
00810         buff.write(struct.pack('<I%ss'%length, length, _x))
00811       length = len(self.public_interface)
00812       buff.write(_struct_I.pack(length))
00813       for val1 in self.public_interface:
00814         _x = val1.type
00815         length = len(_x)
00816         if python3 or type(_x) == unicode:
00817           _x = _x.encode('utf-8')
00818           length = len(_x)
00819         buff.write(struct.pack('<I%ss'%length, length, _x))
00820         _x = val1.name
00821         length = len(_x)
00822         if python3 or type(_x) == unicode:
00823           _x = _x.encode('utf-8')
00824           length = len(_x)
00825         buff.write(struct.pack('<I%ss'%length, length, _x))
00826         _x = val1.node
00827         length = len(_x)
00828         if python3 or type(_x) == unicode:
00829           _x = _x.encode('utf-8')
00830           length = len(_x)
00831         buff.write(struct.pack('<I%ss'%length, length, _x))
00832       length = len(self.flipped_connections)
00833       buff.write(_struct_I.pack(length))
00834       for val1 in self.flipped_connections:
00835         _x = val1.gateway
00836         length = len(_x)
00837         if python3 or type(_x) == unicode:
00838           _x = _x.encode('utf-8')
00839           length = len(_x)
00840         buff.write(struct.pack('<I%ss'%length, length, _x))
00841         _v11 = val1.rule
00842         _x = _v11.type
00843         length = len(_x)
00844         if python3 or type(_x) == unicode:
00845           _x = _x.encode('utf-8')
00846           length = len(_x)
00847         buff.write(struct.pack('<I%ss'%length, length, _x))
00848         _x = _v11.name
00849         length = len(_x)
00850         if python3 or type(_x) == unicode:
00851           _x = _x.encode('utf-8')
00852           length = len(_x)
00853         buff.write(struct.pack('<I%ss'%length, length, _x))
00854         _x = _v11.node
00855         length = len(_x)
00856         if python3 or type(_x) == unicode:
00857           _x = _x.encode('utf-8')
00858           length = len(_x)
00859         buff.write(struct.pack('<I%ss'%length, length, _x))
00860       length = len(self.flip_watchlist)
00861       buff.write(_struct_I.pack(length))
00862       for val1 in self.flip_watchlist:
00863         _x = val1.gateway
00864         length = len(_x)
00865         if python3 or type(_x) == unicode:
00866           _x = _x.encode('utf-8')
00867           length = len(_x)
00868         buff.write(struct.pack('<I%ss'%length, length, _x))
00869         _v12 = val1.rule
00870         _x = _v12.type
00871         length = len(_x)
00872         if python3 or type(_x) == unicode:
00873           _x = _x.encode('utf-8')
00874           length = len(_x)
00875         buff.write(struct.pack('<I%ss'%length, length, _x))
00876         _x = _v12.name
00877         length = len(_x)
00878         if python3 or type(_x) == unicode:
00879           _x = _x.encode('utf-8')
00880           length = len(_x)
00881         buff.write(struct.pack('<I%ss'%length, length, _x))
00882         _x = _v12.node
00883         length = len(_x)
00884         if python3 or type(_x) == unicode:
00885           _x = _x.encode('utf-8')
00886           length = len(_x)
00887         buff.write(struct.pack('<I%ss'%length, length, _x))
00888       length = len(self.flipped_in_connections)
00889       buff.write(_struct_I.pack(length))
00890       for val1 in self.flipped_in_connections:
00891         _x = val1.gateway
00892         length = len(_x)
00893         if python3 or type(_x) == unicode:
00894           _x = _x.encode('utf-8')
00895           length = len(_x)
00896         buff.write(struct.pack('<I%ss'%length, length, _x))
00897         _v13 = val1.rule
00898         _x = _v13.type
00899         length = len(_x)
00900         if python3 or type(_x) == unicode:
00901           _x = _x.encode('utf-8')
00902           length = len(_x)
00903         buff.write(struct.pack('<I%ss'%length, length, _x))
00904         _x = _v13.name
00905         length = len(_x)
00906         if python3 or type(_x) == unicode:
00907           _x = _x.encode('utf-8')
00908           length = len(_x)
00909         buff.write(struct.pack('<I%ss'%length, length, _x))
00910         _x = _v13.node
00911         length = len(_x)
00912         if python3 or type(_x) == unicode:
00913           _x = _x.encode('utf-8')
00914           length = len(_x)
00915         buff.write(struct.pack('<I%ss'%length, length, _x))
00916       length = len(self.pull_watchlist)
00917       buff.write(_struct_I.pack(length))
00918       for val1 in self.pull_watchlist:
00919         _x = val1.gateway
00920         length = len(_x)
00921         if python3 or type(_x) == unicode:
00922           _x = _x.encode('utf-8')
00923           length = len(_x)
00924         buff.write(struct.pack('<I%ss'%length, length, _x))
00925         _v14 = val1.rule
00926         _x = _v14.type
00927         length = len(_x)
00928         if python3 or type(_x) == unicode:
00929           _x = _x.encode('utf-8')
00930           length = len(_x)
00931         buff.write(struct.pack('<I%ss'%length, length, _x))
00932         _x = _v14.name
00933         length = len(_x)
00934         if python3 or type(_x) == unicode:
00935           _x = _x.encode('utf-8')
00936           length = len(_x)
00937         buff.write(struct.pack('<I%ss'%length, length, _x))
00938         _x = _v14.node
00939         length = len(_x)
00940         if python3 or type(_x) == unicode:
00941           _x = _x.encode('utf-8')
00942           length = len(_x)
00943         buff.write(struct.pack('<I%ss'%length, length, _x))
00944       length = len(self.pulled_connections)
00945       buff.write(_struct_I.pack(length))
00946       for val1 in self.pulled_connections:
00947         _x = val1.gateway
00948         length = len(_x)
00949         if python3 or type(_x) == unicode:
00950           _x = _x.encode('utf-8')
00951           length = len(_x)
00952         buff.write(struct.pack('<I%ss'%length, length, _x))
00953         _v15 = val1.rule
00954         _x = _v15.type
00955         length = len(_x)
00956         if python3 or type(_x) == unicode:
00957           _x = _x.encode('utf-8')
00958           length = len(_x)
00959         buff.write(struct.pack('<I%ss'%length, length, _x))
00960         _x = _v15.name
00961         length = len(_x)
00962         if python3 or type(_x) == unicode:
00963           _x = _x.encode('utf-8')
00964           length = len(_x)
00965         buff.write(struct.pack('<I%ss'%length, length, _x))
00966         _x = _v15.node
00967         length = len(_x)
00968         if python3 or type(_x) == unicode:
00969           _x = _x.encode('utf-8')
00970           length = len(_x)
00971         buff.write(struct.pack('<I%ss'%length, length, _x))
00972     except struct.error as se: self._check_types(se)
00973     except TypeError as te: self._check_types(te)
00974 
00975   def deserialize_numpy(self, str, numpy):
00976     """
00977     unpack serialized message in str into this message instance using numpy for array types
00978     :param str: byte array of serialized message, ``str``
00979     :param numpy: numpy python module
00980     """
00981     try:
00982       if self.public_watchlist is None:
00983         self.public_watchlist = None
00984       if self.public_interface is None:
00985         self.public_interface = None
00986       if self.flipped_connections is None:
00987         self.flipped_connections = None
00988       if self.flip_watchlist is None:
00989         self.flip_watchlist = None
00990       if self.flipped_in_connections is None:
00991         self.flipped_in_connections = None
00992       if self.pull_watchlist is None:
00993         self.pull_watchlist = None
00994       if self.pulled_connections is None:
00995         self.pulled_connections = None
00996       end = 0
00997       start = end
00998       end += 4
00999       (length,) = _struct_I.unpack(str[start:end])
01000       start = end
01001       end += length
01002       if python3:
01003         self.name = str[start:end].decode('utf-8')
01004       else:
01005         self.name = str[start:end]
01006       start = end
01007       end += 1
01008       (self.connected,) = _struct_B.unpack(str[start:end])
01009       self.connected = bool(self.connected)
01010       start = end
01011       end += 4
01012       (length,) = _struct_I.unpack(str[start:end])
01013       start = end
01014       end += length
01015       if python3:
01016         self.hub_name = str[start:end].decode('utf-8')
01017       else:
01018         self.hub_name = str[start:end]
01019       start = end
01020       end += 1
01021       (self.firewall,) = _struct_B.unpack(str[start:end])
01022       self.firewall = bool(self.firewall)
01023       start = end
01024       end += 4
01025       (length,) = _struct_I.unpack(str[start:end])
01026       self.public_watchlist = []
01027       for i in range(0, length):
01028         val1 = gateway_comms.msg.Rule()
01029         start = end
01030         end += 4
01031         (length,) = _struct_I.unpack(str[start:end])
01032         start = end
01033         end += length
01034         if python3:
01035           val1.type = str[start:end].decode('utf-8')
01036         else:
01037           val1.type = str[start:end]
01038         start = end
01039         end += 4
01040         (length,) = _struct_I.unpack(str[start:end])
01041         start = end
01042         end += length
01043         if python3:
01044           val1.name = str[start:end].decode('utf-8')
01045         else:
01046           val1.name = str[start:end]
01047         start = end
01048         end += 4
01049         (length,) = _struct_I.unpack(str[start:end])
01050         start = end
01051         end += length
01052         if python3:
01053           val1.node = str[start:end].decode('utf-8')
01054         else:
01055           val1.node = str[start:end]
01056         self.public_watchlist.append(val1)
01057       start = end
01058       end += 4
01059       (length,) = _struct_I.unpack(str[start:end])
01060       self.public_interface = []
01061       for i in range(0, length):
01062         val1 = gateway_comms.msg.Rule()
01063         start = end
01064         end += 4
01065         (length,) = _struct_I.unpack(str[start:end])
01066         start = end
01067         end += length
01068         if python3:
01069           val1.type = str[start:end].decode('utf-8')
01070         else:
01071           val1.type = str[start:end]
01072         start = end
01073         end += 4
01074         (length,) = _struct_I.unpack(str[start:end])
01075         start = end
01076         end += length
01077         if python3:
01078           val1.name = str[start:end].decode('utf-8')
01079         else:
01080           val1.name = str[start:end]
01081         start = end
01082         end += 4
01083         (length,) = _struct_I.unpack(str[start:end])
01084         start = end
01085         end += length
01086         if python3:
01087           val1.node = str[start:end].decode('utf-8')
01088         else:
01089           val1.node = str[start:end]
01090         self.public_interface.append(val1)
01091       start = end
01092       end += 4
01093       (length,) = _struct_I.unpack(str[start:end])
01094       self.flipped_connections = []
01095       for i in range(0, length):
01096         val1 = gateway_comms.msg.RemoteRule()
01097         start = end
01098         end += 4
01099         (length,) = _struct_I.unpack(str[start:end])
01100         start = end
01101         end += length
01102         if python3:
01103           val1.gateway = str[start:end].decode('utf-8')
01104         else:
01105           val1.gateway = str[start:end]
01106         _v16 = val1.rule
01107         start = end
01108         end += 4
01109         (length,) = _struct_I.unpack(str[start:end])
01110         start = end
01111         end += length
01112         if python3:
01113           _v16.type = str[start:end].decode('utf-8')
01114         else:
01115           _v16.type = str[start:end]
01116         start = end
01117         end += 4
01118         (length,) = _struct_I.unpack(str[start:end])
01119         start = end
01120         end += length
01121         if python3:
01122           _v16.name = str[start:end].decode('utf-8')
01123         else:
01124           _v16.name = str[start:end]
01125         start = end
01126         end += 4
01127         (length,) = _struct_I.unpack(str[start:end])
01128         start = end
01129         end += length
01130         if python3:
01131           _v16.node = str[start:end].decode('utf-8')
01132         else:
01133           _v16.node = str[start:end]
01134         self.flipped_connections.append(val1)
01135       start = end
01136       end += 4
01137       (length,) = _struct_I.unpack(str[start:end])
01138       self.flip_watchlist = []
01139       for i in range(0, length):
01140         val1 = gateway_comms.msg.RemoteRule()
01141         start = end
01142         end += 4
01143         (length,) = _struct_I.unpack(str[start:end])
01144         start = end
01145         end += length
01146         if python3:
01147           val1.gateway = str[start:end].decode('utf-8')
01148         else:
01149           val1.gateway = str[start:end]
01150         _v17 = val1.rule
01151         start = end
01152         end += 4
01153         (length,) = _struct_I.unpack(str[start:end])
01154         start = end
01155         end += length
01156         if python3:
01157           _v17.type = str[start:end].decode('utf-8')
01158         else:
01159           _v17.type = str[start:end]
01160         start = end
01161         end += 4
01162         (length,) = _struct_I.unpack(str[start:end])
01163         start = end
01164         end += length
01165         if python3:
01166           _v17.name = str[start:end].decode('utf-8')
01167         else:
01168           _v17.name = str[start:end]
01169         start = end
01170         end += 4
01171         (length,) = _struct_I.unpack(str[start:end])
01172         start = end
01173         end += length
01174         if python3:
01175           _v17.node = str[start:end].decode('utf-8')
01176         else:
01177           _v17.node = str[start:end]
01178         self.flip_watchlist.append(val1)
01179       start = end
01180       end += 4
01181       (length,) = _struct_I.unpack(str[start:end])
01182       self.flipped_in_connections = []
01183       for i in range(0, length):
01184         val1 = gateway_comms.msg.RemoteRule()
01185         start = end
01186         end += 4
01187         (length,) = _struct_I.unpack(str[start:end])
01188         start = end
01189         end += length
01190         if python3:
01191           val1.gateway = str[start:end].decode('utf-8')
01192         else:
01193           val1.gateway = str[start:end]
01194         _v18 = val1.rule
01195         start = end
01196         end += 4
01197         (length,) = _struct_I.unpack(str[start:end])
01198         start = end
01199         end += length
01200         if python3:
01201           _v18.type = str[start:end].decode('utf-8')
01202         else:
01203           _v18.type = str[start:end]
01204         start = end
01205         end += 4
01206         (length,) = _struct_I.unpack(str[start:end])
01207         start = end
01208         end += length
01209         if python3:
01210           _v18.name = str[start:end].decode('utf-8')
01211         else:
01212           _v18.name = str[start:end]
01213         start = end
01214         end += 4
01215         (length,) = _struct_I.unpack(str[start:end])
01216         start = end
01217         end += length
01218         if python3:
01219           _v18.node = str[start:end].decode('utf-8')
01220         else:
01221           _v18.node = str[start:end]
01222         self.flipped_in_connections.append(val1)
01223       start = end
01224       end += 4
01225       (length,) = _struct_I.unpack(str[start:end])
01226       self.pull_watchlist = []
01227       for i in range(0, length):
01228         val1 = gateway_comms.msg.RemoteRule()
01229         start = end
01230         end += 4
01231         (length,) = _struct_I.unpack(str[start:end])
01232         start = end
01233         end += length
01234         if python3:
01235           val1.gateway = str[start:end].decode('utf-8')
01236         else:
01237           val1.gateway = str[start:end]
01238         _v19 = val1.rule
01239         start = end
01240         end += 4
01241         (length,) = _struct_I.unpack(str[start:end])
01242         start = end
01243         end += length
01244         if python3:
01245           _v19.type = str[start:end].decode('utf-8')
01246         else:
01247           _v19.type = str[start:end]
01248         start = end
01249         end += 4
01250         (length,) = _struct_I.unpack(str[start:end])
01251         start = end
01252         end += length
01253         if python3:
01254           _v19.name = str[start:end].decode('utf-8')
01255         else:
01256           _v19.name = str[start:end]
01257         start = end
01258         end += 4
01259         (length,) = _struct_I.unpack(str[start:end])
01260         start = end
01261         end += length
01262         if python3:
01263           _v19.node = str[start:end].decode('utf-8')
01264         else:
01265           _v19.node = str[start:end]
01266         self.pull_watchlist.append(val1)
01267       start = end
01268       end += 4
01269       (length,) = _struct_I.unpack(str[start:end])
01270       self.pulled_connections = []
01271       for i in range(0, length):
01272         val1 = gateway_comms.msg.RemoteRule()
01273         start = end
01274         end += 4
01275         (length,) = _struct_I.unpack(str[start:end])
01276         start = end
01277         end += length
01278         if python3:
01279           val1.gateway = str[start:end].decode('utf-8')
01280         else:
01281           val1.gateway = str[start:end]
01282         _v20 = val1.rule
01283         start = end
01284         end += 4
01285         (length,) = _struct_I.unpack(str[start:end])
01286         start = end
01287         end += length
01288         if python3:
01289           _v20.type = str[start:end].decode('utf-8')
01290         else:
01291           _v20.type = str[start:end]
01292         start = end
01293         end += 4
01294         (length,) = _struct_I.unpack(str[start:end])
01295         start = end
01296         end += length
01297         if python3:
01298           _v20.name = str[start:end].decode('utf-8')
01299         else:
01300           _v20.name = str[start:end]
01301         start = end
01302         end += 4
01303         (length,) = _struct_I.unpack(str[start:end])
01304         start = end
01305         end += length
01306         if python3:
01307           _v20.node = str[start:end].decode('utf-8')
01308         else:
01309           _v20.node = str[start:end]
01310         self.pulled_connections.append(val1)
01311       return self
01312     except struct.error as e:
01313       raise genpy.DeserializationError(e) #most likely buffer underfill
01314 
01315 _struct_I = genpy.struct_I
01316 _struct_B = struct.Struct("<B")
01317 class GatewayInfo(object):
01318   _type          = 'gateway_comms/GatewayInfo'
01319   _md5sum = 'edc5eb8189dbcdfeda797d1a085d5665'
01320   _request_class  = GatewayInfoRequest
01321   _response_class = GatewayInfoResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends


gateway_comms
Author(s): Jihoon
autogenerated on Wed Nov 21 2012 15:02:06