Revision ee83a495 doc/activitydiagrams/publisher/urtPublisherInit.uml

View differences:

doc/activitydiagrams/publisher/urtPublisherInit.uml
25 25

  
26 26
title **µRtWare**\nurtPublisherInit()\n
27 27

  
28
!include ../../functions.iuml
28
/'### PARAMETERS & RETURN ####################################################'/
29 29

  
30
/'### PARAMETERS & START #####################################################'/
31

  
32
start
33 30
note
34
  -- ""**publisher** : urt_publisher_t*"" --
31
  -- **publisher** : urt_publisher_t* --
35 32
  The publisher to initialize.
36 33
  Must not be ""NULL"".
37
  -- ""**topic** : urt_topic_t*"" --
34
  -- **topic** : urt_topic_t* --
38 35
  The topic, this publisher is associated to.
39 36
  Must not be ""NULL"".
40
  -- ""**messages** : urt_message_t*"" --
41
  A ""NULL"" terminated list of messages to contribute to the topic.
42
  May be ""NULL"" (no messages are contributed).
43
end note
37
  -- **messages** : urt_message_t* --
38
  ""NULL"" terminated list of messages to contribute to the topic.
39
  Messages must not be associated to another topic.
40
  Once a message has been contributed, it cannot be removed later.
41
  May be ""NULL"" (no messages to contribute).
42
  ====
43
  -- **return** : urt_status_t --
44
  Always returns ""URT_STATUS_OK"".
45
endnote
44 46

  
45 47
/'### PROCEDURE ##############################################################'/
46 48

  
49
start
47 50
:initialize members;
51
note
52
  **topic** ← topic
53
  .. URT_CFG_PUBSUB_PROFILING == true ..
54
  **publishAttempts** ← 0
55
  **publishFails** ← 0
56
endnote
48 57
if (Messages to contribute?) then (yes)
49 58
  :lock topic;
50
  partition "contribute messages" {
51
    :set next pointer of topic's latest message to first message to contribute;
52
    :set next pointer of last message to contribute to the message after the topic's latest message;
53
  }
59
  !include ../contributemessages.iuml
54 60
  :unlock topic;
55 61
else (no)
56 62
endif
57

  
58
/'### STOP & RETURN ##########################################################'/
59

  
60 63
stop
61 64
note
62
  -- **return** ""urt_status_t"" --
63 65
  Returns ""URT_STATUS_OK"".
64
end note
66
endnote
65 67

  
66 68
/'### OUTRO ##################################################################'/
67 69

  

Also available in: Unified diff