Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / subscriber / urtFrtSubscriberFetchNextMessage.svg @ e87bd7c7

History | View | Annotate | Download (26.208 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="1098px" preserveAspectRatio="none" style="width:1281px;height:1098px;" version="1.1" viewBox="0 0 1281 1098" width="1281px" zoomAndPan="magnify"><defs><filter height="300%" id="fhsp3n667pfg2" 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="595" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="324" x="477.5" y="47.6611">urtFrtSubscriberFetchNextMessage()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="642.5" y="68.6143"/><path d="M631,72.8594 L631,304.7188 L1119,304.7188 L1119,82.8594 L1109,72.8594 L631,72.8594 " fill="#FBFB77" filter="url(#fhsp3n667pfg2)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M1109,72.8594 L1109,82.8594 L1119,82.8594 L1109,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="631" x2="764" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="768" y="89.4263"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="78" x="768" y="89.4263">subscriber</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="132" x="850" y="89.4263">: urt_frtsubscriber_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="986" x2="1119" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="310" x="637" y="105.0591">The FRT subscriber that shall fetch the message.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="637" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="717" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="749" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="631" x2="819" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="823" y="134.8247"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="59" x="823" y="134.8247">payload</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="41" x="886" y="134.8247">: void*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="931" x2="1119" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="238" x="637" y="150.4575">Pointer where to copy the payload to.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="637" y="165.5903">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="687" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="195" x="723" y="165.5903">for messages without payload.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="631" x2="826" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="830" y="180.2231"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="41" x="830" y="180.2231">bytes</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="45" x="875" y="180.2231">: size_t</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="924" x2="1119" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="137" x="637" y="195.856">Payload size in bytes.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="631" x2="799.5" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="803.5" y="210.4888"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="53" x="803.5" y="210.4888">latency</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="86" x="860.5" y="210.4888">: urt_delay_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="950.5" x2="1119" y1="206.4883" y2="206.4883"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="267" x="637" y="226.1216">The latency can be returned by reference.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="637" y="241.2544">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="687" y="241.2544">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="719" y="241.2544">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="631" x2="1119" y1="249.3203" y2="249.3203"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="631" x2="1119" y1="251.3203" y2="251.3203"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="631" x2="804" y1="261.8867" y2="261.8867"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="808" y="265.8872"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="808" y="265.8872">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="85" x="857" y="265.8872">: urt_status_t</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="946" x2="1119" y1="261.8867" y2="261.8867"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="637" y="281.52">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="690" y="281.52">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="75" x="798" y="281.52">on success.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="637" y="296.6528">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="690" y="296.6528">URT_STATUS_ERROR</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="282" x="822" y="296.6528">if the subscriber is not associated to a topic.</text><ellipse cx="875" cy="334.7188" fill="#000000" filter="url(#fhsp3n667pfg2)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fhsp3n667pfg2)" points="812.5,364.7188,937.5,364.7188,949.5,376.7188,937.5,388.7188,812.5,388.7188,800.5,376.7188,812.5,364.7188" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="125" x="812.5" y="380.5269">Associated to a topic?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="780.5" y="374.1245">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="949.5" y="374.1245">no</text><rect fill="#FEFECE" filter="url(#fhsp3n667pfg2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="455" y="398.7188"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="465" y="419.8574">lock topic</text><rect fill="#FFFFFF" filter="url(#fhsp3n667pfg2)" height="307.7651" style="stroke: #000000; stroke-width: 2.0;" width="365.5" x="322" y="443.4893"/><path d="M506,444.4893 L506,452.7861 L496,462.7861 L322,462.7861 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="174" x="325" y="457.4844">find oldest valid message</text><rect fill="#FEFECE" filter="url(#fhsp3n667pfg2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="181" x="404.5" y="585.3169"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="161" x="414.5" y="606.4556">proceed to next message</text><polygon fill="#FEFECE" filter="url(#fhsp3n667pfg2)" points="378,528.1885,612,528.1885,624,540.1885,612,552.1885,378,552.1885,366,540.1885,378,528.1885" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="499" y="562.3989">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="234" x="378" y="543.9966">Timestamp of next message is younger?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="352" y="537.5942">no</text><polygon fill="#FEFECE" filter="url(#fhsp3n667pfg2)" points="345.5,479.7861,644.5,479.7861,656.5,491.7861,644.5,503.7861,345.5,503.7861,333.5,491.7861,345.5,479.7861" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="499" y="513.9966">no</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="299" x="345.5" y="495.5942">Timestamp of last read message euqals local copy?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="656.5" y="489.1919">yes</text><polygon fill="#FEFECE" filter="url(#fhsp3n667pfg2)" points="495,661.2856,507,673.2856,495,685.2856,483,673.2856,495,661.2856" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fhsp3n667pfg2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="181" x="404.5" y="705.2856"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="161" x="414.5" y="726.4243">proceed to next message</text><rect fill="#FFFFFF" filter="url(#fhsp3n667pfg2)" height="226.668" style="stroke: #000000; stroke-width: 2.0;" width="988" x="10" y="762.0562"/><path d="M123,763.0562 L123,771.353 L113,781.353 L10,781.353 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="103" x="13" y="776.0513">fetch message</text><rect fill="#000000" filter="url(#fhsp3n667pfg2)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="968" x="20" y="798.353"/><rect fill="#FEFECE" filter="url(#fhsp3n667pfg2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="175" x="34" y="872.7554"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="155" x="44" y="893.894">update message pointer</text><rect fill="#FEFECE" filter="url(#fhsp3n667pfg2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="196" x="219" y="872.7554"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="176" x="229" y="893.894">copy timestamp of message</text><rect fill="#FEFECE" filter="url(#fhsp3n667pfg2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="163" x="443" y="872.7554"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="143" x="453" y="893.894">copy message payload</text><rect fill="#FEFECE" filter="url(#fhsp3n667pfg2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="308" x="644" y="872.7554"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="20" x="654" y="893.894">set</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="49" x="678" y="893.894">latency</text><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="211" x="731" y="893.894">value (now - message origin time)</text><polygon fill="#FEFECE" filter="url(#fhsp3n667pfg2)" points="678.5,824.353,917.5,824.353,929.5,836.353,917.5,848.353,678.5,848.353,666.5,836.353,678.5,824.353" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="802" y="858.5635">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="146" x="678.5" y="840.1611">Optional output argument</text><text fill="#000000" font-family="monospace" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="49" x="828.5" y="840.1611">latency</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="36" x="881.5" y="840.1611">given?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="929.5" y="833.7588">no</text><polygon fill="#FEFECE" filter="url(#fhsp3n667pfg2)" points="798,926.7241,810,938.7241,798,950.7241,786,938.7241,798,926.7241" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#000000" filter="url(#fhsp3n667pfg2)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="968" x="20" y="970.7241"/><rect fill="#FEFECE" filter="url(#fhsp3n667pfg2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="447" y="1008.7241"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="457" y="1029.8628">unlock topic</text><path d="M282,1061.1265 L282,1086.2593 A0,0 0 0 0 282,1086.2593 L464,1086.2593 A0,0 0 0 0 464,1086.2593 L464,1079.1265 L484,1073.6929 L464,1071.1265 L464,1071.1265 L454,1061.1265 L282,1061.1265 A0,0 0 0 0 282,1061.1265 " fill="#FBFB77" filter="url(#fhsp3n667pfg2)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M454,1061.1265 L454,1071.1265 L464,1071.1265 L454,1061.1265 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="288" y="1078.1934">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="341" y="1078.1934">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="445" y="1078.1934">.</text><ellipse cx="495" cy="1073.6929" fill="#FFFFFF" filter="url(#fhsp3n667pfg2)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="495" cy="1073.6929" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><path d="M1018,398.7188 L1018,423.8516 A0,0 0 0 0 1018,423.8516 L1224,423.8516 A0,0 0 0 0 1224,423.8516 L1224,416.7188 L1244,411.2852 L1224,408.7188 L1224,408.7188 L1214,398.7188 L1018,398.7188 A0,0 0 0 0 1018,398.7188 " fill="#FBFB77" filter="url(#fhsp3n667pfg2)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M1214,398.7188 L1214,408.7188 L1224,408.7188 L1214,398.7188 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="1024" y="415.7856">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="1077" y="415.7856">URT_STATUS_ERROR</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="1205" y="415.7856">.</text><ellipse cx="1255" cy="411.2852" fill="#FFFFFF" filter="url(#fhsp3n667pfg2)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="1255" cy="411.2852" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="875" x2="875" y1="304.7188" y2="324.7188"/><polygon fill="#A80036" points="871,314.7188,875,324.7188,879,314.7188,875,318.7188" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="552.1885" y2="585.3169"/><polygon fill="#A80036" points="491,575.3169,495,585.3169,499,575.3169,495,579.3169" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="619.2856" y2="629.2856"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="636" y1="629.2856" y2="629.2856"/><polygon fill="#A80036" points="632,593.8989,636,583.8989,640,593.8989,636,589.8989" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="636" x2="636" y1="540.1885" y2="629.2856"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="636" x2="624" y1="540.1885" y2="540.1885"/><polygon fill="#A80036" points="634,536.1885,624,540.1885,634,544.1885,630,540.1885" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="366" x2="354" y1="540.1885" y2="540.1885"/><polygon fill="#A80036" points="350,579.8989,354,589.8989,358,579.8989,354,583.8989" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="354" x2="354" y1="540.1885" y2="641.2856"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="354" x2="495" y1="641.2856" y2="641.2856"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="641.2856" y2="661.2856"/><polygon fill="#A80036" points="491,651.2856,495,661.2856,499,651.2856,495,655.2856" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="503.7861" y2="528.1885"/><polygon fill="#A80036" points="491,518.1885,495,528.1885,499,518.1885,495,522.1885" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="656.5" x2="668.5" y1="491.7861" y2="491.7861"/><polygon fill="#A80036" points="664.5,573.8989,668.5,583.8989,672.5,573.8989,668.5,577.8989" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="668.5" x2="668.5" y1="491.7861" y2="673.2856"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="668.5" x2="507" y1="673.2856" y2="673.2856"/><polygon fill="#A80036" points="517,669.2856,507,673.2856,517,677.2856,513,673.2856" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="685.2856" y2="705.2856"/><polygon fill="#A80036" points="491,695.2856,495,705.2856,499,695.2856,495,699.2856" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="432.6875" y2="479.7861"/><polygon fill="#A80036" points="491,469.7861,495,479.7861,499,469.7861,495,473.7861" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="798" x2="798" y1="848.353" y2="872.7554"/><polygon fill="#A80036" points="794,862.7554,798,872.7554,802,862.7554,798,866.7554" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="929.5" x2="962" y1="836.353" y2="836.353"/><polygon fill="#A80036" points="958,879.7397,962,889.7397,966,879.7397,962,883.7397" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="962" x2="962" y1="836.353" y2="938.7241"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="962" x2="810" y1="938.7241" y2="938.7241"/><polygon fill="#A80036" points="820,934.7241,810,938.7241,820,942.7241,816,938.7241" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="798" x2="798" y1="906.7241" y2="926.7241"/><polygon fill="#A80036" points="794,916.7241,798,926.7241,802,916.7241,798,920.7241" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="121.5" x2="121.5" y1="804.353" y2="872.7554"/><polygon fill="#A80036" points="117.5,862.7554,121.5,872.7554,125.5,862.7554,121.5,866.7554" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="317" x2="317" y1="804.353" y2="872.7554"/><polygon fill="#A80036" points="313,862.7554,317,872.7554,321,862.7554,317,866.7554" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="524.5" x2="524.5" y1="804.353" y2="872.7554"/><polygon fill="#A80036" points="520.5,862.7554,524.5,872.7554,528.5,862.7554,524.5,866.7554" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="798" x2="798" y1="804.353" y2="824.353"/><polygon fill="#A80036" points="794,814.353,798,824.353,802,814.353,798,818.353" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="121.5" x2="121.5" y1="906.7241" y2="970.7241"/><polygon fill="#A80036" points="117.5,960.7241,121.5,970.7241,125.5,960.7241,121.5,964.7241" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="317" x2="317" y1="906.7241" y2="970.7241"/><polygon fill="#A80036" points="313,960.7241,317,970.7241,321,960.7241,317,964.7241" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="524.5" x2="524.5" y1="906.7241" y2="970.7241"/><polygon fill="#A80036" points="520.5,960.7241,524.5,970.7241,528.5,960.7241,524.5,964.7241" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="798" x2="798" y1="950.7241" y2="970.7241"/><polygon fill="#A80036" points="794,960.7241,798,970.7241,802,960.7241,798,964.7241" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="739.2544" y2="798.353"/><polygon fill="#A80036" points="491,788.353,495,798.353,499,788.353,495,792.353" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="976.7241" y2="1008.7241"/><polygon fill="#A80036" points="491,998.7241,495,1008.7241,499,998.7241,495,1002.7241" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="1042.6929" y2="1062.6929"/><polygon fill="#A80036" points="491,1052.6929,495,1062.6929,499,1052.6929,495,1056.6929" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="800.5" x2="495" y1="376.7188" y2="376.7188"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="495" x2="495" y1="376.7188" y2="398.7188"/><polygon fill="#A80036" points="491,388.7188,495,398.7188,499,388.7188,495,392.7188" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="949.5" x2="1255" y1="376.7188" y2="376.7188"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1255" x2="1255" y1="376.7188" y2="400.2852"/><polygon fill="#A80036" points="1251,390.2852,1255,400.2852,1259,390.2852,1255,394.2852" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="875" x2="875" y1="344.7188" y2="364.7188"/><polygon fill="#A80036" points="871,354.7188,875,364.7188,879,354.7188,875,358.7188" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[b4d8deb4bdd0e27d6df9418617a46e52]
2
@startuml
3

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

    
6

    
7

    
8

    
9

    
10

    
11

    
12
note
13
  - - **subscriber** : urt_frtsubscriber_t* - -
14
  The FRT subscriber that shall fetch the message.
15
  Must not be ""NULL"".
16
  - - **payload** : void* - -
17
  Pointer where to copy the payload to.
18
  May be ""NULL"" for messages without payload.
19
  - - **bytes** : size_t - -
20
  Payload size in bytes.
21
  - - **latency** : urt_delay_t* - -
22
  The latency can be returned by reference.
23
  May be ""NULL"".
24
  ====
25
  - - **return** : urt_status_t - -
26
  Returns ""URT_STATUS_OK"" on success.
27
  Returns ""URT_STATUS_ERROR"" if the subscriber is not associated to a topic.
28
endnote
29

    
30

    
31
start
32
if (Associated to a topic?) then (yes)
33
  :lock topic;
34
    partition "find oldest valid message" {
35
    if (Timestamp of last read message euqals local copy?) then (yes)
36
    else (no)
37
      while (Timestamp of next message is younger?) is (yes)
38
        :proceed to next message;
39
      endwhile (no)
40
    endif
41
    :proceed to next message;
42
  }
43
    partition "fetch message" {
44
    fork
45
      :update message pointer;
46
    fork again
47
        :copy timestamp of message;
48
    fork again
49
      :copy message payload;
50
    fork again
51
      if (Optional output argument ""latency"" given?) then (yes)
52
        :set ""latency"" value (now - message origin time);
53
      else (no)
54
      endif
55
    endfork
56
  }
57
  :unlock topic;
58
  stop
59
  note
60
    Returns ""URT_STATUS_OK"".
61
  endnote
62
else (no)
63
  stop
64
  note
65
    Returns ""URT_STATUS_ERROR"".
66
  endnote
67
endif
68

    
69

    
70
@enduml
71

    
72
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
73
(GPL source distribution)
74
Java Runtime: OpenJDK Runtime Environment
75
JVM: OpenJDK 64-Bit Server VM
76
Java Version: 11.0.6+10-post-Ubuntu-1ubuntu118.04.1
77
Operating System: Linux
78
Default Encoding: UTF-8
79
Language: en
80
Country: US
81
--></g></svg>