Commit d36203562d5efb9949895617eaadcb9dc4b455ff
1 parent
76f4c398
Exists in
dev
update uml diagram
Showing
8 changed files
with
203 additions
and
8 deletions
Show diff stats
devices_channel/doc/device_controller class diagram - COMPOSITION.png deleted
127 KB
devices_channel/doc/device_controller class diagram - MULTI-INHERITANCE.png deleted
39 KB
105 KB
devices_channel/doc/device_controller_class_diagram.txt
0 โ 100644
... | ... | @@ -0,0 +1,141 @@ |
1 | +/' | |
2 | +UML class Diagram : can be displayed with PlantUML (plugin for Eclipse or for PyCharm) | |
3 | + | |
4 | +PlantUML: | |
5 | +- How to install : https://projects.irap.omp.eu/projects/pyros/wiki/Project_Development#PlantUML | |
6 | +- Eclipse plugin : http://plantuml.com/eclipse | |
7 | +- class diagrams : http://plantuml.com/class-diagram | |
8 | +- sequence diagrams : http://plantuml.com/sequence-diagram | |
9 | +- state diagrams : http://plantuml.com/state-diagram | |
10 | +- Use Case diagrams : http://plantuml.com/use-case-diagram | |
11 | +- OLD Activity diagrams : http://plantuml.com/activity-diagram-legacy | |
12 | +- NEW Activity diagrams : http://plantuml.com/activity-diagram-beta | |
13 | +- Pre-processing (include...) : http://plantuml.com/preprocessing | |
14 | +- GANTT diagrams : http://plantuml.com/gantt-diagram | |
15 | +- REAL WORLD EXAMPLES !!! : https://real-world-plantuml.com/ | |
16 | +- For Python: | |
17 | + - https://github.com/SamuelMarks/python-plantuml | |
18 | + - https://pythonhosted.org/plantuml/ | |
19 | + | |
20 | +UML diagrams theory : https://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/index.html | |
21 | +'/ | |
22 | + | |
23 | + | |
24 | + | |
25 | +@startuml | |
26 | + | |
27 | +title | |
28 | +__**DeviceController and ClientChannel classes diagram (1 - composition)**__ | |
29 | +<i>(ClientChannel is a COMPONENT of DeviceController)</i> | |
30 | + | |
31 | +end title | |
32 | + | |
33 | +/' Channels '/ | |
34 | +ClientChannel <|-- ClientSerial | |
35 | +ClientChannel <|-- ClientSocket | |
36 | +ClientChannel <|-- ClientUSB | |
37 | + | |
38 | +abstract class ClientChannel { | |
39 | + my_channel # socket or serial or usb... | |
40 | + {abstract} connect_to_server() | |
41 | + {abstract} read() | |
42 | + {abstract} put() | |
43 | + put_read() | |
44 | + {abstract} send_data() | |
45 | + {abstract} receive_data() | |
46 | + {abstract} close() | |
47 | +} | |
48 | + | |
49 | +class ClientSocket { | |
50 | + my_channel # (socket) | |
51 | + -- | |
52 | + connect_to_server() | |
53 | + send_data() | |
54 | + receive_data() | |
55 | + close() | |
56 | +} | |
57 | + | |
58 | + | |
59 | +/' Abstract Devices Controllers '/ | |
60 | +DeviceControllerAbstract o-- ClientChannel | |
61 | + | |
62 | +DeviceControllerAbstract <|-- TelescopeControllerAbstract | |
63 | +DeviceControllerAbstract <|-- PLCControllerAbstract | |
64 | +DeviceControllerAbstract <|-- CameraControllerAbstract | |
65 | + | |
66 | +abstract class DeviceControllerAbstract { | |
67 | + my_channel # socket or serial or usb... | |
68 | + _cmd = {start, stop, park...} | |
69 | + class GenericResult | |
70 | + -- | |
71 | + {abstract} connect_to_device() | |
72 | + {abstract} format_data_to_send() | |
73 | + {abstract} unformat_received_data() | |
74 | + available_commands() | |
75 | + execute() | |
76 | + execute_generic_cmd() | |
77 | + execute_native_cmd() | |
78 | + execute_native_cmd() | |
79 | + send_data() | |
80 | + receive_data() | |
81 | + --- | |
82 | + **Abstract GET/SET/DO commands :** | |
83 | + {abstract} get_timezone(), set_timezone() | |
84 | + {abstract} get_date(), set_date() | |
85 | + {abstract} get_time(), set_time() | |
86 | + {abstract} do_park() | |
87 | + {abstract} do_start() | |
88 | + {abstract} do_stop() | |
89 | + {abstract} do_init() | |
90 | +} | |
91 | + | |
92 | +abstract class TelescopeControllerAbstract { | |
93 | + _cmd = {get_ra, get_dec, do_goto...} | |
94 | + ---- | |
95 | + **Abstract GET/SET/DO commands :** | |
96 | + {abstract} get_ack() | |
97 | + {abstract} get_ra(), set_ra() | |
98 | + {abstract} get_dec(), set_dec() | |
99 | + get_radec(), set_radec() | |
100 | + {abstract} get_lat(), set_lat() | |
101 | + {abstract} get_long(), set_long() | |
102 | + {abstract} set_speed() | |
103 | + {abstract} do_warm_start() | |
104 | + {abstract} do_prec_refr() | |
105 | + ---- | |
106 | + **Generic MACRO commands:** | |
107 | + do_init() | |
108 | + do_goto() | |
109 | + do_move() | |
110 | +} | |
111 | + | |
112 | +abstract class PLCControllerAbstract { | |
113 | + _cmd = {get_status, set_light...} | |
114 | +} | |
115 | + | |
116 | +abstract class CameraControllerAbstract { | |
117 | + _cmd = {set_pose, do_start_acq...} | |
118 | +} | |
119 | + | |
120 | +/' Concrete Devices Controllers '/ | |
121 | + | |
122 | +TelescopeControllerAbstract <|-- TelescopeControllerMeade | |
123 | +TelescopeControllerAbstract <|-- TelescopeControllerGemini | |
124 | +TelescopeControllerAbstract <|-- TelescopeControllerColibri | |
125 | + | |
126 | +PLCControllerAbstract <|-- PLCControllerAK | |
127 | +PLCControllerAbstract <|-- PLCControllerColibri | |
128 | + | |
129 | +CameraControllerAbstract <|-- CameraControllerVIS_AK | |
130 | +CameraControllerAbstract <|-- CameraControllerCAGIRE | |
131 | +CameraControllerAbstract <|-- CameraControllerDDRAGO | |
132 | + | |
133 | +class TelescopeControllerGemini { | |
134 | + _cmd = {get_ra, get_dec, do_goto...} | |
135 | + format_data_to_send() | |
136 | + unformat_received_data() | |
137 | +} | |
138 | + | |
139 | +TelescopeControllerMeade : _cmd = {get_ra, get_dec, do_goto...} | |
140 | + | |
141 | +@enduml | ... | ... |
devices_channel/doc/device_controller_class_diagram_multiinheritance.png
0 โ 100644
36.9 KB
devices_channel/doc/device_controller_class_diagram_multiinheritance.txt
0 โ 100644
... | ... | @@ -0,0 +1,34 @@ |
1 | +@startuml | |
2 | + | |
3 | +title | |
4 | +__**DeviceController and ClientChannel classes diagram (2 - multi-inheritance)**__ | |
5 | +<i>(TelescopeGemini heritates both from DeviceController and ClientChannel)</i> | |
6 | + | |
7 | +end title | |
8 | + | |
9 | + | |
10 | +/' Abstract Devices Controllers '/ | |
11 | +DeviceControllerAbstract <|-- PLCControllerAbstract | |
12 | +DeviceControllerAbstract <|-- CameraControllerAbstract | |
13 | +DeviceControllerAbstract <|-- TelescopeControllerAbstract | |
14 | + | |
15 | +/' Concrete Devices Controllers '/ | |
16 | + | |
17 | +TelescopeControllerAbstract <|-- TelescopeControllerMeade | |
18 | +TelescopeControllerAbstract <|-- TelescopeControllerGemini | |
19 | +ClientSocket <|-- TelescopeControllerGemini | |
20 | +TelescopeControllerAbstract <|-- TelescopeControllerColibri | |
21 | + | |
22 | +PLCControllerAbstract <|-- PLCControllerAK | |
23 | +PLCControllerAbstract <|-- PLCControllerColibri | |
24 | + | |
25 | +CameraControllerAbstract <|-- CameraControllerVIS_AK | |
26 | +CameraControllerAbstract <|-- CameraControllerCAGIRE | |
27 | +CameraControllerAbstract <|-- CameraControllerDDRAGO | |
28 | + | |
29 | +/' Channels '/ | |
30 | +ClientChannel <|-- ClientSocket | |
31 | +ClientChannel <|-- ClientSerial | |
32 | +ClientChannel <|-- ClientUSB | |
33 | + | |
34 | +@enduml | ... | ... |
... | ... | @@ -0,0 +1 @@ |
1 | +python3 -m plantuml device_controller_class_diagram*.txt | ... | ... |
devices_channel/src_device/client/device_controller_abstract.py
... | ... | @@ -8,11 +8,25 @@ To be used as a base class (interface) for any concrete socket client telescope |
8 | 8 | ''' |
9 | 9 | UML class Diagram : can be displayed with PlantUML (plugin for Eclipse or for PyCharm) |
10 | 10 | |
11 | -How to install PlantUML : https://projects.irap.omp.eu/projects/pyros/wiki/Project_Development#PlantUML | |
12 | -PlantUML class diagrams : http://plantuml.com/class-diagram | |
13 | -PlantUML sequence diagrams : http://plantuml.com/sequence-diagram | |
11 | +PlantUML: | |
12 | +- How to install : https://projects.irap.omp.eu/projects/pyros/wiki/Project_Development#PlantUML | |
13 | +- Eclipse plugin : http://plantuml.com/eclipse | |
14 | +- class diagrams : http://plantuml.com/class-diagram | |
15 | +- sequence diagrams : http://plantuml.com/sequence-diagram | |
16 | +- state diagrams : http://plantuml.com/state-diagram | |
17 | +- Use Case diagrams : http://plantuml.com/use-case-diagram | |
18 | +- OLD Activity diagrams : http://plantuml.com/activity-diagram-legacy | |
19 | +- NEW Activity diagrams : http://plantuml.com/activity-diagram-beta | |
20 | +- Pre-processing (include...) : http://plantuml.com/preprocessing | |
21 | +- GANTT diagrams : http://plantuml.com/gantt-diagram | |
22 | +- REAL WORLD EXAMPLES !!! : https://real-world-plantuml.com/ | |
23 | +- For Python: | |
24 | + - https://github.com/SamuelMarks/python-plantuml | |
25 | + - https://pythonhosted.org/plantuml/ | |
26 | + | |
14 | 27 | UML diagrams theory : https://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/index.html |
15 | 28 | |
29 | + | |
16 | 30 | @startuml |
17 | 31 | |
18 | 32 | title |
... | ... | @@ -21,12 +35,13 @@ __**DeviceController and ClientChannel classes diagram (1 - composition)**__ |
21 | 35 | |
22 | 36 | end title |
23 | 37 | |
38 | + | |
24 | 39 | /' Channels '/ |
25 | 40 | ClientChannel <|-- ClientSerial |
26 | 41 | ClientChannel <|-- ClientSocket |
27 | 42 | ClientChannel <|-- ClientUSB |
28 | 43 | |
29 | -class ClientChannel { | |
44 | +abstract class ClientChannel { | |
30 | 45 | my_channel # socket or serial or usb... |
31 | 46 | {abstract} connect_to_server() |
32 | 47 | {abstract} read() |
... | ... | @@ -54,7 +69,7 @@ DeviceControllerAbstract <|-- TelescopeControllerAbstract |
54 | 69 | DeviceControllerAbstract <|-- PLCControllerAbstract |
55 | 70 | DeviceControllerAbstract <|-- CameraControllerAbstract |
56 | 71 | |
57 | -class DeviceControllerAbstract { | |
72 | +abstract class DeviceControllerAbstract { | |
58 | 73 | my_channel # socket or serial or usb... |
59 | 74 | _cmd = {start, stop, park...} |
60 | 75 | class GenericResult |
... | ... | @@ -80,7 +95,7 @@ class DeviceControllerAbstract { |
80 | 95 | {abstract} do_init() |
81 | 96 | } |
82 | 97 | |
83 | -class TelescopeControllerAbstract { | |
98 | +abstract class TelescopeControllerAbstract { | |
84 | 99 | _cmd = {get_ra, get_dec, do_goto...} |
85 | 100 | ---- |
86 | 101 | **Abstract GET/SET/DO commands :** |
... | ... | @@ -100,9 +115,13 @@ class TelescopeControllerAbstract { |
100 | 115 | do_move() |
101 | 116 | } |
102 | 117 | |
103 | -PLCControllerAbstract : _cmd = {get_status, set_light...} | |
118 | +abstract class PLCControllerAbstract { | |
119 | + _cmd = {get_status, set_light...} | |
120 | +} | |
104 | 121 | |
105 | -CameraControllerAbstract : _cmd = {set_pose, do_start_acq...} | |
122 | +abstract class CameraControllerAbstract { | |
123 | + _cmd = {set_pose, do_start_acq...} | |
124 | +} | |
106 | 125 | |
107 | 126 | /' Concrete Devices Controllers '/ |
108 | 127 | ... | ... |