pydistsim.demo_algorithms.niculescu2003.dvhop.DVHop

class DVHop(*args, **kwargs)[source]

Bases: FloodingUpdate

Data is {landmark: [x,y,hop_count], …}

Methods

__init__

add_observers

alarm

apply_restrictions

Apply all applicable restrictions.

block_inbox

Block the inbox of a node, so that only messages that satisfy the filter can be processed.

check_algorithm_initialization

Check if the algorithm's current state matches the expected initial state.

check_algorithm_termination

Check if the algorithm's current state matches the expected termination state.

check_restrictions

Check if the restrictions are satisfied.

clear_observers

close

Close the inbox of the node for a specific neighbor.

default

disable_alarm

Disable an alarm.

disable_all_node_alarms

Disable all alarms set for the node.

handle_flood_message

initializer

Starts in every node satisfying initiator condition.

initiator_condition

initiator_data

is_halted

Check if the distributed algorithm has come to an end or deadlock, i.e. there are no messages to pass and no alarms set.

is_initialized

notify_observers

open

Open the inbox of the node for a specific neighbor.

recalculate_hopsize

receiving

receiving_FLOODING

reset

Reset the algorithm to its initial state.

send

Send content to destination, with header.

send_msg

Send a message to nodes listed in message's destination field.

set_alarm

Set an alarm for the node.

spontaneously

spontaneously_INITIATOR

step

unblock_inbox

Unblock the inbox of a node, so that all messages can be processed.

update_alarm_time

Update the time of an alarm by adding a time difference.

Attributes

INI

S_init

Tuple of statuses that nodes should have at the beginning of the algorithm.

S_term

Tuple of statuses that nodes should have at the end of the algorithm.

algorithm_restrictions

Tuple of restrictions that must be satisfied for the algorithm to run.

default_params

network

required_params

nwm

Node wrapper manager.

NODE_ACCESS_TYPE

alias of SensorNodeAccess