Package rocon_utilities :: Module gateways
[frames] | no frames]

Module gateways

source code

Functions
 
create_gateway_remote_rule(gateway, rule) source code
 
create_gateway_rule(name, connection_type, node_name='')
Quickly hack a gateway rule.
source code
 
is_uuid_postfixed(name)
A not very reliable way to check if the last 32 characters of a string are a uuid postfix.
source code
 
gateway_basename(gateway_name)
Strips the 16 byte hash (in hex format) from a gateway name, leaving the base name.
source code
Variables
  valid_uuid_pattern = re.compile(r'^[0-9a-f]{32}$')
  __package__ = 'rocon_utilities'
Function Details

create_gateway_rule(name, connection_type, node_name='')

source code 

Quickly hack a gateway rule.

Parameters:
  • name - connection name (e.g. /chatter) @type string
  • connection_type - one of pub, sub, etc. @type gateway_msgs.ConnectionType,XXX constants

is_uuid_postfixed(name)

source code 

A not very reliable way to check if the last 32 characters of a string are a uuid postfix. Not reliable because if the prefix characters are [0-9a-f] then it will accept shorter combinations of strings. Practical because who will give a gateway a uuid style name?

gateway_basename(gateway_name)

source code 

Strips the 16 byte hash (in hex format) from a gateway name, leaving the base name. Note, 16 hex values represents 32 characters

Parameters:
  • gateway_name - base_name + 16 byte hex formatted hash @type str @return base name without the hash @rtype str