pydistsim.demo_algorithms.santoro2007.traversal.DFStar
- class DFStar(*args, **kwargs)[source]
Bases:
NodeAlgorithmMethods
__init__add_observersalarmapply_restrictionsApply all applicable restrictions.
block_inboxBlock the inbox of a node, so that only messages that satisfy the filter can be processed.
check_algorithm_initializationCheck if the algorithm's current state matches the expected initial state.
check_algorithm_terminationCheck if the algorithm's current state matches the expected termination state.
check_restrictionsCheck if the restrictions are satisfied.
clear_observerscloseClose the inbox of the node for a specific neighbor.
defaultdefault_DONEdisable_alarmDisable an alarm.
disable_all_node_alarmsDisable all alarms set for the node.
first_visitMethod used to initialize the algorithm.
is_haltedCheck if the distributed algorithm has come to an end or deadlock, i.e. there are no messages to pass and no alarms set.
is_initializednotify_observersopenOpen the inbox of the node for a specific neighbor.
receivingreceiving_AVAILABLEreceiving_IDLEreceiving_VISITEDresetReset the algorithm to its initial state.
sendSend content to destination, with header.
send_msgSend a message to nodes listed in message's destination field.
set_alarmSet an alarm for the node.
spontaneouslyspontaneously_INITIATORstepunblock_inboxUnblock the inbox of a node, so that all messages can be processed.
update_alarm_timeUpdate the time of an alarm by adding a time difference.
visitAttributes
INITuple of statuses that nodes should have at the beginning of the algorithm.
Tuple of statuses that nodes should have at the end of the algorithm.
Tuple of restrictions that must be satisfied for the algorithm to run.
default_paramsnetworkrequired_paramsnwmNode wrapper manager.
- S_init = (Status.INITIATOR, Status.IDLE)
Tuple of statuses that nodes should have at the beginning of the algorithm.
- S_term = (Status.DONE,)
Tuple of statuses that nodes should have at the end of the algorithm.
- class Status(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StatusValues- __new__(value)
- _generate_next_value_(start, count, last_values)
Return the lower-cased version of the member name.
- algorithm_restrictions = (<class 'pydistsim.restrictions.communication.BidirectionalLinks'>, <class 'pydistsim.restrictions.reliability.TotalReliability'>, <class 'pydistsim.restrictions.topological.Connectivity'>, <class 'pydistsim.restrictions.topological.UniqueInitiator'>)
Tuple of restrictions that must be satisfied for the algorithm to run.