class documentation

class Graph(object):

Constructor: Graph(node_ns, topic_ns)

View In Hierarchy

Utility class for polling ROS statistics from running ROS graph. Not multi-thread-safe

Method __init__ Undocumented
Method bad_update Update loop for nodes with bad connectivity. We box them separately so that we can maintain the good performance of the normal update loop. Once a node is on the bad list it stays there.
Method set_master_stale @param stale_secs: seconds that data is considered fresh @type stale_secs: double
Method set_node_stale @param stale_secs: seconds that data is considered fresh @type stale_secs: double
Method update Update all the stats. This method may take a while to complete as it will communicate with all nodes + master.
Instance Variable bad_nodes Undocumented
Instance Variable bad_nodes_lock Undocumented
Instance Variable last_master_refresh Undocumented
Instance Variable last_node_refresh Undocumented
Instance Variable master Undocumented
Instance Variable master_stale Undocumented
Instance Variable nn_edges Undocumented
Instance Variable nn_nodes Undocumented
Instance Variable node_ns Undocumented
Instance Variable node_stale Undocumented
Instance Variable node_uri_map Undocumented
Instance Variable nt_all_edges Undocumented
Instance Variable nt_edges Undocumented
Instance Variable nt_nodes Undocumented
Instance Variable srvs Undocumented
Instance Variable topic_ns Undocumented
Instance Variable uri_node_map Undocumented
Method _mark_bad_node Undocumented
Method _master_refresh @return: True if nodes information was updated @rtype: bool
Method _node_refresh Contact node for stats/connectivity information @param node: name of node to contact @type node: str @param bad_node: if True, node has connectivity issues @type bad_node: bool @return: True if node was successfully contacted @rtype bool...
Method _node_refresh_businfo Retrieve bus info from the node and update nodes and edges as appropriate @param node: node name @type node: str @param api: XML-RPC proxy @type api: ServerProxy @param bad_node: If True, node has connectivity issues and should be treated differently @type bad_node: bool...
Method _node_uri_refresh Undocumented
Method _node_uri_refresh_all Build self.node_uri_map and self.uri_node_map using master as a lookup service. This will make N requests to the master for N nodes, so this should only be used sparingly
Method _unmark_bad_node Promotes bad node to 'wonky' status.
def __init__(self, node_ns='/', topic_ns='/'):

Undocumented

def bad_update(self):

Update loop for nodes with bad connectivity. We box them separately so that we can maintain the good performance of the normal update loop. Once a node is on the bad list it stays there.

def set_master_stale(self, stale_secs):

@param stale_secs: seconds that data is considered fresh @type stale_secs: double

def set_node_stale(self, stale_secs):

@param stale_secs: seconds that data is considered fresh @type stale_secs: double

def update(self):

Update all the stats. This method may take a while to complete as it will communicate with all nodes + master.

bad_nodes: dict =

Undocumented

bad_nodes_lock =

Undocumented

last_master_refresh =

Undocumented

last_node_refresh: dict =

Undocumented

master =

Undocumented

master_stale =

Undocumented

nn_edges =

Undocumented

nn_nodes =

Undocumented

node_ns =

Undocumented

node_stale =

Undocumented

node_uri_map: dict =

Undocumented

nt_all_edges =

Undocumented

nt_edges =

Undocumented

nt_nodes =

Undocumented

srvs =

Undocumented

topic_ns =

Undocumented

uri_node_map: dict =

Undocumented

def _mark_bad_node(self, node, reason):

Undocumented

def _master_refresh(self):

@return: True if nodes information was updated @rtype: bool

def _node_refresh(self, node, bad_node=False):

Contact node for stats/connectivity information @param node: name of node to contact @type node: str @param bad_node: if True, node has connectivity issues @type bad_node: bool @return: True if node was successfully contacted @rtype bool

def _node_refresh_businfo(self, node, api, bad_node=False):

Retrieve bus info from the node and update nodes and edges as appropriate @param node: node name @type node: str @param api: XML-RPC proxy @type api: ServerProxy @param bad_node: If True, node has connectivity issues and should be treated differently @type bad_node: bool

def _node_uri_refresh(self, node):

Undocumented

def _node_uri_refresh_all(self):

Build self.node_uri_map and self.uri_node_map using master as a lookup service. This will make N requests to the master for N nodes, so this should only be used sparingly

def _unmark_bad_node(self, node, reason):

Promotes bad node to 'wonky' status.