pydistsim.network.sensor.DistSensor

class DistSensor[source]

Bases: Sensor

Provides distance between node and its neighbors.

Methods

__init__

name

Get the name of the Sensor class.

read

Read the distances from the current node to its neighbors.

read(node: Node)[source]

Read the distances from the current node to its neighbors.

Parameters:

node (Node) – The current node.

Returns:

A dictionary containing the distances to the neighbors.

Return type:

dict