Commit b6488734b74437c6cd73f4925f154d632ea6267d

Authored by Etienne Pallier
1 parent 9beeb060
Exists in dev

Nouveau diagramme super mega giga !!!

maintenant, on va implémenter...
src/core/pyros_django/majordome/doc/AgentMajordome_object_diag.pu
... ... @@ -30,10 +30,12 @@ UML diagrams theory : https://www.ibm.com/developerworks/rational/library/conten
30 30  
31 31 title
32 32 __**PyROS class diagram (AgentMajordome example)**__
33   -<size:10><i>Version 16-10-2019 (Etienne Pallier)</i></size>
  33 +'<size:10><i>Version 16-10-2019 (Etienne Pallier)</i></size>'
34 34  
35 35 end title
36 36  
  37 +
  38 +
37 39 /' Allow to mix object/class diagram with other symbols like a "server" symbol '/
38 40 allowmixing
39 41  
... ... @@ -41,95 +43,151 @@ FA_SERVER(sbig_device,SBIG detector) #Red
41 43 FA_SERVER(gemini_device,Gemini telescope) #Red
42 44  
43 45  
44   -/' Abstract Devices Controllers '/
  46 +
  47 +/' ======= AgentMajordome & AgentDevices ======= '/
45 48  
46 49 class AgentMajordome <<Singleton>> #yellow
47 50 AgentMajordome -u-|> Agent
48 51 AgentDevice -u-|> Agent
49 52  
50 53 /' Aliases to AgentDevices '/
51   -object AgentDeviceTelescope1
52   -object AgentDeviceFilterSelector1
53   -object AgentDeviceShutter1
54   -object AgentDeviceSensor1
55   -object AgentDeviceShutter2
  54 +object AD_Telescope1
  55 +object AD_FilterSelector1
  56 +object AD_Shutter1
  57 +object AD_Sensor1
  58 +object AD_Shutter2
56 59  
  60 +/' Use l,r,u,d for left, right, up, or down row alignement '/
  61 +AgentMajordome -d-> AD_Telescope1 : sends cmd to
  62 +AgentMajordome -d-> AD_FilterSelector1 : sends cmd to
  63 +AgentMajordome -d-> AD_Shutter1 : sends cmd to
  64 +AgentMajordome -d-> AD_Sensor1 : sends cmd to
  65 +AgentMajordome -d-> AD_Shutter2 : sends cmd to
57 66  
58 67  
59   -/' Use l,r,u,d for left, right, up, or down row alignement '/
60   -AgentMajordome -d-> AgentDeviceFilterSelector1 : sends cmd to
61   -AgentMajordome -d-> AgentDeviceShutter1 : sends cmd to
62   -AgentMajordome -d-> AgentDeviceSensor1 : sends cmd to
63   -AgentMajordome -d-> AgentDeviceTelescope1 : sends cmd to
64   -AgentMajordome -d-> AgentDeviceShutter2 : sends cmd to
  68 +/'
  69 +======= Abstract Device Controllers =======
  70 +class DeviceControllerAbstract
  71 +class DC_FilterSelector
  72 +class DC_DetectorShutter
  73 +class DC_DetectorSensor
  74 +'/
65 75  
66   -/' SBIG '/
67   -class AgentDeviceSBIG_CXZ347 <<Singleton>> #lightgreen
68   -AgentDeviceSBIG_CXZ347 -u-|> AgentDevice
69   -AgentDeviceFilterSelector1 --> AgentDeviceSBIG_CXZ347 :alias of
70   -AgentDeviceShutter1 --> AgentDeviceSBIG_CXZ347 :alias of
71   -AgentDeviceSensor1 --> AgentDeviceSBIG_CXZ347 :alias of
72 76  
73   -/' Gemini '/
74   -class AgentDeviceTelescopeGemini_A1CZ3 #lightblue
75   -AgentDeviceTelescopeGemini_A1CZ3 -u--|> AgentDevice
76   -AgentDeviceTelescope1 --> AgentDeviceTelescopeGemini_A1CZ3 :alias of
  77 +/' ======= CHANNELS ======= '/
77 78  
  79 +DeviceControllerAbstract o-l- DeviceSimulator
