Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / publisher / urtPublisherPublish.svg @ c22d21ad

History | View | Annotate | Download (34.485 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="1211px" preserveAspectRatio="none" style="width:2678px;height:1211px;" version="1.1" viewBox="0 0 2678 1211" width="2678px" zoomAndPan="magnify"><defs><filter height="300%" id="f1jy0wcjc0dc24" 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="1293.5" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="183" x="1246.5" y="47.6611">urtPublisherPublish()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="1341" y="68.6143"/><path d="M351,72.8594 L351,264.4531 A0,0 0 0 0 351,264.4531 L736,264.4531 A0,0 0 0 0 736,264.4531 L736,172.6563 L756,168.6563 L736,164.6563 L736,82.8594 L726,72.8594 L351,72.8594 A0,0 0 0 0 351,72.8594 " fill="#FBFB77" filter="url(#f1jy0wcjc0dc24)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M726,72.8594 L726,82.8594 L736,82.8594 L726,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="427.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="431.5" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="72" x="431.5" y="89.4263">publisher</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="144" x="511.5" y="89.4263">: urt_publisher_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="659.5" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="659.5" x2="736" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="197" x="357" y="105.0591">Pointer to the publisher to use.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="357" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="437" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="469" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="479.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="483.5" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="483.5" y="134.8247">payload</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="56" x="547.5" y="134.8247">: void*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="607.5" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="607.5" x2="736" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="226" x="357" y="150.4575">Pointer to the data to be published.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="357" y="165.5903">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="407" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="195" x="443" y="165.5903">for messages without payload.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="499.5" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="503.5" y="180.2231"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="8" x="503.5" y="180.2231">n</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="64" x="519.5" y="180.2231">: size_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="587.5" y="180.2231"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="587.5" x2="736" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="180" x="357" y="195.856">Size of the payload in bytes.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="475.5" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="479.5" y="210.4888"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="8" x="479.5" y="210.4888">t</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="495.5" y="210.4888">: urt_osTime_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="611.5" y="210.4888"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="611.5" x2="736" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="246" x="357" y="226.1216">Timestamp to be set for the message.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="351" x2="455.5" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="459.5" y="240.7544"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="56" x="459.5" y="240.7544">timeout</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="523.5" y="240.7544">: urt_delay_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="631.5" y="240.7544"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="631.5" x2="736" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="364" x="357" y="256.3872">Timeout delay in case the message cannot be published.</text><ellipse cx="766" cy="168.6563" fill="#000000" filter="url(#f1jy0wcjc0dc24)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="726" y="284.4531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="736" y="305.5918">lock topic</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="156" x="688" y="338.4219"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="136" x="698" y="359.5605">access next message</text><polygon fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" points="638,462.5151,894,462.5151,906,474.5151,894,486.5151,638,486.5151,626,474.5151,638,462.5151" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="256" x="638" y="478.3232">Message timestamp was modified?) the (yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="906" y="471.9209">no</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="171" x="496.75" y="496.5151"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="151" x="506.75" y="517.6538">iterate to next message</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="524" x="687.75" y="496.5151"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="504" x="697.75" y="517.6538">wait for topic's condition variable (using topic's mutex) to be signaled or timeout</text><polygon fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" points="766,536.4839,778,548.4839,766,560.4839,754,548.4839,766,536.4839" style="stroke: #A80036; stroke-width: 1.5;"/><polygon fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" points="648,392.3906,884,392.3906,896,411.5977,884,430.8047,648,430.8047,636,411.5977,648,392.3906" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="770" y="441.0151">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="211" x="648" y="402.6011">HRT consumers left for the message</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="236" x="648" y="415.4058">or the message timestamp was modified</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="139" x="648" y="428.2104">and a timeout occurred?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="622" y="409.0034">no</text><polygon fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" points="713,602.4839,819,602.4839,831,614.4839,819,626.4839,713,626.4839,701,614.4839,713,602.4839" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="106" x="713" y="618.292">Timeout occurred?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="681" y="611.8896">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="831" y="611.8896">no</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="49.5" y="636.4839"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="59.5" y="657.6226">unlock topic</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="175" x="10" y="705.4526"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="20" y="726.5913">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="112" x="63" y="726.5913">URT_STATUS_ERROR</text><rect fill="#000000" filter="url(#f1jy0wcjc0dc24)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="2471" x="195" y="636.4839"/><rect fill="#000000" filter="url(#f1jy0wcjc0dc24)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1014" x="207" y="761.7729"/><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="251" x="219" y="787.7729"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="231" x="229" y="808.9116">iterate topic pointer to this message</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="180" x="498" y="787.7729"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="160" x="508" y="808.9116">copy payload to message</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="187" x="706" y="787.7729"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="167" x="716" y="808.9116">set origin time of message</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="286" x="921" y="787.7729"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="266" x="931" y="808.9116">set number of HRT consumers (from topic)</text><rect fill="#000000" filter="url(#f1jy0wcjc0dc24)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1014" x="207" y="841.7417"/><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="398" x="1249" y="787.7729"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="378" x="1259" y="808.9116">set QoS rate timer (@topic) wrt. most critical HRT subscriber</text><path d="M1675,776.1089 L1675,801.2417 A0,0 0 0 0 1675,801.2417 L2170,801.2417 A0,0 0 0 0 2170,801.2417 L2170,794.1089 L2190,788.6753 L2170,786.1089 L2170,786.1089 L2160,776.1089 L1675,776.1089 A0,0 0 0 0 1675,776.1089 " fill="#FBFB77" filter="url(#f1jy0wcjc0dc24)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M2160,776.1089 L2160,786.1089 L2170,786.1089 L2160,776.1089 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="474" x="1681" y="793.1758">No lock required since this timer is only accessed when the topic is locked.</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="434" x="2190" y="771.6909"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="414" x="2200" y="792.8296">set QoS delay timer (@subscriber) wrt. origin time of the message</text><polygon fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" points="2277,723.2886,2537,723.2886,2549,735.2886,2537,747.2886,2277,747.2886,2265,735.2886,2277,723.2886" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="2411" y="757.499">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="260" x="2277" y="739.0967">QoS delay timer (@subscriber) is not armed?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="2549" y="732.6943">no</text><polygon fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" points="2407,830.062,2419,842.062,2407,854.062,2395,842.062,2407,830.062" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="208" x="2303" y="874.062"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="188" x="2313" y="895.2007">iterate to next HRT subscriber</text><polygon fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" points="2346,662.4839,2468,662.4839,2480,674.4839,2468,686.4839,2346,686.4839,2334,674.4839,2346,662.4839" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="2411" y="696.6943">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="122" x="2346" y="678.292">HRT subscribers left?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="2320" y="671.8896">no</text><rect fill="#000000" filter="url(#f1jy0wcjc0dc24)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="2471" x="195" y="950.0308"/><path d="M1053,980.4487 L1053,1005.5815 A0,0 0 0 0 1053,1005.5815 L1389,1005.5815 A0,0 0 0 0 1389,1005.5815 L1389,998.4487 L1409,993.0151 L1389,990.4487 L1389,990.4487 L1379,980.4487 L1053,980.4487 A0,0 0 0 0 1053,980.4487 " fill="#FBFB77" filter="url(#f1jy0wcjc0dc24)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M1379,980.4487 L1379,990.4487 L1389,990.4487 L1379,980.4487 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="315" x="1059" y="997.5156">Msut be within topic lock because of HRT counter.</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="1409" y="976.0308"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="59" x="1419" y="997.1694">fire event</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="1400.5" y="1029.9995"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="1410.5" y="1051.1382">unlock topic</text><rect fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="154" x="1371.5" y="1083.9683"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="1381.5" y="1105.1069">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="91" x="1424.5" y="1105.1069">URT_STATUS_OK</text><polygon fill="#FEFECE" filter="url(#f1jy0wcjc0dc24)" points="766,1123.937,778,1135.937,766,1147.937,754,1135.937,766,1123.937" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M455,1158.8042 L455,1199.0698 A0,0 0 0 0 455,1199.0698 L735,1199.0698 A0,0 0 0 0 735,1199.0698 L735,1182.937 L755,1178.937 L735,1174.937 L735,1168.8042 L725,1158.8042 L455,1158.8042 A0,0 0 0 0 455,1158.8042 " fill="#FBFB77" filter="url(#f1jy0wcjc0dc24)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M725,1158.8042 L725,1168.8042 L735,1168.8042 L725,1158.8042 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="455" x2="518.5" y1="1171.3706" y2="1171.3706"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="522.5" y="1175.3711"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="522.5" y="1175.3711">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="571.5" y="1175.3711"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="571.5" y="1175.3711">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="671.5" y="1175.3711"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="671.5" x2="735" y1="1171.3706" y2="1171.3706"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="461" y="1191.0039">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="514" y="1191.0039">URT_STATUS_ERROR</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="74" x="646" y="1191.0039">on timeout.</text><ellipse cx="766" cy="1178.937" fill="#FFFFFF" filter="url(#f1jy0wcjc0dc24)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="766" cy="1178.937" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="178.6563" y2="284.4531"/><polygon fill="#A80036" points="762,274.4531,766,284.4531,770,274.4531,766,278.4531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="318.4219" y2="338.4219"/><polygon fill="#A80036" points="762,328.4219,766,338.4219,770,328.4219,766,332.4219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="626" x2="582.25" y1="474.5151" y2="474.5151"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="582.25" x2="582.25" y1="474.5151" y2="496.5151"/><polygon fill="#A80036" points="578.25,486.5151,582.25,496.5151,586.25,486.5151,582.25,490.5151" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="906" x2="949.75" y1="474.5151" y2="474.5151"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="949.75" x2="949.75" y1="474.5151" y2="496.5151"/><polygon fill="#A80036" points="945.75,486.5151,949.75,496.5151,953.75,486.5151,949.75,490.5151" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="582.25" x2="582.25" y1="530.4839" y2="548.4839"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="582.25" x2="754" y1="548.4839" y2="548.4839"/><polygon fill="#A80036" points="744,544.4839,754,548.4839,744,552.4839,748,548.4839" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="949.75" x2="949.75" y1="530.4839" y2="548.4839"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="949.75" x2="778" y1="548.4839" y2="548.4839"/><polygon fill="#A80036" points="788,544.4839,778,548.4839,788,552.4839,784,548.4839" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="430.8047" y2="462.5151"/><polygon fill="#A80036" points="762,452.5151,766,462.5151,770,452.5151,766,456.5151" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="560.4839" y2="570.4839"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="1233.75" y1="570.4839" y2="570.4839"/><polygon fill="#A80036" points="1229.75,499.4937,1233.75,489.4937,1237.75,499.4937,1233.75,495.4937" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1233.75" x2="1233.75" y1="411.5977" y2="570.4839"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1233.75" x2="896" y1="411.5977" y2="411.5977"/><polygon fill="#A80036" points="906,407.5977,896,411.5977,906,415.5977,902,411.5977" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="636" x2="474.75" y1="411.5977" y2="411.5977"/><polygon fill="#A80036" points="470.75,485.4937,474.75,495.4937,478.75,485.4937,474.75,489.4937" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="474.75" x2="474.75" y1="411.5977" y2="582.4839"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="474.75" x2="766" y1="582.4839" y2="582.4839"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="582.4839" y2="602.4839"/><polygon fill="#A80036" points="762,592.4839,766,602.4839,770,592.4839,766,596.4839" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="372.3906" y2="392.3906"/><polygon fill="#A80036" points="762,382.3906,766,392.3906,770,382.3906,766,386.3906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="670.4526" y2="705.4526"/><polygon fill="#A80036" points="93.5,695.4526,97.5,705.4526,101.5,695.4526,97.5,699.4526" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="344.5" x2="344.5" y1="767.7729" y2="787.7729"/><polygon fill="#A80036" points="340.5,777.7729,344.5,787.7729,348.5,777.7729,344.5,781.7729" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="588" x2="588" y1="767.7729" y2="787.7729"/><polygon fill="#A80036" points="584,777.7729,588,787.7729,592,777.7729,588,781.7729" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="799.5" x2="799.5" y1="767.7729" y2="787.7729"/><polygon fill="#A80036" points="795.5,777.7729,799.5,787.7729,803.5,777.7729,799.5,781.7729" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1064" x2="1064" y1="767.7729" y2="787.7729"/><polygon fill="#A80036" points="1060,777.7729,1064,787.7729,1068,777.7729,1064,781.7729" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="344.5" x2="344.5" y1="821.7417" y2="841.7417"/><polygon fill="#A80036" points="340.5,831.7417,344.5,841.7417,348.5,831.7417,344.5,835.7417" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="588" x2="588" y1="821.7417" y2="841.7417"/><polygon fill="#A80036" points="584,831.7417,588,841.7417,592,831.7417,588,835.7417" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="799.5" x2="799.5" y1="821.7417" y2="841.7417"/><polygon fill="#A80036" points="795.5,831.7417,799.5,841.7417,803.5,831.7417,799.5,835.7417" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1064" x2="1064" y1="821.7417" y2="841.7417"/><polygon fill="#A80036" points="1060,831.7417,1064,841.7417,1068,831.7417,1064,835.7417" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="747.2886" y2="771.6909"/><polygon fill="#A80036" points="2403,761.6909,2407,771.6909,2411,761.6909,2407,765.6909" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2549" x2="2634" y1="735.2886" y2="735.2886"/><polygon fill="#A80036" points="2630,778.6753,2634,788.6753,2638,778.6753,2634,782.6753" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2634" x2="2634" y1="735.2886" y2="842.062"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2634" x2="2419" y1="842.062" y2="842.062"/><polygon fill="#A80036" points="2429,838.062,2419,842.062,2429,846.062,2425,842.062" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="805.6597" y2="830.062"/><polygon fill="#A80036" points="2403,820.062,2407,830.062,2411,820.062,2407,824.062" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="854.062" y2="874.062"/><polygon fill="#A80036" points="2403,864.062,2407,874.062,2411,864.062,2407,868.062" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="686.4839" y2="723.2886"/><polygon fill="#A80036" points="2403,713.2886,2407,723.2886,2411,713.2886,2407,717.2886" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="908.0308" y2="918.0308"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2652" y1="918.0308" y2="918.0308"/><polygon fill="#A80036" points="2648,814.7573,2652,804.7573,2656,814.7573,2652,810.7573" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2652" x2="2652" y1="674.4839" y2="918.0308"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2652" x2="2480" y1="674.4839" y2="674.4839"/><polygon fill="#A80036" points="2490,670.4839,2480,674.4839,2490,678.4839,2486,674.4839" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2334" x2="1661" y1="674.4839" y2="674.4839"/><polygon fill="#A80036" points="1657,800.7573,1661,810.7573,1665,800.7573,1661,804.7573" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1661" x2="1661" y1="674.4839" y2="930.0308"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1661" x2="2407" y1="930.0308" y2="930.0308"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="930.0308" y2="950.0308"/><polygon fill="#A80036" points="2403,940.0308,2407,950.0308,2411,940.0308,2407,944.0308" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="713" x2="713" y1="642.4839" y2="761.7729"/><polygon fill="#A80036" points="709,751.7729,713,761.7729,717,751.7729,713,755.7729" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448" x2="1448" y1="642.4839" y2="787.7729"/><polygon fill="#A80036" points="1444,777.7729,1448,787.7729,1452,777.7729,1448,781.7729" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="642.4839" y2="662.4839"/><polygon fill="#A80036" points="2403,652.4839,2407,662.4839,2411,652.4839,2407,656.4839" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="713" x2="713" y1="847.7417" y2="950.0308"/><polygon fill="#A80036" points="709,940.0308,713,950.0308,717,940.0308,713,944.0308" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448" x2="1448" y1="821.7417" y2="950.0308"/><polygon fill="#A80036" points="1444,940.0308,1448,950.0308,1452,940.0308,1448,944.0308" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="956.0308" y2="976.0308"/><polygon fill="#A80036" points="1444.5,966.0308,1448.5,976.0308,1452.5,966.0308,1448.5,970.0308" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1009.9995" y2="1029.9995"/><polygon fill="#A80036" points="1444.5,1019.9995,1448.5,1029.9995,1452.5,1019.9995,1448.5,1023.9995" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1063.9683" y2="1083.9683"/><polygon fill="#A80036" points="1444.5,1073.9683,1448.5,1083.9683,1452.5,1073.9683,1448.5,1077.9683" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="701" x2="97.5" y1="614.4839" y2="614.4839"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="614.4839" y2="636.4839"/><polygon fill="#A80036" points="93.5,626.4839,97.5,636.4839,101.5,626.4839,97.5,630.4839" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="831" x2="1448.5" y1="614.4839" y2="614.4839"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="614.4839" y2="636.4839"/><polygon fill="#A80036" points="1444.5,626.4839,1448.5,636.4839,1452.5,626.4839,1448.5,630.4839" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="739.4214" y2="1135.937"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="754" y1="1135.937" y2="1135.937"/><polygon fill="#A80036" points="744,1131.937,754,1135.937,744,1139.937,748,1135.937" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1117.937" y2="1135.937"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="778" y1="1135.937" y2="1135.937"/><polygon fill="#A80036" points="788,1131.937,778,1135.937,788,1139.937,784,1135.937" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="1147.937" y2="1167.937"/><polygon fill="#A80036" points="762,1157.937,766,1167.937,770,1157.937,766,1161.937" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[9fb4690fe63f7cbdf2f1922d00b6df8b]
2
@startuml
3

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

    
6

    
7

    
8

    
9

    
10

    
11

    
12

    
13

    
14

    
15

    
16

    
17
start
18
note
19
  - - ""**publisher** : urt_publisher_t*"" - -
20
  Pointer to the publisher to use.
21
  Must not be ""NULL"".
22
  - - ""**payload** : void*"" - -
23
  Pointer to the data to be published.
24
  May be ""NULL"" for messages without payload.
25
  - - ""**n** : size_t"" - -
26
  Size of the payload in bytes.
27
  - - ""**t** : urt_osTime_t"" - -
28
  Timestamp to be set for the message.
29
  - - ""**timeout** : urt_delay_t"" - -
30
  Timeout delay in case the message cannot be published.
31
end note
32

    
33

    
34
:lock topic;
35
:access next message;
36
while (HRT consumers left for the message\nor the message timestamp was modified\nand a timeout occurred?) is (yes)
37
  if (Message timestamp was modified?) the (yes)
38
    :iterate to next message;
39
  else (no)
40
    :wait for topic's condition variable (using topic's mutex) to be signaled or timeout;
