pydistsim.network.rangenetwork.CompleteRangeType

class CompleteRangeType(environment: Environment)[source]

Bases: RangeType

Complete range type.

This class represents the Complete channel type. It always returns True, indicating that any two nodes are within communication range.

Parameters:

environment (Environment) – The environment in which the channel operates.

Methods

__init__

in_comm_range

Check if two nodes are within communication range.

in_comm_range(network: RangeNetworkType, node1: Node, node2: Node)[source]

Check if two nodes are within communication range.

This method always returns True, indicating that any two nodes are within communication range.

Parameters:
  • network (RangeNetworkType) – The network in which the nodes are connected.

  • node1 (Node) – The first node.

  • node2 (Node) – The second node.

Returns:

True if the nodes are within communication range, False otherwise.

Return type:

bool