Revision e87bd7c7 doc/activitydiagrams/core/urtCoreSynchronizeNodes.uml

View differences:

doc/activitydiagrams/core/urtCoreSynchronizeNodes.uml
29 29

  
30 30
note
31 31
  -- **node** : urt_node_t* --
32
  Pointer to a node tp synchronize.
32
  Pointer to a node to synchronize.
33 33
  Must not be ""NULL"".
34
  -- **stage** : urt_nodestage_t --
35
  Stage value to synchronize to.
36 34
  ====
37 35
  -- **return** : urt_status_t --
36
  Returns ""URT_STATUS_OK"" if all nodes are synchronized and proceed.
37
  Returns ""URT_STATUS_ERROR"" if an exception occurred (faulty stage value detected).
38
  Returns a value greater than ""URT_STATUS_OK"" but smaller than ""URT_STATUS_ERROR"" if there are nodes left to synchronize.
39
  In the latter case, the node thread must still wait for the control event (proceed) to synchronize.
38 40
endnote
39 41

  
40 42
/'### PROCEDURE ##############################################################'/
41 43

  
42 44
start
43
stop
45
:lock core;
46
:increment the node's stage value;
47
:access first node core's list of nodes;
48
while (Current node is not ""NULL""\nand stage of current node is equal to argument?) is (yes)
49
  :proceed to next node;
50
endwhile (no)
51
if (The stage of a node was equal to the argument or 1 less than the argument?) then (yes)
52
  :call ""urtCoreStopNodes(URT_STATUS_ERROR)"";
53
  :unlock core;
54
  stop
55
  note
56
    Returns ""URT_STATUS_ERROR"".
57
  endnote
58
else (no)
59
endif
60
if (Stages of all nodes are equal to argument?) then (yes)
61
  :broadcast control event (proceed);
62
  :unlock core;
63
  stop
64
  note
65
    Returns ""URT_STATUS_OK"".
66
  endnote
67
else (no)
68
  :unlock core;
69
  stop
70
  note
71
    Returns a value greater than ""URT_STATUS_OK"" but smaller than ""URT_STATUS_ERROR"".
72
  endnote
73
endif
44 74

  
45 75
/'### OUTRO ##################################################################'/
46 76

  

Also available in: Unified diff