Statistics
| Branch: | Revision:

urtware / doc / activitydiagrams / service / urtServiceTryAcquireRequest.svg @ 408b49ce

History | View | Annotate | Download (15.469 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="515px" preserveAspectRatio="none" style="width:991px;height:515px;" version="1.1" viewBox="0 0 991 515" width="991px" zoomAndPan="magnify"><defs><filter height="300%" id="feeizrvove99m" 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="450" y="26.708">µRtWare</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="276" x="356.5" y="47.6611">urtServiceTryAcquireRequest()</text><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="0" x="497.5" y="68.6143"/><path d="M380.5,72.8594 L380.5,244.1875 L975.5,244.1875 L975.5,82.8594 L965.5,72.8594 L380.5,72.8594 " fill="#FBFB77" filter="url(#feeizrvove99m)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M965.5,72.8594 L965.5,82.8594 L975.5,82.8594 L965.5,72.8594 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="380.5" x2="597.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="601.5" y="89.4263"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="52" x="601.5" y="89.4263">service</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="97" x="657.5" y="89.4263">: urt_service_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="758.5" x2="975.5" y1="85.4258" y2="85.4258"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="268" x="386.5" y="105.0591">The service that shall acquire the request.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="386.5" y="120.1919">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="466.5" y="120.1919">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="498.5" y="120.1919">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="380.5" x2="577.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="581.5" y="134.8247"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="57" x="581.5" y="134.8247">request</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="132" x="642.5" y="134.8247">: urt_baserequest_t*</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="778.5" x2="975.5" y1="130.8242" y2="130.8242"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="176" x="386.5" y="150.4575">The request to be acquired.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="76" x="386.5" y="165.5903">Must not be</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="32" x="466.5" y="165.5903">NULL</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="498.5" y="165.5903">.</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="380.5" x2="975.5" y1="173.6563" y2="173.6563"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="380.5" x2="975.5" y1="175.6563" y2="175.6563"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="380.5" x2="607" y1="186.2227" y2="186.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="0" x="611" y="190.2231"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="45" x="611" y="190.2231">return</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="85" x="660" y="190.2231">: urt_status_t</text><line style="stroke: #A80036; stroke-width: 1.0;" x1="749" x2="975.5" y1="186.2227" y2="186.2227"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="386.5" y="205.856">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="439.5" y="205.856">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="120" x="547.5" y="205.856">in case of success.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="386.5" y="220.9888">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="216" x="439.5" y="220.9888">URT_STATUS_REQUEST_BADOWNER</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="301" x="659.5" y="220.9888">if the service has lost ownership of the request.</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="386.5" y="236.1216">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="200" x="439.5" y="236.1216">URT_STATUS_REQUEST_LOCKED</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="254" x="643.5" y="236.1216">if the request's mutex is already locked.</text><ellipse cx="678" cy="274.1875" fill="#000000" filter="url(#feeizrvove99m)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><path d="M489,308.6055 L489,333.7383 A0,0 0 0 0 489,333.7383 L609,333.7383 A0,0 0 0 0 609,333.7383 L609,326.6055 L629,321.1719 L609,318.6055 L609,318.6055 L599,308.6055 L489,308.6055 A0,0 0 0 0 489,308.6055 " fill="#FBFB77" filter="url(#feeizrvove99m)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M599,308.6055 L599,318.6055 L609,318.6055 L599,308.6055 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="99" x="495" y="325.6724">Does not block.</text><rect fill="#FEFECE" filter="url(#feeizrvove99m)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="98" x="629" y="304.1875"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="78" x="639" y="325.3262">lock request</text><polygon fill="#FEFECE" filter="url(#feeizrvove99m)" points="606,358.1563,750,358.1563,762,370.1563,750,382.1563,606,382.1563,594,370.1563,606,358.1563" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="144" x="606" y="373.9644">Request could be locked?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="574" y="367.562">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="762" y="367.562">no</text><polygon fill="#FEFECE" filter="url(#feeizrvove99m)" points="284.5,392.1563,497.5,392.1563,509.5,404.1563,497.5,416.1563,284.5,416.1563,272.5,404.1563,284.5,392.1563" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="213" x="284.5" y="407.9644">This service is owner of the request?</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="20" x="252.5" y="401.562">yes</text><text fill="#000000" font-family="sans-serif" font-size="11" lengthAdjust="spacingAndGlyphs" textLength="14" x="509.5" y="401.562">no</text><path d="M10,426.1563 L10,451.2891 A0,0 0 0 0 10,451.2891 L192,451.2891 A0,0 0 0 0 192,451.2891 L192,444.1563 L212,438.7227 L192,436.1563 L192,436.1563 L182,426.1563 L10,426.1563 A0,0 0 0 0 10,426.1563 " fill="#FBFB77" filter="url(#feeizrvove99m)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M182,426.1563 L182,436.1563 L192,436.1563 L182,426.1563 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="16" y="443.2231">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="104" x="69" y="443.2231">URT_STATUS_OK</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="173" y="443.2231">.</text><ellipse cx="223" cy="438.7227" fill="#FFFFFF" filter="url(#feeizrvove99m)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="223" cy="438.7227" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#feeizrvove99m)" height="33.9688" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="114" x="512" y="426.1563"/><text fill="#000000" font-family="sans-serif" font-size="12" lengthAdjust="spacingAndGlyphs" textLength="94" x="522" y="447.2949">unlock request</text><path d="M244,478.5586 L244,503.6914 A0,0 0 0 0 244,503.6914 L538,503.6914 A0,0 0 0 0 538,503.6914 L538,496.5586 L558,491.125 L538,488.5586 L538,488.5586 L528,478.5586 L244,478.5586 A0,0 0 0 0 244,478.5586 " fill="#FBFB77" filter="url(#feeizrvove99m)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M528,478.5586 L528,488.5586 L538,488.5586 L528,478.5586 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="250" y="495.6255">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="216" x="303" y="495.6255">URT_STATUS_REQUEST_BADOWNER</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="519" y="495.6255">.</text><ellipse cx="569" cy="491.125" fill="#FFFFFF" filter="url(#feeizrvove99m)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="569" cy="491.125" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><path d="M656,392.1563 L656,417.2891 A0,0 0 0 0 656,417.2891 L934,417.2891 A0,0 0 0 0 934,417.2891 L934,410.1563 L954,404.7227 L934,402.1563 L934,402.1563 L924,392.1563 L656,392.1563 A0,0 0 0 0 656,392.1563 " fill="#FBFB77" filter="url(#feeizrvove99m)" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M924,392.1563 L924,402.1563 L934,402.1563 L924,392.1563 " fill="#FBFB77" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="49" x="662" y="409.2231">Returns</text><text fill="#000000" font-family="monospace" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="200" x="715" y="409.2231">URT_STATUS_REQUEST_LOCKED</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="4" x="915" y="409.2231">.</text><ellipse cx="965" cy="404.7227" fill="#FFFFFF" filter="url(#feeizrvove99m)" rx="11" ry="11" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="965" cy="404.7227" fill="#000000" rx="6" ry="6" style="stroke: #7F7F7F; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="678" x2="678" y1="244.1875" y2="264.1875"/><polygon fill="#A80036" points="674,254.1875,678,264.1875,682,254.1875,678,258.1875" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="678" x2="678" y1="284.1875" y2="304.1875"/><polygon fill="#A80036" points="674,294.1875,678,304.1875,682,294.1875,678,298.1875" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="569" x2="569" y1="460.125" y2="480.125"/><polygon fill="#A80036" points="565,470.125,569,480.125,573,470.125,569,474.125" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="272.5" x2="223" y1="404.1563" y2="404.1563"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="223" x2="223" y1="404.1563" y2="427.7227"/><polygon fill="#A80036" points="219,417.7227,223,427.7227,227,417.7227,223,421.7227" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="509.5" x2="569" y1="404.1563" y2="404.1563"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="569" x2="569" y1="404.1563" y2="426.1563"/><polygon fill="#A80036" points="565,416.1563,569,426.1563,573,416.1563,569,420.1563" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="594" x2="391" y1="370.1563" y2="370.1563"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="391" x2="391" y1="370.1563" y2="392.1563"/><polygon fill="#A80036" points="387,382.1563,391,392.1563,395,382.1563,391,386.1563" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="762" x2="965" y1="370.1563" y2="370.1563"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="965" x2="965" y1="370.1563" y2="393.7227"/><polygon fill="#A80036" points="961,383.7227,965,393.7227,969,383.7227,965,387.7227" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="678" x2="678" y1="338.1563" y2="358.1563"/><polygon fill="#A80036" points="674,348.1563,678,358.1563,682,348.1563,678,352.1563" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[95de477f23a4749cddec9915c4233d4b]
2
@startuml
3

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

    
6

    
7
note
8
  - - **service** : urt_service_t* - -
9
  The service that shall acquire the request.
10
  Must not be ""NULL"".
11
  - - **request** : urt_baserequest_t* - -
12
  The request to be acquired.
13
  Must not be ""NULL"".
14
  ====
15
  - - **return** : urt_status_t - -
16
  Returns ""URT_STATUS_OK"" in case of success.
17
  Returns ""URT_STATUS_REQUEST_BADOWNER"" if the service has lost ownership of the request.
18
  Returns ""URT_STATUS_REQUEST_LOCKED"" if the request's mutex is already locked.
19
endnote
20

    
21

    
22
start
23
:lock request;
24
note
25
  Does not block.
26
endnote
27
if (Request could be locked?) then (yes)
28
  if (This service is owner of the request?) then (yes)
29
    stop
30
    note
31
      Returns ""URT_STATUS_OK"".
32
    endnote
33
  else (no)
34
    :unlock request;
35
    stop
36
    note
37
      Returns ""URT_STATUS_REQUEST_BADOWNER"".
38
    endnote
39
  endif
40
else (no)
41
  stop
42
  note
43
    Returns ""URT_STATUS_REQUEST_LOCKED"".
44
  endnote
45
endif
46

    
47

    
48
@enduml
49

    
50
PlantUML version 1.2020.00(Sat Jan 11 13:30:53 CET 2020)
51
(GPL source distribution)
52
Java Runtime: OpenJDK Runtime Environment
53
JVM: OpenJDK 64-Bit Server VM
54
Java Version: 11.0.7+10-post-Ubuntu-2ubuntu218.04
55
Operating System: Linux
56
Default Encoding: UTF-8
57
Language: en
58
Country: US
59
--></g></svg>