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


gateway_msgs
Author(s): Jihoon
autogenerated on Tue Jan 15 2013 17:43:49