lliendo/Radar

View on GitHub
docs/_static/class-diagrams/radar-server.svg

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
<svg width="59cm" height="28cm" viewBox="104 183 1172 542" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <g>
    <rect style="fill: #ffffff" x="620" y="560" width="133.2" height="28"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="620" y="560" width="133.2" height="28"/>
    <text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:700" x="686.6" y="579">RadarServer</text>
    <rect style="fill: #ffffff" x="620" y="588" width="133.2" height="52"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="620" y="588" width="133.2" height="52"/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="623" y="602">+client_manager</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="623" y="618">+platform_setup</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="623" y="634">+queue</text>
    <rect style="fill: #ffffff" x="620" y="640" width="133.2" height="84"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="620" y="640" width="133.2" height="84"/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="623" y="654">+accept_client()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="623" y="670">+on_reject()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="623" y="686">+on_connect()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="623" y="702">+on_disconnect()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="623" y="718">+on_receive()</text>
  </g>
  <g>
    <rect style="fill: #ffffff" x="225.2" y="324.1" width="210.2" height="28"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="225.2" y="324.1" width="210.2" height="28"/>
    <text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:700" x="330.3" y="343.1">RadarServerLauncher</text>
    <rect style="fill: #ffffff" x="225.2" y="352.1" width="210.2" height="8"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="225.2" y="352.1" width="210.2" height="8"/>
    <rect style="fill: #ffffff" x="225.2" y="360.1" width="210.2" height="36"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="225.2" y="360.1" width="210.2" height="36"/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="228.2" y="374.1">+_build_threads()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="228.2" y="390.1">+_start_and_join_threads()</text>
  </g>
  <g>
    <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="460.572,338.1 520,338.1 520,598 620,598 "/>
    <polygon style="fill: #ffffff" points="435.4,338.1 449.4,333.3 463.4,338.1 449.4,342.9 "/>
    <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="435.4,338.1 449.4,333.3 463.4,338.1 449.4,342.9 "/>
    <text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="522" y="464.05"/>
    <text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="467.4" y="334.1"/>
    <text font-size="12.7998" style="fill: #000000;text-anchor:end;font-family:monospace;font-style:normal;font-weight:normal" x="616" y="594"/>
  </g>
  <g>
    <rect style="fill: #ffffff" x="256.95" y="184.6" width="146.7" height="28"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="256.95" y="184.6" width="146.7" height="28"/>
    <text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:italic;font-weight:700" x="330.3" y="203.6">RadarLauncher</text>
    <rect style="fill: #ffffff" x="256.95" y="212.6" width="146.7" height="8"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="256.95" y="212.6" width="146.7" height="8"/>
    <rect style="fill: #ffffff" x="256.95" y="220.6" width="146.7" height="20"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="256.95" y="220.6" width="146.7" height="20"/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="259.95" y="234.6">+run()</text>
  </g>
  <g>
    <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="330.3,258.836 330.3,257.6 330.3,323.1 330.3,324.1 "/>
    <polygon style="fill: #ffffff" points="338.3,258.836 330.3,242.836 322.3,258.836 "/>
    <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="338.3,258.836 330.3,242.836 322.3,258.836 "/>
  </g>
  <g>
    <polygon style="fill: #ffff00" points="105.2,424.1 457.7,424.1 469.7,436.1 469.7,586.1 105.2,586.1 "/>
    <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="105.2,424.1 457.7,424.1 469.7,436.1 469.7,586.1 105.2,586.1 "/>
    <polyline style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="457.7,424.1 457.7,436.1 469.7,436.1 "/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="112.2" y="449">
      <tspan x="112.2" y="449">The RadarServerLauncher is the entry point</tspan>
      <tspan x="112.2" y="465">of the Radar server, it :</tspan>
      <tspan x="112.2" y="481"></tspan>
      <tspan x="112.2" y="497"> - Builds shared : ClientManager, queue and</tspan>
      <tspan x="112.2" y="513">   thread Event.</tspan>
      <tspan x="112.2" y="529"> - Builds the RadarServer, RadarPluginManager</tspan>
      <tspan x="112.2" y="545">   and RadarServerPoller.</tspan>
      <tspan x="112.2" y="561"> - Spawns both threads through its run()</tspan>
      <tspan x="112.2" y="577">   method.</tspan>
    </text>
  </g>
  <g>
    <rect style="fill: #ffffff" x="593" y="380" width="187.1" height="28"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="593" y="380" width="187.1" height="28"/>
    <text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:italic;font-weight:700" x="686.55" y="399">Server</text>
    <rect style="fill: #ffffff" x="593" y="408" width="187.1" height="8"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="593" y="408" width="187.1" height="8"/>
    <rect style="fill: #ffffff" x="593" y="416" width="187.1" height="84"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="593" y="416" width="187.1" height="84"/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="596" y="430">+_listen()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="596" y="446">+_accept()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="596" y="462">+_serve_ready_clients()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="596" y="478">+_on_ACTION()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="596" y="494">+run()</text>
  </g>
  <g>
    <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="686.55,518.236 686.55,538 686.6,538 686.6,560 "/>
    <polygon style="fill: #ffffff" points="694.55,518.236 686.55,502.236 678.55,518.236 "/>
    <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="694.55,518.236 686.55,502.236 678.55,518.236 "/>
  </g>
  <g>
    <rect style="fill: #ffffff" x="1100" y="380" width="175.2" height="28"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="1100" y="380" width="175.2" height="28"/>
    <text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:700" x="1187.6" y="399">RadarServerPoller</text>
    <rect style="fill: #ffffff" x="1100" y="408" width="175.2" height="36"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="1100" y="408" width="175.2" height="36"/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="1103" y="422">+client_manager</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="1103" y="438">+platform_setup</text>
    <rect style="fill: #ffffff" x="1100" y="444" width="175.2" height="20"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="1100" y="444" width="175.2" height="20"/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="1103" y="458">+run()</text>
  </g>
  <g>
    <rect style="fill: #ffffff" x="840" y="380" width="199.35" height="28"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="840" y="380" width="199.35" height="28"/>
    <text font-size="16" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:700" x="939.675" y="399">RadarPluginManager</text>
    <rect style="fill: #ffffff" x="840" y="408" width="199.35" height="36"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="840" y="408" width="199.35" height="36"/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="843" y="422">+platform_setup</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="843" y="438">+queue</text>
    <rect style="fill: #ffffff" x="840" y="444" width="199.35" height="52"/>
    <rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="840" y="444" width="199.35" height="52"/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="843" y="458">+_run_plugins()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="843" y="474">+_deference()</text>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="843" y="490">+run()</text>
  </g>
  <g>
    <polygon style="fill: #ffff00" points="820,560 1072.4,560 1084.4,572 1084.4,626 820,626 "/>
    <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="820,560 1072.4,560 1084.4,572 1084.4,626 820,626 "/>
    <polyline style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="1072.4,560 1072.4,572 1084.4,572 "/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="827" y="584.9">
      <tspan x="827" y="584.9">RadarPluginManager gets notified</tspan>
      <tspan x="827" y="600.9">by RadarServer through a shared</tspan>
      <tspan x="827" y="616.9">queue.</tspan>
    </text>
  </g>
  <g>
    <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="460.572,338.1 939.675,338.1 939.675,380 "/>
    <polygon style="fill: #ffffff" points="435.4,338.1 449.4,333.3 463.4,338.1 449.4,342.9 "/>
    <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="435.4,338.1 449.4,333.3 463.4,338.1 449.4,342.9 "/>
    <text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:monospace;font-style:normal;font-weight:normal" x="687.537" y="334.1"/>
    <text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="467.4" y="334.1"/>
    <text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="943.675" y="376"/>
  </g>
  <g>
    <polyline style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="460.572,338.1 1187.6,338.1 1187.6,380 "/>
    <polygon style="fill: #ffffff" points="435.4,338.1 449.4,333.3 463.4,338.1 449.4,342.9 "/>
    <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="435.4,338.1 449.4,333.3 463.4,338.1 449.4,342.9 "/>
    <text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:monospace;font-style:normal;font-weight:normal" x="811.5" y="334.1"/>
    <text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="467.4" y="334.1"/>
    <text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="1191.6" y="376"/>
  </g>
  <g>
    <polygon style="fill: #ffff00" points="840,240 1100.1,240 1112.1,252 1112.1,306 840,306 "/>
    <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="840,240 1100.1,240 1112.1,252 1112.1,306 840,306 "/>
    <polyline style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="1100.1,240 1100.1,252 1112.1,252 "/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="847" y="264.9">
      <tspan x="847" y="264.9">The entry point for each of these</tspan>
      <tspan x="847" y="280.9">classes is the run() method.</tspan>
      <tspan x="847" y="296.9">Remember that these threads.</tspan>
    </text>
  </g>
  <g>
    <polygon style="fill: #ffff00" points="540,220 777,220 789,232 789,318 540,318 "/>
    <polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="540,220 777,220 789,232 789,318 540,318 "/>
    <polyline style="fill: none; fill-opacity:0; stroke-width: 1; stroke: #000000" points="777,220 777,232 789,232 "/>
    <text font-size="12.8" style="fill: #000000;text-anchor:start;font-family:monospace;font-style:normal;font-weight:normal" x="547" y="244.9">
      <tspan x="547" y="244.9">Note that on_ACTION on the</tspan>
      <tspan x="547" y="260.9">Server diagram refers to a</tspan>
      <tspan x="547" y="276.9">set of methods.</tspan>
      <tspan x="547" y="292.9">Check the server.py file under</tspan>
      <tspan x="547" y="308.9">the network module.</tspan>
    </text>
  </g>
</svg>