78 80  
79   -class DeviceControllerAbstract
80   -class DeviceControllerFilterSelector
81   -class DeviceControllerDetectorShutter
82   -class DeviceControllerDetectorSensor
83   -
84   -class DeviceControllerSBIG <<Singleton>> #lightgreen
85   -class DeviceControllerDetectorSensorSBIG #lightgreen
86   -class DeviceControllerDetectorShutterSBIG #lightgreen
87   -class DeviceControllerFilterSelectorSBIG #lightgreen
88   -
89   -AgentDeviceSBIG_CXZ347 --> DeviceControllerSBIG :use
90   -
91   -class DeviceSimulatorSBIG #lightgreen
92   -DeviceControllerSBIG o- DeviceSimulatorSBIG
93   -DeviceControllerSBIG --|> DeviceControllerAbstract
94   -DeviceControllerSBIG <---> sbig_device : channel/socket
95   -
96   -DeviceControllerSBIG o-down- DeviceControllerDetectorSensorSBIG
97   -DeviceControllerSBIG o-down- DeviceControllerDetectorShutterSBIG
98   -DeviceControllerSBIG o-down- DeviceControllerFilterSelectorSBIG
99   -
100   -DeviceControllerDetectorSensorSBIG --|> DeviceControllerDetectorSensor
101   -DeviceControllerDetectorShutterSBIG --|> DeviceControllerDetectorShutter
102   -DeviceControllerFilterSelectorSBIG --|> DeviceControllerFilterSelector
103   -
104   -DeviceControllerDetectorSensor --|> DeviceControllerAbstract
105   -DeviceControllerDetectorShutter --|> DeviceControllerAbstract
106   -DeviceControllerFilterSelector --|> DeviceControllerAbstract
107   -
108   -
109   -class DeviceControllerTelescope
110   -class DeviceControllerTelescopeGemini <<Singleton>> #lightblue
111   -AgentDeviceTelescopeGemini_A1CZ3 --> DeviceControllerTelescopeGemini :use
112   -class DeviceSimulatorTelescopeGemini #lightblue
113   -DeviceControllerTelescopeGemini o-left- DeviceSimulatorTelescopeGemini
114   -DeviceControllerTelescopeGemini <---> gemini_device : channel/socket
115   -DeviceControllerTelescopeGemini ---|> DeviceControllerTelescope
116   -DeviceControllerTelescope --|> DeviceControllerAbstract
117   -
118   -
119   -/' Channels '/
120   -class ClientSerial #lightred
121   -class ClientSocket #lightred
122   -class ClientUSB #lightred
123   -ClientChannel <|-- ClientSerial
124   -ClientChannel <|-- ClientSocket
125   -ClientChannel <|-- ClientUSB
126   -DeviceControllerAbstract o-- ClientChannel
  81 +DeviceControllerAbstract o-d- ClientChannel
  82 +class ClientChannelSerial #lightred
  83 +class ClientChannelSocket #lightred
  84 +class ClientChannelUSB #lightred
  85 +ClientChannel <|-- ClientChannelSerial
  86 +ClientChannel <|-- ClientChannelSocket
  87 +ClientChannel <|-- ClientChannelUSB
  88 +
  89 +
  90 +/' ======= GEMINI controllers (& sim) ======= '/
  91 +
  92 +class AD_TelescopeGemini_1 #lightblue
  93 +AD_TelescopeGemini_1 -u--|> AgentDevice
  94 +
  95 +/' Components (only 1) '/
  96 +AD_Telescope1 -d-> AD_TelescopeGemini_1 :alias of
  97 +
  98 +class DC_Gemini <<Singleton>> #lightblue
  99 +class DC_MountGemini #lightblue
  100 +class DS_Gemini #lightblue
  101 +/'DC_Mount o-left- DS_Mount'/
  102 +
  103 +AD_TelescopeGemini_1 --> DC_Gemini :use
  104 +/'DC_Gemini o-left- DS_Gemini'/
  105 +
  106 +/' Controllers '/
  107 +DC_Gemini <.l> gemini_device : channel/\nsocket
  108 +DC_Gemini ---|> DeviceControllerAbstract
  109 +DC_Gemini o-- DC_MountGemini
  110 +DC_MountGemini --d|> DC_Mount
  111 +DC_Mount --|> DeviceControllerAbstract
  112 +
  113 +/' Simulators '/
  114 +DS_Gemini ---|> DeviceSimulator
  115 +DS_Gemini o-down-> DS_MountGemini
  116 +DS_MountGemini -d-|> DS_Mount
  117 +DS_Mount --|> DeviceSimulator
  118 +
  119 +
  120 +
  121 +/' ======= SBIG controllers (& sim) ======= '/
  122 +
  123 +class AD_SBIG_1 <<Singleton>> #lightgreen
  124 +AD_SBIG_1 -u--|> AgentDevice
  125 +
  126 +/' Components (3) '/
  127 +AD_FilterSelector1 --> AD_SBIG_1 :alias of
  128 +AD_Shutter1 --> AD_SBIG_1 :alias of
  129 +AD_Sensor1 --> AD_SBIG_1 :alias of
  130 +
  131 +class DC_SBIG <<Singleton>> #lightgreen
  132 +class DC_DetectorSensorSBIG #lightgreen
  133 +class DC_DetectorShutterSBIG #lightgreen
  134 +class DC_FilterSelectorSBIG #lightgreen
  135 +class DS_SBIG #lightgreen
  136 +
  137 +AD_SBIG_1 -d-> DC_SBIG :use
  138 +/'DC_SBIG o- DS_SBIG'/
  139 +
  140 +/' Controllers '/
  141 +DC_SBIG <.r> sbig_device : channel/\nsocket
  142 +DC_SBIG ---|> DeviceControllerAbstract
  143 +DC_SBIG o-down- DC_DetectorSensorSBIG
  144 +DC_SBIG o-down- DC_DetectorShutterSBIG
  145 +DC_SBIG o-down- DC_FilterSelectorSBIG
  146 +
  147 +DC_DetectorSensorSBIG --d|> DC_DetectorSensor
  148 +DC_DetectorShutterSBIG --d|> DC_DetectorShutter
  149 +DC_FilterSelectorSBIG --d|> DC_FilterSelector
  150 +
  151 +DC_DetectorSensor --|> DeviceControllerAbstract
  152 +DC_DetectorShutter --|> DeviceControllerAbstract
  153 +DC_FilterSelector --|> DeviceControllerAbstract
  154 +
  155 +/' Simulators '/
  156 +DS_SBIG ---|> DeviceSimulator
  157 +DS_SBIG o-down-> DS_DetectorShutterSBIG
  158 +DS_SBIG o-down-> DS_DetectorSensorSBIG
  159 +DS_SBIG o-down-> DS_FilterSelectorSBIG
  160 +DS_DetectorShutterSBIG -d-|> DS_DetectorShutter
  161 +DS_DetectorSensorSBIG -d-|> DS_DetectorSensor
  162 +DS_FilterSelectorSBIG -d-|> DS_FilterSelector
  163 +DS_DetectorShutter --|> DeviceSimulator
  164 +DS_DetectorSensor --|> DeviceSimulator
  165 +DS_FilterSelector --|> DeviceSimulator
  166 +
  167 +
  168 +/' ======= LEGEND ======= '/
