bbc1.core.topology_manager module

Copyright (c) 2017

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class bbc1.core.topology_manager.TopologyManagerBase(network=None, config=None, domain_id=None, node_id=None, loglevel='all', logname=None)[source]

Bases: object

Network topology management for a domain

This class defines how to create topology, meaning that who should be neighbors and provides very simple topology management, that is full mesh topology. If P2P routing algorithm is needed, you should override this class to upgrade functions. This class does not manage the neighbor list itself (It’s in BBcNetwork)


make nodelist binary for advertising

notify_neighbor_update(node_id, is_new=True)[source]

Update expiration timer for the notified node_id

  • node_id (bytes) – target node_id
  • is_new (bool) – If True, this node is a new comer node

Process received message

Parameters:msg (dict) – received message

Invalidate all running timers

update_refresh_timer_entry(new_entry=True, force_refresh_time=None)[source]

Update expiration timer