Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / publisher / urtPublisherInit.svg @ 5198dfae

History | View | Annotate | Download (17.442 KB)

1
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="793px" preserveAspectRatio="none" style="width:1214px;height:793px;" version="1.1" viewBox="0 0 1214 793" width="1214px" zoomAndPan="magnify"><defs><filter height="300%" id="f1cmn83qlc5kyj" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="89" x="561.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="150" x="531" y="47.6611">urtPublisherInit()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="609" y="68.6143"/><path d="M369.5,72.8594 L369.5,274.4531 L820.5,274.4531 L820.5,82.8594 L810.5,72.8594 L369.5,72.8594 " fill="#FBFB77" filter="url(#f1cmn83qlc5kyj)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M810.5,72.8594 L810.5,82.8594 L820.5,82.8594 L810.5,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="369.5" x2="499.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="503.5" y="89.4263"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="69" x="503.5" y="89.4263">publisher</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="110" x="576.5" y="89.4263">: urt_publisher_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="690.5" x2="820.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="161" x="375.5" y="105.0591">The publisher to initialize.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="375.5" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="455.5" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="487.5" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="369.5" x2="529" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="533" y="134.8247"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="37" x="533" y="134.8247">topic</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="83" x="574" y="134.8247">: urt_topic_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="661" x2="820.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="259" x="375.5" y="150.4575">The topic, this publisher is associated to.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="375.5" y="165.5903">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="455.5" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="487.5" y="165.5903">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="369.5" x2="496" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="500" y="180.2231"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="75" x="500" y="180.2231">messages</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="111" x="579" y="180.2231">: urt_message_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="694" x2="820.5" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="375.5" y="195.856">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="346" x="411.5" y="195.856">terminated list of messages to contribute to the topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="329" x="375.5" y="210.9888">Messages must not be associated to another topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="430" x="375.5" y="226.1216">Once a message has been contributed, it cannot be removed later.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="375.5" y="241.2544">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="425.5" y="241.2544">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="186" x="461.5" y="241.2544">(no messages to contribute).</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="369.5" x2="820.5" y1="249.3203" y2="249.3203"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="369.5" x2="820.5" y1="251.3203" y2="251.3203"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="369.5" x2="549.5" y1="261.8867" y2="261.8867"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="553.5" y="265.8872"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="553.5" y="265.8872">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="34" x="602.5" y="265.8872">: void</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="640.5" x2="820.5" y1="261.8867" y2="261.8867"/><ellipse cx="595" cy="304.4531" fill="#000000" filter="url(#f1cmn83qlc5kyj)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><path d="M231.5,324.4531 L231.5,394.9844 A0,0 0 0 0 231.5,394.9844 L509.5,394.9844 A0,0 0 0 0 509.5,394.9844 L509.5,363.7188 L529.5,359.7188 L509.5,355.7188 L509.5,334.4531 L499.5,324.4531 L231.5,324.4531 A0,0 0 0 0 231.5,324.4531 " fill="#FBFB77" filter="url(#f1cmn83qlc5kyj)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M499.5,324.4531 L499.5,334.4531 L509.5,334.4531 L499.5,324.4531 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><ellipse cx="243" cy="337.0859" fill="#000000" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 0.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="37" x="248.5" y="341.52">topic</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="289.5" y="341.52">← topic</text><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 1.0,2.0;" x1="231.5" x2="242" y1="352.1523" y2="352.1523"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="249" x="246" y="356.1528">URT_CFG_PUBSUB_PROFILING == true</text><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 1.0,2.0;" x1="499" x2="509.5" y1="352.1523" y2="352.1523"/><ellipse cx="243" cy="367.3516" fill="#000000" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 0.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="123" x="248.5" y="371.7856">publishAttempts</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="23" x="375.5" y="371.7856">← 0</text><ellipse cx="243" cy="382.4844" fill="#000000" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 0.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="88" x="248.5" y="386.9185">publishFails</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="23" x="340.5" y="386.9185">← 0</text><rect fill="#FEFECE" filter="url(#f1cmn83qlc5kyj)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="131" x="529.5" y="342.7344"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="111" x="539.5" y="363.873">initialize members</text><rect fill="#FEFECE" filter="url(#f1cmn83qlc5kyj)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="555" y="463.3867"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="565" y="484.5254">lock topic</text><rect fill="#FFFFFF" filter="url(#f1cmn83qlc5kyj)" height="134.2656" style="stroke: #000000; stroke-width: 2.0;" width="1168" x="10" y="508.1572"/><path d="M167,509.1572 L167,517.4541 L157,527.4541 L10,527.4541 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="147" x="13" y="522.1523">contribute messages</text><rect fill="#000000" filter="url(#f1cmn83qlc5kyj)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1148" x="20" y="544.4541"/><rect fill="#FEFECE" filter="url(#f1cmn83qlc5kyj)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="619" x="34" y="570.4541"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="20" x="44" y="591.5928">set</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="28" x="68" y="591.5928">next</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="543" x="100" y="591.5928">pointer of last message to contribute to the message after the topic's latest message</text><rect fill="#FEFECE" filter="url(#f1cmn83qlc5kyj)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="475" x="681" y="570.4541"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="20" x="691" y="591.5928">set</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="28" x="715" y="591.5928">next</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="399" x="747" y="591.5928">pointer of topic's latest message to first message to contribute</text><rect fill="#000000" filter="url(#f1cmn83qlc5kyj)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1148" x="20" y="624.4229"/><rect fill="#FEFECE" filter="url(#f1cmn83qlc5kyj)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="547" y="662.4229"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="557" y="683.5615">unlock topic</text><polygon fill="#FEFECE" filter="url(#f1cmn83qlc5kyj)" points="525,414.9844,665,414.9844,677,426.9844,665,438.9844,525,438.9844,513,426.9844,525,414.9844" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="599" y="449.1948">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="140" x="525" y="430.7925">Messages to contribute?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="677" y="424.3901">no</text><polygon fill="#FEFECE" filter="url(#f1cmn83qlc5kyj)" points="595,716.3916,607,728.3916,595,740.3916,583,728.3916,595,716.3916" style="stroke: #A80036; stroke-width: 1.5;"/><ellipse cx="595" cy="771.3916" fill="#FFFFFF" filter="url(#f1cmn83qlc5kyj)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="595" cy="771.3916" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="595" x2="595" y1="274.4531" y2="294.4531"/><polygon fill="#A80036" points="591,284.4531,595,294.4531,599,284.4531,595,288.4531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="595" x2="595" y1="314.4531" y2="342.7344"/><polygon fill="#A80036" points="591,332.7344,595,342.7344,599,332.7344,595,336.7344" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="343.5" x2="343.5" y1="550.4541" y2="570.4541"/><polygon fill="#A80036" points="339.5,560.4541,343.5,570.4541,347.5,560.4541,343.5,564.4541" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="918.5" x2="918.5" y1="550.4541" y2="570.4541"/><polygon fill="#A80036" points="914.5,560.4541,918.5,570.4541,922.5,560.4541,918.5,564.4541" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="343.5" x2="343.5" y1="604.4229" y2="624.4229"/><polygon fill="#A80036" points="339.5,614.4229,343.5,624.4229,347.5,614.4229,343.5,618.4229" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="918.5" x2="918.5" y1="604.4229" y2="624.4229"/><polygon fill="#A80036" points="914.5,614.4229,918.5,624.4229,922.5,614.4229,918.5,618.4229" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="595" x2="595" y1="497.3555" y2="544.4541"/><polygon fill="#A80036" points="591,534.4541,595,544.4541,599,534.4541,595,538.4541" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="595" x2="595" y1="630.4229" y2="662.4229"/><polygon fill="#A80036" points="591,652.4229,595,662.4229,599,652.4229,595,656.4229" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="595" x2="595" y1="438.9844" y2="463.3867"/><polygon fill="#A80036" points="591,453.3867,595,463.3867,599,453.3867,595,457.3867" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="677" x2="1188" y1="426.9844" y2="426.9844"/><polygon fill="#A80036" points="1184,569.29,1188,579.29,1192,569.29,1188,573.29" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1188" x2="1188" y1="426.9844" y2="728.3916"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1188" x2="607" y1="728.3916" y2="728.3916"/><polygon fill="#A80036" points="617,724.3916,607,728.3916,617,732.3916,613,728.3916" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="595" x2="595" y1="696.3916" y2="716.3916"/><polygon fill="#A80036" points="591,706.3916,595,716.3916,599,706.3916,595,710.3916" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="595" x2="595" y1="376.7031" y2="414.9844"/><polygon fill="#A80036" points="591,404.9844,595,414.9844,599,404.9844,595,408.9844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="595" x2="595" y1="740.3916" y2="760.3916"/><polygon fill="#A80036" points="591,750.3916,595,760.3916,599,750.3916,595,754.3916" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[cc6adf1d0441bf5c83751fa056e4110e]
2
@startuml
3

    
4
title **µRtWare**\nurtPublisherInit()\n
5

    
6

    
7

    
8

    
9

    
10
note
11
  - - **publisher** : urt_publisher_t* - -
