Subprograms¶
processes are sent the IDs of their neighbours at start once they have them, they start telling others if they have a degree of 1 and they listen for neighbours signaling they have a degree of 1
- signification of messages to point_processes :
- e : message comming from main meaning it is now time to write
- the result.
- d <neighbour_id> : the neighbouring point with neighbour_id
- had only one neighbour left ‘alive’ and is therefore now ‘dead’.
a : death acknowledge means the neighbour now knows the point is ‘dead’
- A <neighbour_id> <neighbour_x_pos> <neighbour_y_pos> : the
- corresponding neighbour is still ‘alive’ (sent after the neighbour received a message ‘e’).
- D : a neighbour is ‘dead’ and no line should be displayed between the
- two points.
-
Solidator.point_process.
debug
(string, own_id)[source]¶ write a string in stderr and add the point’s own_id for clarity
-
Solidator.point_process.
main
()[source]¶ Waits for processes to die around you to check if you can survive
-
Solidator.point_process.
read_position
()[source]¶ Reads a line from stdin and interprets it as a position
-
Solidator.point_process.
signal_death
(neighbour_messagers, own_id)[source]¶ Tells all neighbours of own_id death by neighbour_messagers’ fifo files