From b387b25f5330840f87cbac6719e084645eb8168f Mon Sep 17 00:00:00 2001 From: Justin Hoffmann Date: Sat, 22 May 2021 21:44:27 +0200 Subject: [PATCH 1/3] Update according to implementation --- diagrams/stage3/cd_data.uxf | 148 +++++++++++++++--------------------- 1 file changed, 63 insertions(+), 85 deletions(-) diff --git a/diagrams/stage3/cd_data.uxf b/diagrams/stage3/cd_data.uxf index b75750c..5cf3ca5 100644 --- a/diagrams/stage3/cd_data.uxf +++ b/diagrams/stage3/cd_data.uxf @@ -4,38 +4,40 @@ UMLClass - 960 - 384 + 928 + 336 480 - 240 + 320 Anlage -- -- _instance: Anlage {readonly} -+ _belt_is_blocked: bool -+ _ramp_full: bool -+ _pending_transfer: Workpiece ++ belt_is_blocked: bool ++ ramp_full: bool ++ pending_transfer: Workpiece +- _unit_mutex: mutex -- + wrpc_fits_order(Workpiece): bool + wrpc_order_step() + wrpc_order_reset_to(WorkpieceType) - ++ get_switch_end_sec(): CBSection ++ get_height_switch_sec(): CBSection ++ get_start_height_sec(): CBSection UMLClass - 208 + 176 608 512 320 Workpiece -- -/- last_id: id/ +- _last_id: id {static} + id: id {readonly} -+ height_1: float -+ height_2: float ++ height_1: int ++ height_2: int + is_metallic: bool + is_flipped: bool -- @@ -48,7 +50,7 @@ UMLClass - 1040 + 1008 688 256 208 @@ -66,29 +68,32 @@ unkown UMLClass - 208 - 224 + 176 + 176 464 - 272 + 320 CBSection -- - _queue: queue<Workpiece> +- _section_mutex: mutex -- ++ <<Create>> CBSection() + <<Create>> CBSection(next: CBSection) + size(): int + back(): Workpiece + front(): Workpiece + transfer() ++ enter_workpiece(Workpiece) + exit_first() UMLFrame - 160 + 128 0 - 1328 + 1424 1280 cd Data @@ -97,21 +102,20 @@ unkown Relation - 656 - 368 + 624 + 320 336 - 96 + 80 lt=<<<<<- -+ height_switch_sec -{readonly} +- _height_switch_sec 190.0;20.0;10.0;20.0 Relation - 240 + 208 480 80 160 @@ -124,20 +128,20 @@ m2=1 Relation - 704 - 608 + 672 + 640 320 - 96 + 64 lt=<. <<create>> - 10.0;40.0;180.0;40.0;180.0;10.0 + 10.0;20.0;180.0;20.0;180.0;10.0 Relation - 352 - 128 + 320 + 80 208 128 @@ -150,46 +154,44 @@ m2=0..1 Relation - 992 - 224 - 224 - 192 + 624 + 240 + 576 + 128 lt=<<<<<- -+ start_height_sec - {readonly} - 10.0;100.0;10.0;10.0 +- _start_height_sec + 220.0;60.0;220.0;10.0;10.0;10.0 Relation - 656 - 432 + 624 + 384 336 - 80 + 64 lt=<<<<<- -+ switch_end_sec -{readonly} +-_switch_end_sec 190.0;20.0;10.0;20.0 Relation - 1168 - 608 - 176 - 112 + 1248 + 640 + 240 + 176 lt=-> _next_in sorting_order - 10.0;10.0;10.0;50.0 + 50.0;10.0;50.0;90.0;10.0;90.0 Relation - 704 + 672 752 368 64 @@ -198,35 +200,10 @@ sorting_order type = unknown 10.0;20.0;210.0;20.0 - - UMLClass - - 752 - 144 - 432 - 96 - - StartHeightSection --- --- -+ enter_workpiece(Workpiece) - - - - Relation - - 576 - 144 - 208 - 112 - - lt=<<- - 10.0;50.0;10.0;10.0;110.0;10.0 - UMLNote - 944 + 912 48 384 64 @@ -238,19 +215,21 @@ bg=yellow UMLNote - 816 + 784 912 592 144 - Die Methode determine_workpiece_type ist notwendig, da der workpiece_type erst bestimmt werden kann, sobald das Teil an LB_SW angelangt ist. + Die Methode determine_workpiece_type ist notwendig, +da der workpiece_type erst bestimmt werden kann, +sobald das Teil an LB_SW angelangt ist. bg=yellow Relation - 528 + 496 896 320 80 @@ -261,26 +240,25 @@ bg=yellow UMLClass - 208 + 176 992 512 - 240 + 192 EncodedWorkpiece -- + _code: int {32 Bit} {readonly} -- -+ <<Create>> Encoded_Workpiece(Workpiece) + <<Create>> Encoded_Workpiece(code: int) -- get_id(): id -- get_height_1(): float -- get_type(): WorkpieceType ++ get_id(): id ++ get_height(): float ++ get_type(): WorkpieceType UMLNote - 816 + 784 1088 464 144 @@ -295,7 +273,7 @@ bg=yellow Relation - 512 + 480 1024 336 112 From f5a1958ee768eee5613fd73909a263d6eb7da1d9 Mon Sep 17 00:00:00 2001 From: Jendrik Date: Sun, 20 Jun 2021 17:59:10 +0200 Subject: [PATCH 2/3] Update Datamodel to match implementation --- diagrams/stage3/cd_data.uxf | 251 ++++++++++++++++++++++++------------ 1 file changed, 170 insertions(+), 81 deletions(-) diff --git a/diagrams/stage3/cd_data.uxf b/diagrams/stage3/cd_data.uxf index 5cf3ca5..499cf4c 100644 --- a/diagrams/stage3/cd_data.uxf +++ b/diagrams/stage3/cd_data.uxf @@ -1,19 +1,23 @@ - 16 + 10 UMLClass - 928 - 336 - 480 - 320 + 1120 + 370 + 300 + 280 - Anlage + UnitData -- + belt_is_blocked: bool + ramp_full: bool + pending_transfer: Workpiece ++ estop_count: int ++ estop_triggered:bool ++ warning_count: int ++ srv_pending: int - _unit_mutex: mutex -- + wrpc_fits_order(Workpiece): bool @@ -27,10 +31,10 @@ UMLClass - 176 - 608 - 512 - 320 + 650 + 630 + 320 + 200 Workpiece -- @@ -50,10 +54,10 @@ UMLClass - 1008 - 688 - 256 - 208 + 1150 + 680 + 160 + 130 <<enumeration>> WorkpieceType @@ -68,10 +72,10 @@ unkown UMLClass - 176 - 176 - 464 - 320 + 650 + 360 + 290 + 200 CBSection -- @@ -91,21 +95,21 @@ unkown UMLFrame - 128 - 0 - 1424 - 1280 + 620 + 140 + 890 + 910 - cd Data + cd Datamodel Relation - 624 - 320 - 336 - 80 + 930 + 450 + 210 + 50 lt=<<<<<- - _height_switch_sec @@ -115,10 +119,10 @@ unkown Relation - 208 - 480 - 80 - 160 + 670 + 550 + 50 + 100 lt=->>>> m1=0..* @@ -128,22 +132,22 @@ m2=1 Relation - 672 + 960 640 - 320 - 64 + 200 + 50 lt=<. <<create>> - 10.0;20.0;180.0;20.0;180.0;10.0 + 10.0;30.0;180.0;30.0;180.0;10.0 Relation - 320 - 80 - 208 - 128 + 740 + 300 + 130 + 80 lt=-> _next_section @@ -154,22 +158,22 @@ m2=0..1 Relation - 624 - 240 - 576 - 128 + 930 + 410 + 210 + 40 lt=<<<<<- - _start_height_sec - 220.0;60.0;220.0;10.0;10.0;10.0 + 190.0;20.0;10.0;20.0 Relation - 624 - 384 - 336 - 64 + 930 + 490 + 210 + 40 lt=<<<<<- -_switch_end_sec @@ -178,35 +182,35 @@ m2=0..1 Relation - 1248 + 1300 640 - 240 - 176 + 170 + 120 lt=-> _next_in sorting_order - 50.0;10.0;50.0;90.0;10.0;90.0 + 70.0;10.0;70.0;100.0;10.0;100.0 Relation - 672 - 752 - 368 - 64 + 960 + 720 + 210 + 40 lt=-> type = unknown - 10.0;20.0;210.0;20.0 + 10.0;20.0;190.0;20.0 UMLNote - 912 - 48 - 384 - 64 + 650 + 230 + 240 + 40 using id = int; {max 21 Bit} bg=yellow @@ -215,10 +219,10 @@ bg=yellow UMLNote - 784 - 912 - 592 - 144 + 1030 + 820 + 370 + 90 Die Methode determine_workpiece_type ist notwendig, da der workpiece_type erst bestimmt werden kann, @@ -229,10 +233,10 @@ bg=yellow Relation - 496 - 896 - 320 - 80 + 850 + 810 + 200 + 50 lt=.. 180.0;30.0;150.0;10.0;10.0;10.0 @@ -240,10 +244,10 @@ bg=yellow UMLClass - 176 - 992 - 512 - 192 + 650 + 870 + 320 + 120 EncodedWorkpiece -- @@ -258,10 +262,10 @@ bg=yellow UMLNote - 784 - 1088 - 464 - 144 + 1030 + 930 + 290 + 90 _code ist wie folgt codiert: - 21 Bit id @@ -273,12 +277,97 @@ bg=yellow Relation - 480 - 1024 - 336 - 112 + 840 + 890 + 210 + 70 lt=.. 190.0;50.0;140.0;10.0;10.0;10.0 + + UMLClass + + 930 + 180 + 160 + 130 + + <<enumeration>> +UnitType +-- +PRIMARY +SECONDARY + + + + UMLClass + + 1310 + 180 + 160 + 130 + + <<enumeration>> +OperatingMode +-- +IDLE +RUNNING +ERROR +ESTOP +SERVICE + + + + Relation + + 1000 + 300 + 140 + 110 + + lt=-> +unit_type + 10.0;10.0;10.0;90.0;120.0;90.0 + + + Relation + + 1380 + 300 + 130 + 90 + + lt=-> +operating_mode + 10.0;10.0;10.0;70.0 + + + UMLClass + + 1120 + 180 + 160 + 130 + + <<enumeration>> +Error +-- +OTHER_SYSTEM +RAMP_FULL +NO_ERROR + + + + Relation + + 1190 + 300 + 120 + 90 + + lt=-> +pending_error + 10.0;10.0;10.0;70.0 + From 96cabf2ec10fba02e271f09a62cccf529663719b Mon Sep 17 00:00:00 2001 From: Jendrik Date: Sun, 20 Jun 2021 18:03:32 +0200 Subject: [PATCH 3/3] Add diagram to latex --- latex/Chapters/4_design.tex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/latex/Chapters/4_design.tex b/latex/Chapters/4_design.tex index fddb6c3..764b899 100644 --- a/latex/Chapters/4_design.tex +++ b/latex/Chapters/4_design.tex @@ -126,6 +126,12 @@ \subsection{hal\_sensors}\label{subsec:hal_sensors} \FloatBarrier \section{Datenmodellierung}\label{sec:datenmodellierung} +\begin{figure} + \makebox[\textwidth][c]{\includegraphics[width=1.25\textwidth]{../out/diagrams/stage3/cd_data}} + \caption{Klassendiagramm Datenmodell} + \label{fig:cd-datamodel} +\end{figure} + %% Bestimmen Sie das Datenmodell und dokumentieren Sie es hier mit Hilfe von UML Klassendiagrammen %% unter Beachtung der Designprinzipien. Die Modelle können mit Hilfe eines UML-Tools erstellt werden. %% Hier ist dann ein Übersichtsbild einzufügen.