127 169  
128   -/'
129 170 skinparam legendFontSize 11
  171 +
130 172 legend left
131   -<i>Version 16-10-2019 (Etienne Pallier)</i>
  173 +<i>Version 22-10-2019 (E. Pallier)</i>
  174 +
  175 +Colors: <b>yellow</b> : abstract classes ; <b>red</b> : real devices ; <b>blue</b> : Gemini concrete classes ; <b>green</b> : SBIG concrete classes
  176 +
  177 +AD = <b>Agent Device</b>
  178 +
  179 +DC = <b>Device Controller</b> (Device <b>client</b>, pyros <b>generic commands only</b>):
  180 +- translates an agent generic command to a native command, and sends it to device
  181 +- receives device's native answer, translates it to generic and returns it back to agent
  182 +(<i>every DC is composed of a <b>DS of the same name</b></i>)
  183 +
  184 +DS = <b>Device Simulator</b> (Device placeholder <b>server</b>, <b>native commands only</b>):
  185 +- receives native commands from client
  186 +- returns (simulated) native answer to client
  187 +(<i>every DS contains two 'generic to native' dictionaries: gen2nat_cmds and gen2nat_answers)</i>
  188 +(<i>abstract DS receive only generic commands and return generic answers</i>)
132 189 endlegend
133   -'/
  190 +
  191 +
134 192  
135 193 @enduml
... ...