41
  endif
42
endwhile (no)
43
if (Timeout occurred?) then (yes)
44
  :unlock topic;
45
  :return ""URT_STATUS_ERROR"";
46
else (no)
47
  fork
48
    fork
49
      :iterate topic pointer to this message;
50
    fork again
51
      :copy payload to message;
52
    fork again
53
      :set origin time of message;
54
    fork again
55
      :set number of HRT consumers (from topic);
56
    endfork
57
  fork again
58
    :set QoS rate timer (@topic) wrt. most critical HRT subscriber;
59
  fork again
60
    while (HRT subscribers left?) is (yes)
61
      if (QoS delay timer (@subscriber) is not armed?) then (yes)
62
        :set QoS delay timer (@subscriber) wrt. origin time of the message;
63
        note: No lock required since this timer is only accessed when the topic is locked.
64
      else (no)
65
      endif
66
      :iterate to next HRT subscriber;
67
    endwhile (no)
68
  endfork
69
  :fire event;
70
  note: Msut be within topic lock because of HRT counter.
71
  :unlock topic;
72
  :return ""URT_STATUS_OK"";
73
endif
74

    
75

    
76
stop
77
note
78
  - - **return** ""urt_status_t"" - -
79
  Returns ""URT_STATUS_ERROR"" on timeout.
80
end note
81

    
82

    
83
@enduml
84

    
85
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
86
(GPL source distribution)
87
Java Runtime: OpenJDK Runtime Environment
88
JVM: OpenJDK 64-Bit Server VM
89
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
90
Operating System: Linux
91
Default Encoding: UTF-8
92
Language: en
93
Country: US
94
--></g></svg>