urtware / doc / activitydiagrams / publisher / urtPublisherInit.svg @ 7491c395
History | View | Annotate | Download (14.37 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="692px" preserveAspectRatio="none" style="width:811px;height:692px;" version="1.1" viewBox="0 0 811 692" width="811px" zoomAndPan="magnify"><defs><filter height="300%" id="f1xffo3a9rerdo" 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="360" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="150" x="329.5" y="47.6611">urtPublisherInit()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="407.5" y="68.6143"/><path d="M10,72.8594 L10,219.0547 A0,0 0 0 0 10,219.0547 L426,219.0547 A0,0 0 0 0 426,219.0547 L426,149.957 L446,145.957 L426,141.957 L426,82.8594 L416,72.8594 L10,72.8594 A0,0 0 0 0 10,72.8594 " fill="#FBFB77" filter="url(#f1xffo3a9rerdo)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M416,72.8594 L416,82.8594 L426,82.8594 L416,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="102" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="106" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="72" x="106" y="89.4263">publisher</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="144" x="186" y="89.4263">: urt_publisher_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="334" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="334" x2="426" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="161" x="16" y="105.0591">The publisher to initialize.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="134" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="138" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="40" x="138" y="134.8247">topic</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="186" y="134.8247">: urt_topic_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="302" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="302" x2="426" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="259" x="16" 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="16" y="165.5903">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="165.5903">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="114" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="118" y="180.2231"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="64" x="118" y="180.2231">messages</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="190" y="180.2231">: urt_message_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="322" y="180.2231"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="322" x2="426" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="9" x="16" y="195.856">A</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="29" y="195.856">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="346" x="65" 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="46" x="16" y="210.9888">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="66" y="210.9888">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="202" x="102" y="210.9888">(no messages are contributed).</text><ellipse cx="456" cy="145.957" fill="#000000" filter="url(#f1xffo3a9rerdo)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="131" x="390.5" y="239.0547"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="111" x="400.5" y="260.1934">initialize members</text><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="416" y="341.4258"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="426" y="362.5645">lock topic</text><rect fill="#FFFFFF" filter="url(#f1xffo3a9rerdo)" height="145.5859" style="stroke: #000000; stroke-width: 2.0;" width="638" x="137" y="386.1963"/><path d="M294,387.1963 L294,395.4932 L284,405.4932 L137,405.4932 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="147" x="140" y="400.1914">contribute messages</text><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="474" x="219" y="422.4932"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="454" x="229" y="443.6318">set next pointer of topic's latest message to first message to contribute</text><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="618" x="147" y="485.8135"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="598" x="157" y="506.9521">set next pointer of last message to contribute to the message after the topic's latest message</text><rect fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="408" y="551.7822"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="418" y="572.9209">unlock topic</text><polygon fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" points="386,293.0234,526,293.0234,538,305.0234,526,317.0234,386,317.0234,374,305.0234,386,293.0234" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="460" y="327.2339">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="140" x="386" y="308.8315">Messages to contribute?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="538" y="302.4292">no</text><polygon fill="#FEFECE" filter="url(#f1xffo3a9rerdo)" points="456,605.751,468,617.751,456,629.751,444,617.751,456,605.751" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M243,640.6182 L243,680.8838 A0,0 0 0 0 243,680.8838 L425,680.8838 A0,0 0 0 0 425,680.8838 L425,664.751 L445,660.751 L425,656.751 L425,650.6182 L415,640.6182 L243,640.6182 A0,0 0 0 0 243,640.6182 " fill="#FBFB77" filter="url(#f1xffo3a9rerdo)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M415,640.6182 L415,650.6182 L425,650.6182 L415,640.6182 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="243" x2="257.5" y1="653.1846" y2="653.1846"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="261.5" y="657.1851"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="261.5" y="657.1851">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="310.5" y="657.1851"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="310.5" y="657.1851">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="410.5" y="657.1851"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="410.5" x2="425" y1="653.1846" y2="653.1846"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="249" y="672.8179">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="302" y="672.8179">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="406" y="672.8179">.</text><ellipse cx="456" cy="660.751" fill="#FFFFFF" filter="url(#f1xffo3a9rerdo)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="456" cy="660.751" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="155.957" y2="239.0547"/><polygon fill="#A80036" points="452,229.0547,456,239.0547,460,229.0547,456,233.0547" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="456.4619" y2="485.8135"/><polygon fill="#A80036" points="452,475.8135,456,485.8135,460,475.8135,456,479.8135" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="375.3945" y2="422.4932"/><polygon fill="#A80036" points="452,412.4932,456,422.4932,460,412.4932,456,416.4932" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="519.7822" y2="551.7822"/><polygon fill="#A80036" points="452,541.7822,456,551.7822,460,541.7822,456,545.7822" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="317.0234" y2="341.4258"/><polygon fill="#A80036" points="452,331.4258,456,341.4258,460,331.4258,456,335.4258" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="538" x2="785" y1="305.0234" y2="305.0234"/><polygon fill="#A80036" points="781,455.8135,785,465.8135,789,455.8135,785,459.8135" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="785" x2="785" y1="305.0234" y2="617.751"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="785" x2="468" y1="617.751" y2="617.751"/><polygon fill="#A80036" points="478,613.751,468,617.751,478,621.751,474,617.751" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="585.751" y2="605.751"/><polygon fill="#A80036" points="452,595.751,456,605.751,460,595.751,456,599.751" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="273.0234" y2="293.0234"/><polygon fill="#A80036" points="452,283.0234,456,293.0234,460,283.0234,456,287.0234" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="456" x2="456" y1="629.751" y2="649.751"/><polygon fill="#A80036" points="452,639.751,456,649.751,460,639.751,456,643.751" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[cad571e197258dd00abff76ac285e5b2] |
---|---|
2 |
@startuml |
3 |
|
4 |
title **µRtWare**\nurtPublisherInit()\n |
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
start |
18 |
note |
19 |
- - ""**publisher** : urt_publisher_t*"" - - |
20 |
The publisher to initialize. |
21 |
Must not be ""NULL"". |
22 |
- - ""**topic** : urt_topic_t*"" - - |
23 |
The topic, this publisher is associated to. |
24 |
Must not be ""NULL"". |
25 |
- - ""**messages** : urt_message_t*"" - - |
26 |
A ""NULL"" terminated list of messages to contribute to the topic. |
27 |
May be ""NULL"" (no messages are contributed). |
28 |
end note |
29 |
|
30 |
|
31 |
:initialize members; |
32 |
if (Messages to contribute?) then (yes) |
33 |
:lock topic; |
34 |
partition "contribute messages" { |
35 |
:set next pointer of topic's latest message to first message to contribute; |
36 |
:set next pointer of last message to contribute to the message after the topic's latest message; |
37 |
} |
38 |
:unlock topic; |
39 |
else (no) |
40 |
endif |
41 |
|
42 |
|
43 |
stop |
44 |
note |
45 |
- - **return** ""urt_status_t"" - - |
46 |
Returns ""URT_STATUS_OK"". |
47 |
end note |
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> |