From 6dd1dbf486feab1966f158ef8e661a44ffa5eace Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Fri, 8 Jun 2018 16:52:00 +0200 Subject: [PATCH] =?UTF-8?q?vllt=20gr=C3=BCn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 04_UDEF/main_04_UDEF_a.cpp | 8 ++++ 11_PUTT/02_Ment/LCDDisplay.cpp | 53 ++++++++++++++++++++++ 11_PUTT/02_Ment/LCDDisplay.h | 14 ++++++ 11_PUTT/05_OO_b/SequenceDiagramCreator.cpp | 14 ++++++ 11_PUTT/05_OO_b/SequenceDiagramCreator.h | 11 +++++ 11_PUTT/05_OO_b/main.cpp | 7 +++ CMakeLists.txt | 10 +++- 7 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 11_PUTT/02_Ment/LCDDisplay.cpp create mode 100644 11_PUTT/02_Ment/LCDDisplay.h create mode 100644 11_PUTT/05_OO_b/SequenceDiagramCreator.cpp create mode 100644 11_PUTT/05_OO_b/SequenceDiagramCreator.h create mode 100644 11_PUTT/05_OO_b/main.cpp diff --git a/04_UDEF/main_04_UDEF_a.cpp b/04_UDEF/main_04_UDEF_a.cpp index 92e5cc4..53b9922 100644 --- a/04_UDEF/main_04_UDEF_a.cpp +++ b/04_UDEF/main_04_UDEF_a.cpp @@ -13,6 +13,14 @@ typedef RationalNumber calctype; // location 2 +RationalNumber operator+(RationalNumber a, RationalNumber b) { + +} + +std::string as_string(RationalNumber rationalNumber) { + +} + void doCalculation(calctype a, calctype b){ diff --git a/11_PUTT/02_Ment/LCDDisplay.cpp b/11_PUTT/02_Ment/LCDDisplay.cpp new file mode 100644 index 0000000..e3ab267 --- /dev/null +++ b/11_PUTT/02_Ment/LCDDisplay.cpp @@ -0,0 +1,53 @@ +#include +#include "LCDDisplay.h" + +int main(){ + printf("/*Zeichensatz-Test*/ \r\n"); + printf("Delay=50 /*Zeitverzoegerung*/ \r\n"); + printf("RS=0 /*Kommando Modus*/ \r\n"); + printf("13 01 /*LCD einschalten mit blinkendem Cursor*/ \r\n"); + printf("RS=1 /*Daten Modus*/ \r\n"); + printf("20 21 22 23 24 25 26 27 28 29 2A 2b 2c 2d 2e 2f \r\n"); + printf("RS=0 00:28 RS=1 /*Cursor springt in die zweite Zeile*/ \r\n"); + printf("RS=1 \r\n"); + printf("30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f \r\n"); + printf("RS=0 01 \r\n"); + printf("RS=1 \r\n"); + printf("40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f \r\n"); + printf("RS=0 00:28 \r\n"); + printf("RS=1 \r\n"); + printf("50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f \r\n"); + printf("RS=0 01 \r\n"); + printf("RS=1 \r\n"); + printf("60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f \r\n"); + printf("RS=0 00:28 \r\n"); + printf("RS=1 \r\n"); + printf("70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f \r\n"); + printf("RS=0 01 \r\n"); + printf("RS=1 \r\n"); + printf("80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f \r\n"); + printf("RS=0 00:28 \r\n"); + printf("RS=1 \r\n"); + printf("90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f \r\n"); + printf("RS=0 01 \r\n"); + printf("RS=1 \r\n"); + printf("a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af \r\n"); + printf("RS=0 00:28 \r\n"); + printf("RS=1 \r\n"); + printf("b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf \r\n"); + printf("RS=0 01 \r\n"); + printf("RS=1 \r\n"); + printf("c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf \r\n"); + printf("RS=0 00:28 \r\n"); + printf("RS=1 \r\n"); + printf("D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF \r\n"); + printf("RS=0 01 \r\n"); + printf("RS=1 \r\n"); + printf("E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF \r\n"); + printf("RS=0 00:28 \r\n"); + printf("RS=1 \r\n"); + printf("F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF \r\n"); + printf("RS=0 \r\n"); + printf("02 /*Return Home*/ \r\n"); + getchar(); +} diff --git a/11_PUTT/02_Ment/LCDDisplay.h b/11_PUTT/02_Ment/LCDDisplay.h new file mode 100644 index 0000000..cc861ab --- /dev/null +++ b/11_PUTT/02_Ment/LCDDisplay.h @@ -0,0 +1,14 @@ +// +// Created by JThei on 02.06.2018. +// + +#ifndef TEST_BUILD_LCDDISPLAY_H +#define TEST_BUILD_LCDDISPLAY_H + + +class LCDDisplay { +void print(int i); +}; + + +#endif //TEST_BUILD_LCDDISPLAY_H diff --git a/11_PUTT/05_OO_b/SequenceDiagramCreator.cpp b/11_PUTT/05_OO_b/SequenceDiagramCreator.cpp new file mode 100644 index 0000000..9e9d320 --- /dev/null +++ b/11_PUTT/05_OO_b/SequenceDiagramCreator.cpp @@ -0,0 +1,14 @@ +// +// Created by JThei on 02.06.2018. +// + +#include +#include "SequenceDiagramCreator.h" + +SequenceDiagrammCreator::SequenceDiagrammCreator() { + std::cout << "main()->SequenceDiagramCreator: contstruct" << std::endl; +} + +SequenceDiagrammCreator::~SequenceDiagrammCreator() { + std::cout << "SequenceDiagramCreator->main(): destruct" << std::endl; +} diff --git a/11_PUTT/05_OO_b/SequenceDiagramCreator.h b/11_PUTT/05_OO_b/SequenceDiagramCreator.h new file mode 100644 index 0000000..241632e --- /dev/null +++ b/11_PUTT/05_OO_b/SequenceDiagramCreator.h @@ -0,0 +1,11 @@ +// +// Created by JThei on 02.06.2018. +// +class SequenceDiagrammCreator { + +public: + SequenceDiagrammCreator(); + + ~SequenceDiagrammCreator(); + +}; \ No newline at end of file diff --git a/11_PUTT/05_OO_b/main.cpp b/11_PUTT/05_OO_b/main.cpp new file mode 100644 index 0000000..7486d66 --- /dev/null +++ b/11_PUTT/05_OO_b/main.cpp @@ -0,0 +1,7 @@ +#include "SequenceDiagramCreator.h" + +int main(int argc, char **argv) { + auto sdc = new SequenceDiagrammCreator(); + + delete sdc; +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 3403b6a..14cf3e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,4 +13,12 @@ add_executable(${UDEF_2} ${UDEF_2_SOURCE}) set(UDEF_TESTAT UserDefinedTypesTestat) set(UDEF_TESTAT_SOURCE 04_UDEF/Testat/Testat.cpp) -add_executable(${UDEF_TESTAT} ${UDEF_TESTAT_SOURCE}) \ No newline at end of file +add_executable(${UDEF_TESTAT} ${UDEF_TESTAT_SOURCE}) + +set(SEQUENCE_DIAGRAM SequenzDiagram) +set(SEQUENCE_DIAGRAM_SOURCE 11_PUTT/05_OO_b/main.cpp) +add_executable(${SEQUENCE_DIAGRAM} 11_PUTT/05_OO_b/SequenceDiagramCreator.cpp ${SEQUENCE_DIAGRAM_SOURCE}) + +set(LCDDISPLAY LCDDisplay) +set(LCDDISPLAY_SOURCE 11_PUTT/02_Ment/LCDDisplay.cpp) +add_executable(${LCDDISPLAY} ${LCDDISPLAY_SOURCE}) \ No newline at end of file