Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / publisher / urtPublisherPublish.svg @ 7491c395

History | View | Annotate | Download (33.836 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="1255px" preserveAspectRatio="none" style="width:2678px;height:1255px;" version="1.1" viewBox="0 0 2678 1255" width="2678px" zoomAndPan="magnify"><defs><filter height="300%" id="f52skes7don2n" 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(#f52skes7don2n)" 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(#f52skes7don2n)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f52skes7don2n)" 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(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="137" x="697.5" y="338.4219"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="117" x="707.5" y="359.5605">lock next message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="705" y="448.1011"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="715" y="469.2397">unlock message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="524" x="504" y="502.0698"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="504" x="514" y="523.2085">wait for topic's condition variable (using topic's mutex) to be signaled or timeout</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="106" x="713" y="556.0386"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="86" x="723" y="577.1772">lock message</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="626,392.3906,906,392.3906,918,404.3906,906,416.3906,626,416.3906,614,404.3906,626,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="426.6011">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="280" x="626" y="408.1987">HRT consumers left for the message or timeout?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="600" y="401.7964">no</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="713,632.0073,819,632.0073,831,644.0073,819,656.0073,713,656.0073,701,644.0073,713,632.0073" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="106" x="713" y="647.8154">Timeout occurred?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="681" y="641.4131">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="831" y="641.4131">no</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="36.5" y="666.0073"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="46.5" y="687.146">unlock message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="49.5" y="734.9761"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="59.5" y="756.1147">unlock topic</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="175" x="10" y="803.9448"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="20" y="825.0835">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="112" x="63" y="825.0835">URT_STATUS_ERROR</text><rect fill="#000000" filter="url(#f52skes7don2n)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="2471" x="195" y="666.0073"/><rect fill="#000000" filter="url(#f52skes7don2n)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1014" x="207" y="756.812"/><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="251" x="219" y="782.812"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="231" x="229" y="803.9507">iterate topic pointer to this message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="180" x="498" y="782.812"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="160" x="508" y="803.9507">copy payload to message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="187" x="706" y="782.812"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="167" x="716" y="803.9507">set origin time of message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="286" x="921" y="782.812"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="266" x="931" y="803.9507">set number of HRT consumers (from topic)</text><rect fill="#000000" filter="url(#f52skes7don2n)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1014" x="207" y="836.7808"/><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="122" x="652" y="877.7808"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="102" x="662" y="898.9194">unlock message</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="398" x="1249" y="817.2964"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="378" x="1259" y="838.4351">set QoS rate timer (@topic) wrt. most critical HRT subscriber</text><path d="M1675,805.6323 L1675,830.7651 A0,0 0 0 0 1675,830.7651 L2170,830.7651 A0,0 0 0 0 2170,830.7651 L2170,823.6323 L2190,818.1987 L2170,815.6323 L2170,815.6323 L2160,805.6323 L1675,805.6323 A0,0 0 0 0 1675,805.6323 " fill="#FBFB77" filter="url(#f52skes7don2n)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M2160,805.6323 L2160,815.6323 L2170,815.6323 L2160,805.6323 " 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="822.6992">No lock required since this timer is only accessed when the topic is locked.</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="434" x="2190" y="801.2144"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="414" x="2200" y="822.353">set QoS delay timer (@subscriber) wrt. origin time of the message</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="2277,752.812,2537,752.812,2549,764.812,2537,776.812,2277,776.812,2265,764.812,2277,752.812" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="2411" y="787.0225">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="260" x="2277" y="768.6201">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="762.2178">no</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="2407,859.5854,2419,871.5854,2407,883.5854,2395,871.5854,2407,859.5854" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="208" x="2303" y="918.5854"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="188" x="2313" y="939.7241">iterate to next HRT subscriber</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="2346,692.0073,2468,692.0073,2480,704.0073,2468,716.0073,2346,716.0073,2334,704.0073,2346,692.0073" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="2411" y="726.2178">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="122" x="2346" y="707.8154">HRT subscribers left?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="2320" y="701.4131">no</text><rect fill="#000000" filter="url(#f52skes7don2n)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="2471" x="195" y="994.5542"/><path d="M1053,1024.9722 L1053,1050.105 A0,0 0 0 0 1053,1050.105 L1389,1050.105 A0,0 0 0 0 1389,1050.105 L1389,1042.9722 L1409,1037.5386 L1389,1034.9722 L1389,1034.9722 L1379,1024.9722 L1053,1024.9722 A0,0 0 0 0 1053,1024.9722 " fill="#FBFB77" filter="url(#f52skes7don2n)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M1379,1024.9722 L1379,1034.9722 L1389,1034.9722 L1379,1024.9722 " 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="1042.0391">Msut be within topic lock because of HRT counter.</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="1409" y="1020.5542"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="59" x="1419" y="1041.6929">fire event</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="1400.5" y="1074.5229"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="1410.5" y="1095.6616">unlock topic</text><rect fill="#FEFECE" filter="url(#f52skes7don2n)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="154" x="1371.5" y="1128.4917"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="1381.5" y="1149.6304">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="91" x="1424.5" y="1149.6304">URT_STATUS_OK</text><polygon fill="#FEFECE" filter="url(#f52skes7don2n)" points="766,1168.4604,778,1180.4604,766,1192.4604,754,1180.4604,766,1168.4604" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M455,1203.3276 L455,1243.5933 A0,0 0 0 0 455,1243.5933 L735,1243.5933 A0,0 0 0 0 735,1243.5933 L735,1227.4604 L755,1223.4604 L735,1219.4604 L735,1213.3276 L725,1203.3276 L455,1203.3276 A0,0 0 0 0 455,1203.3276 " fill="#FBFB77" filter="url(#f52skes7don2n)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M725,1203.3276 L725,1213.3276 L735,1213.3276 L725,1203.3276 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="455" x2="518.5" y1="1215.894" y2="1215.894"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="522.5" y="1219.8945"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="522.5" y="1219.8945">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="571.5" y="1219.8945"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="571.5" y="1219.8945">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="671.5" y="1219.8945"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="671.5" x2="735" y1="1215.894" y2="1215.894"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="461" y="1235.5273">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="514" y="1235.5273">URT_STATUS_ERROR</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="74" x="646" y="1235.5273">on timeout.</text><ellipse cx="766" cy="1223.4604" fill="#FFFFFF" filter="url(#f52skes7don2n)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="766" cy="1223.4604" 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="766" x2="766" y1="482.0698" y2="502.0698"/><polygon fill="#A80036" points="762,492.0698,766,502.0698,770,492.0698,766,496.0698" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="536.0386" y2="556.0386"/><polygon fill="#A80036" points="762,546.0386,766,556.0386,770,546.0386,766,550.0386" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="416.3906" y2="448.1011"/><polygon fill="#A80036" points="762,438.1011,766,448.1011,770,438.1011,766,442.1011" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="590.0073" y2="600.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="1040" y1="600.0073" y2="600.0073"/><polygon fill="#A80036" points="1036,510.6519,1040,500.6519,1044,510.6519,1040,506.6519" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1040" x2="1040" y1="404.3906" y2="600.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1040" x2="918" y1="404.3906" y2="404.3906"/><polygon fill="#A80036" points="928,400.3906,918,404.3906,928,408.3906,924,404.3906" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="614" x2="492" y1="404.3906" y2="404.3906"/><polygon fill="#A80036" points="488,496.6519,492,506.6519,496,496.6519,492,500.6519" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="492" x2="492" y1="404.3906" y2="612.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="492" x2="766" y1="612.0073" y2="612.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="612.0073" y2="632.0073"/><polygon fill="#A80036" points="762,622.0073,766,632.0073,770,622.0073,766,626.0073" 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="699.9761" y2="734.9761"/><polygon fill="#A80036" points="93.5,724.9761,97.5,734.9761,101.5,724.9761,97.5,728.9761" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="768.9448" y2="803.9448"/><polygon fill="#A80036" points="93.5,793.9448,97.5,803.9448,101.5,793.9448,97.5,797.9448" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="344.5" x2="344.5" y1="762.812" y2="782.812"/><polygon fill="#A80036" points="340.5,772.812,344.5,782.812,348.5,772.812,344.5,776.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="588" x2="588" y1="762.812" y2="782.812"/><polygon fill="#A80036" points="584,772.812,588,782.812,592,772.812,588,776.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="799.5" x2="799.5" y1="762.812" y2="782.812"/><polygon fill="#A80036" points="795.5,772.812,799.5,782.812,803.5,772.812,799.5,776.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1064" x2="1064" y1="762.812" y2="782.812"/><polygon fill="#A80036" points="1060,772.812,1064,782.812,1068,772.812,1064,776.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="344.5" x2="344.5" y1="816.7808" y2="836.7808"/><polygon fill="#A80036" points="340.5,826.7808,344.5,836.7808,348.5,826.7808,344.5,830.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="588" x2="588" y1="816.7808" y2="836.7808"/><polygon fill="#A80036" points="584,826.7808,588,836.7808,592,826.7808,588,830.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="799.5" x2="799.5" y1="816.7808" y2="836.7808"/><polygon fill="#A80036" points="795.5,826.7808,799.5,836.7808,803.5,826.7808,799.5,830.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1064" x2="1064" y1="816.7808" y2="836.7808"/><polygon fill="#A80036" points="1060,826.7808,1064,836.7808,1068,826.7808,1064,830.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="713" x2="713" y1="842.7808" y2="877.7808"/><polygon fill="#A80036" points="709,867.7808,713,877.7808,717,867.7808,713,871.7808" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="776.812" y2="801.2144"/><polygon fill="#A80036" points="2403,791.2144,2407,801.2144,2411,791.2144,2407,795.2144" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2549" x2="2634" y1="764.812" y2="764.812"/><polygon fill="#A80036" points="2630,808.1987,2634,818.1987,2638,808.1987,2634,812.1987" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2634" x2="2634" y1="764.812" y2="871.5854"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2634" x2="2419" y1="871.5854" y2="871.5854"/><polygon fill="#A80036" points="2429,867.5854,2419,871.5854,2429,875.5854,2425,871.5854" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="835.1831" y2="859.5854"/><polygon fill="#A80036" points="2403,849.5854,2407,859.5854,2411,849.5854,2407,853.5854" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="883.5854" y2="918.5854"/><polygon fill="#A80036" points="2403,908.5854,2407,918.5854,2411,908.5854,2407,912.5854" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="716.0073" y2="752.812"/><polygon fill="#A80036" points="2403,742.812,2407,752.812,2411,742.812,2407,746.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="952.5542" y2="962.5542"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2652" y1="962.5542" y2="962.5542"/><polygon fill="#A80036" points="2648,844.2808,2652,834.2808,2656,844.2808,2652,840.2808" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2652" x2="2652" y1="704.0073" y2="962.5542"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2652" x2="2480" y1="704.0073" y2="704.0073"/><polygon fill="#A80036" points="2490,700.0073,2480,704.0073,2490,708.0073,2486,704.0073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2334" x2="1661" y1="704.0073" y2="704.0073"/><polygon fill="#A80036" points="1657,830.2808,1661,840.2808,1665,830.2808,1661,834.2808" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1661" x2="1661" y1="704.0073" y2="974.5542"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1661" x2="2407" y1="974.5542" y2="974.5542"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="974.5542" y2="994.5542"/><polygon fill="#A80036" points="2403,984.5542,2407,994.5542,2411,984.5542,2407,988.5542" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="713" x2="713" y1="672.0073" y2="756.812"/><polygon fill="#A80036" points="709,746.812,713,756.812,717,746.812,713,750.812" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448" x2="1448" y1="672.0073" y2="817.2964"/><polygon fill="#A80036" points="1444,807.2964,1448,817.2964,1452,807.2964,1448,811.2964" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="2407" x2="2407" y1="672.0073" y2="692.0073"/><polygon fill="#A80036" points="2403,682.0073,2407,692.0073,2411,682.0073,2407,686.0073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="713" x2="713" y1="911.7495" y2="994.5542"/><polygon fill="#A80036" points="709,984.5542,713,994.5542,717,984.5542,713,988.5542" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448" x2="1448" y1="851.2651" y2="994.5542"/><polygon fill="#A80036" points="1444,984.5542,1448,994.5542,1452,984.5542,1448,988.5542" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1000.5542" y2="1020.5542"/><polygon fill="#A80036" points="1444.5,1010.5542,1448.5,1020.5542,1452.5,1010.5542,1448.5,1014.5542" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1054.5229" y2="1074.5229"/><polygon fill="#A80036" points="1444.5,1064.5229,1448.5,1074.5229,1452.5,1064.5229,1448.5,1068.5229" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1108.4917" y2="1128.4917"/><polygon fill="#A80036" points="1444.5,1118.4917,1448.5,1128.4917,1452.5,1118.4917,1448.5,1122.4917" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="701" x2="97.5" y1="644.0073" y2="644.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="644.0073" y2="666.0073"/><polygon fill="#A80036" points="93.5,656.0073,97.5,666.0073,101.5,656.0073,97.5,660.0073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="831" x2="1448.5" y1="644.0073" y2="644.0073"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="644.0073" y2="666.0073"/><polygon fill="#A80036" points="1444.5,656.0073,1448.5,666.0073,1452.5,656.0073,1448.5,660.0073" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="97.5" y1="837.9136" y2="1180.4604"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="97.5" x2="754" y1="1180.4604" y2="1180.4604"/><polygon fill="#A80036" points="744,1176.4604,754,1180.4604,744,1184.4604,748,1180.4604" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="1448.5" y1="1162.4604" y2="1180.4604"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1448.5" x2="778" y1="1180.4604" y2="1180.4604"/><polygon fill="#A80036" points="788,1176.4604,778,1180.4604,788,1184.4604,784,1180.4604" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="766" x2="766" y1="1192.4604" y2="1212.4604"/><polygon fill="#A80036" points="762,1202.4604,766,1212.4604,770,1202.4604,766,1206.4604" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[e44595ad172491fa748569169893175b]
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
:lock next message;
36
while (HRT consumers left for the message or timeout?) is (yes)
37
  :unlock message;
38
  :wait for topic's condition variable (using topic's mutex) to be signaled or timeout;
39
  :lock message;
40
endwhile (no)
41
if (Timeout occurred?) then (yes)
42
  :unlock message;
43
  :unlock topic;
44
  :return ""URT_STATUS_ERROR"";
45
else (no)
46
  fork
47
    fork
48
      :iterate topic pointer to this message;
49
    fork again
50
      :copy payload to message;
51
    fork again
52
      :set origin time of message;
53
    fork again
54
      :set number of HRT consumers (from topic);
55
    endfork
56
    :unlock message;
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>