Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / subscriber / urtSubscriberSubscribeSrt.svg @ 7491c395

History | View | Annotate | Download (25.134 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="1033px" preserveAspectRatio="none" style="width:1585px;height:1033px;" version="1.1" viewBox="0 0 1585 1033" width="1585px" zoomAndPan="magnify"><defs><filter height="300%" id="fpn8q0zv481k2" 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="747.375" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="159" x="712.375" y="47.6611">urtSubscriberSrt()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="794.875" y="68.6143"/><path d="M10,72.8594 L10,324.9844 A0,0 0 0 0 10,324.9844 L548,324.9844 A0,0 0 0 0 548,324.9844 L548,202.9219 L568,198.9219 L548,194.9219 L548,82.8594 L538,72.8594 L10,72.8594 A0,0 0 0 0 10,72.8594 " fill="#FBFB77" filter="url(#fpn8q0zv481k2)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M538,72.8594 L538,82.8594 L548,82.8594 L538,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="155" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="159" y="89.4263"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="80" x="159" y="89.4263">subscriber</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="152" x="247" y="89.4263">: urt_subscriber_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="403" y="89.4263"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="403" x2="548" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="298" x="16" y="105.0591">The subscriber which shall subscribe to a topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="195" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="199" y="134.8247"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="40" x="199" y="134.8247">topic</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="112" x="247" y="134.8247">: urt_topic_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="363" y="134.8247"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="363" x2="548" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="161" x="16" y="150.4575">The topic to subscribe to.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="165.5903">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="165.5903">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="175" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="179" y="180.2231"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="64" x="179" y="180.2231">messages</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="251" y="180.2231">: urt_message_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="383" y="180.2231"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="383" x2="548" y1="176.2227" y2="176.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="303" x="16" y="195.856">List of messages to be contributed to the topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="373" x="16" y="210.9888">Those messages must not be associated to another topic.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="517" x="16" y="226.1216">Once a message was contributed, it cannot be removed from the topic anymore.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="119" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="123" y="240.7544"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="96" x="123" y="240.7544">usefulnesscb</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="208" x="227" y="240.7544">: urt_srtusefulnessfunc_t*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="439" y="240.7544"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="439" x2="548" y1="236.7539" y2="236.7539"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="374" x="16" y="256.3872">Pointer to a function to calculate usefulness of a message.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="16" y="271.52">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="96" y="271.52">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="128" y="271.52">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="10" x2="211" y1="282.1523" y2="282.1523"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="215" y="286.1528"/><text fill="#000000" font-family="monospace" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="64" x="215" y="286.1528">cbparams</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="56" x="287" y="286.1528">: void*</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="347" y="286.1528"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="347" x2="548" y1="282.1523" y2="282.1523"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="309" x="16" y="301.7856">Optional parameters for the usefulness callback.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="46" x="16" y="316.9185">May be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="66" y="316.9185">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="244" x="102" y="316.9185">if the callback expects no parameters.</text><ellipse cx="578" cy="198.9219" fill="#000000" filter="url(#fpn8q0zv481k2)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#fpn8q0zv481k2)" points="520.5,344.9844,635.5,344.9844,647.5,356.9844,635.5,368.9844,520.5,368.9844,508.5,356.9844,520.5,344.9844" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="115" x="520.5" y="360.7925">Is topic already set?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="488.5" y="354.3901">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="647.5" y="354.3901">no</text><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="175" x="115.75" y="378.9844"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="125.75" y="400.123">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="112" x="168.75" y="400.123">URT_STATUS_ERROR</text><rect fill="#000000" filter="url(#fpn8q0zv481k2)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="231" x="837.25" y="378.9844"/><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="100" x="851.25" y="404.9844"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="80" x="861.25" y="426.123">set SRT data</text><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="75" x="979.25" y="404.9844"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="55" x="989.25" y="426.123">set topic</text><rect fill="#000000" filter="url(#fpn8q0zv481k2)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="231" x="837.25" y="458.9531"/><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="80" x="912.75" y="484.9531"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="60" x="922.75" y="506.0918">lock topic</text><rect fill="#000000" filter="url(#fpn8q0zv481k2)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1264" x="310.75" y="538.9219"/><rect fill="#FFFFFF" filter="url(#fpn8q0zv481k2)" height="151.2344" style="stroke: #000000; stroke-width: 2.0;" width="638" x="334.75" y="611.4341"/><path d="M491.75,612.4341 L491.75,620.731 L481.75,630.731 L334.75,630.731 " fill="none" style="stroke: #000000; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="147" x="337.75" y="625.4292">contribute messages</text><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="474" x="416.75" y="647.731"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="454" x="426.75" y="668.8696">set next pointer of topic's latest message to first message to contribute</text><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="618" x="344.75" y="716.6997"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="598" x="354.75" y="737.8384">set next pointer of last message to contribute to the message after the topic's latest message</text><polygon fill="#FEFECE" filter="url(#fpn8q0zv481k2)" points="583.75,564.9219,723.75,564.9219,735.75,576.9219,723.75,588.9219,583.75,588.9219,571.75,576.9219,583.75,564.9219" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="657.75" y="599.1323">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="140" x="583.75" y="580.73">Messages to contribute?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="735.75" y="574.3276">no</text><polygon fill="#FEFECE" filter="url(#fpn8q0zv481k2)" points="653.75,782.6685,665.75,794.6685,653.75,806.6685,641.75,794.6685,653.75,782.6685" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="313" x="1022.75" y="674.0669"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="293" x="1032.75" y="695.2056">set message pointer to topic's latest message</text><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="217" x="1345.75" y="674.0669"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="197" x="1355.75" y="695.2056">register to topic's event source</text><rect fill="#000000" filter="url(#fpn8q0zv481k2)" height="6" rx="2.5" ry="2.5" style="stroke: #000000; stroke-width: 1.0;" width="1264" x="310.75" y="826.6685"/><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="904.75" y="852.6685"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="76" x="914.75" y="873.8071">unlock topic</text><rect fill="#FEFECE" filter="url(#fpn8q0zv481k2)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="154" x="875.75" y="906.6372"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="39" x="885.75" y="927.7759">return</text><text fill="#000000" font-family="monospace" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="91" x="928.75" y="927.7759">URT_STATUS_OK</text><polygon fill="#FEFECE" filter="url(#fpn8q0zv481k2)" points="578,946.606,590,958.606,578,970.606,566,958.606,578,946.606" style="stroke: #A80036; stroke-width: 1.5;"/><path d="M19,981.4731 L19,1021.7388 A0,0 0 0 0 19,1021.7388 L547,1021.7388 A0,0 0 0 0 547,1021.7388 L547,1005.606 L567,1001.606 L547,997.606 L547,991.4731 L537,981.4731 L19,981.4731 A0,0 0 0 0 19,981.4731 " fill="#FBFB77" filter="url(#fpn8q0zv481k2)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M537,981.4731 L537,991.4731 L547,991.4731 L537,981.4731 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="19" x2="206.5" y1="994.0396" y2="994.0396"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="210.5" y="998.04"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="210.5" y="998.04">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="259.5" y="998.04"/><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="96" x="259.5" y="998.04">urt_status_t</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="359.5" y="998.04"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="359.5" x2="547" y1="994.0396" y2="994.0396"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="25" y="1013.6729">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="128" x="78" y="1013.6729">URT_STATUS_ERROR</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="322" x="210" y="1013.6729">if the subscriber was already associated to a topic.</text><ellipse cx="578" cy="1001.606" fill="#FFFFFF" filter="url(#fpn8q0zv481k2)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="578" cy="1001.606" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="901.25" x2="901.25" y1="384.9844" y2="404.9844"/><polygon fill="#A80036" points="897.25,394.9844,901.25,404.9844,905.25,394.9844,901.25,398.9844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1016.75" x2="1016.75" y1="384.9844" y2="404.9844"/><polygon fill="#A80036" points="1012.75,394.9844,1016.75,404.9844,1020.75,394.9844,1016.75,398.9844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="901.25" x2="901.25" y1="438.9531" y2="458.9531"/><polygon fill="#A80036" points="897.25,448.9531,901.25,458.9531,905.25,448.9531,901.25,452.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1016.75" x2="1016.75" y1="438.9531" y2="458.9531"/><polygon fill="#A80036" points="1012.75,448.9531,1016.75,458.9531,1020.75,448.9531,1016.75,452.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="952.75" x2="952.75" y1="464.9531" y2="484.9531"/><polygon fill="#A80036" points="948.75,474.9531,952.75,484.9531,956.75,474.9531,952.75,478.9531" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="653.75" x2="653.75" y1="681.6997" y2="716.6997"/><polygon fill="#A80036" points="649.75,706.6997,653.75,716.6997,657.75,706.6997,653.75,710.6997" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="653.75" x2="653.75" y1="588.9219" y2="647.731"/><polygon fill="#A80036" points="649.75,637.731,653.75,647.731,657.75,637.731,653.75,641.731" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="735.75" x2="982.75" y1="576.9219" y2="576.9219"/><polygon fill="#A80036" points="978.75,681.0513,982.75,691.0513,986.75,681.0513,982.75,685.0513" style="stroke: #A80036; stroke-width: 1.5;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="982.75" x2="982.75" y1="576.9219" y2="794.6685"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="982.75" x2="665.75" y1="794.6685" y2="794.6685"/><polygon fill="#A80036" points="675.75,790.6685,665.75,794.6685,675.75,798.6685,671.75,794.6685" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="653.75" x2="653.75" y1="750.6685" y2="782.6685"/><polygon fill="#A80036" points="649.75,772.6685,653.75,782.6685,657.75,772.6685,653.75,776.6685" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="653.75" x2="653.75" y1="544.9219" y2="564.9219"/><polygon fill="#A80036" points="649.75,554.9219,653.75,564.9219,657.75,554.9219,653.75,558.9219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1179.25" x2="1179.25" y1="544.9219" y2="674.0669"/><polygon fill="#A80036" points="1175.25,664.0669,1179.25,674.0669,1183.25,664.0669,1179.25,668.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1454.25" x2="1454.25" y1="544.9219" y2="674.0669"/><polygon fill="#A80036" points="1450.25,664.0669,1454.25,674.0669,1458.25,664.0669,1454.25,668.0669" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="653.75" x2="653.75" y1="806.6685" y2="826.6685"/><polygon fill="#A80036" points="649.75,816.6685,653.75,826.6685,657.75,816.6685,653.75,820.6685" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1179.25" x2="1179.25" y1="708.0356" y2="826.6685"/><polygon fill="#A80036" points="1175.25,816.6685,1179.25,826.6685,1183.25,816.6685,1179.25,820.6685" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="1454.25" x2="1454.25" y1="708.0356" y2="826.6685"/><polygon fill="#A80036" points="1450.25,816.6685,1454.25,826.6685,1458.25,816.6685,1454.25,820.6685" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="952.75" x2="952.75" y1="518.9219" y2="538.9219"/><polygon fill="#A80036" points="948.75,528.9219,952.75,538.9219,956.75,528.9219,952.75,532.9219" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="952.75" x2="952.75" y1="832.6685" y2="852.6685"/><polygon fill="#A80036" points="948.75,842.6685,952.75,852.6685,956.75,842.6685,952.75,846.6685" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="952.75" x2="952.75" y1="886.6372" y2="906.6372"/><polygon fill="#A80036" points="948.75,896.6372,952.75,906.6372,956.75,896.6372,952.75,900.6372" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="508.5" x2="203.25" y1="356.9844" y2="356.9844"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203.25" x2="203.25" y1="356.9844" y2="378.9844"/><polygon fill="#A80036" points="199.25,368.9844,203.25,378.9844,207.25,368.9844,203.25,372.9844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="647.5" x2="952.75" y1="356.9844" y2="356.9844"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="952.75" x2="952.75" y1="356.9844" y2="378.9844"/><polygon fill="#A80036" points="948.75,368.9844,952.75,378.9844,956.75,368.9844,952.75,372.9844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203.25" x2="203.25" y1="412.9531" y2="958.606"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="203.25" x2="566" y1="958.606" y2="958.606"/><polygon fill="#A80036" points="556,954.606,566,958.606,556,962.606,560,958.606" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="952.75" x2="952.75" y1="940.606" y2="958.606"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="952.75" x2="590" y1="958.606" y2="958.606"/><polygon fill="#A80036" points="600,954.606,590,958.606,600,962.606,596,958.606" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="578" x2="578" y1="208.9219" y2="344.9844"/><polygon fill="#A80036" points="574,334.9844,578,344.9844,582,334.9844,578,338.9844" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="578" x2="578" y1="970.606" y2="990.606"/><polygon fill="#A80036" points="574,980.606,578,990.606,582,980.606,578,984.606" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[799973eb20dec81016124dabb173a6fc]
2
@startuml
3

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

    
6

    
7

    
8

    
9

    
10

    
11

    
12

    
13

    
14

    
15

    
16

    
17
start
18
note
19
  - - ""**subscriber** : urt_subscriber_t*"" - -
20
  The subscriber which shall subscribe to a topic.
21
  Must not be ""NULL"".
22
  - - ""**topic** : urt_topic_t*"" - -
23
  The topic to subscribe to.
24
  Must not be ""NULL"".
25
  - - ""**messages** : urt_message_t*"" - -
26
  List of messages to be contributed to the topic.
27
  Those messages must not be associated to another topic.
28
  Once a message was contributed, it cannot be removed from the topic anymore.
29
  - - ""**usefulnesscb** : urt_srtusefulnessfunc_t*"" - -
30
  Pointer to a function to calculate usefulness of a message.
31
  Must not be ""NULL"".
32
  - - ""**cbparams** : void*"" - -
33
  Optional parameters for the usefulness callback.
34
  May be ""NULL"" if the callback expects no parameters.
35
end note
36

    
37

    
38
if (Is topic already set?) then (yes)
39
  :return ""URT_STATUS_ERROR"";
40
else (no)
41
  fork
42
    :set SRT data;
43
  fork again
44
    :set topic;
45
  endfork
46
  :lock topic;
47
  fork
48
    if (Messages to contribute?) then (yes)
49
      partition "contribute messages" {
50
        :set next pointer of topic's latest message to first message to contribute;
51
        :set next pointer of last message to contribute to the message after the topic's latest message;
52
      }
53
    else (no)
54
    endif
55
  fork again
56
    :set message pointer to topic's latest message;
57
  fork again
58
    :register to topic's event source;
59
  endfork
60
  :unlock topic;
61
  :return ""URT_STATUS_OK"";
62
endif
63

    
64

    
65
stop
66
note
67
  - - **return** ""urt_status_t"" - -
68
  Returns ""URT_STATUS_ERROR"" if the subscriber was already associated to a topic.
69
end note
70

    
71

    
72
@enduml
73

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