12
  The publisher to initialize.
13
  Must not be ""NULL"".
14
  - - **topic** : urt_topic_t* - -
15
  The topic, this publisher is associated to.
16
  Must not be ""NULL"".
17
  - - **messages** : urt_message_t* - -
18
  ""NULL"" terminated list of messages to contribute to the topic.
19
  Messages must not be associated to another topic.
20
  Once a message has been contributed, it cannot be removed later.
21
  May be ""NULL"" (no messages to contribute).
22
  ====
23
  - - **return** : void - -
24
endnote
25

    
26

    
27
start
28
:initialize members;
29
note
30
  * **topic** ← topic
31
  .. URT_CFG_PUBSUB_PROFILING == true ..
32
  * **publishAttempts** ← 0
33
  * **publishFails** ← 0
34
endnote
35
if (Messages to contribute?) then (yes)
36
  :lock topic;
37
    partition "contribute messages" {
38
    fork
39
      :set ""next"" pointer of last message to contribute to the message after the topic's latest message;
40
    fork again
41
      :set ""next"" pointer of topic's latest message to first message to contribute;
42
    endfork
43
  }
44
  :unlock topic;
45
else (no)
46
endif
47
stop
48

    
49

    
50
@enduml
51

    
52
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
53
(GPL source distribution)
54
Java Runtime: OpenJDK Runtime Environment
55
JVM: OpenJDK 64-Bit Server VM
56
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
57
Operating System: Linux
58
Default Encoding: UTF-8
59
Language: en
60
Country: US
61
--></g></svg>