diff --git a/control/src/drv/commit_hash.h b/control/src/drv/commit_hash.h
index 904524a..dbe2c7d 100644
--- a/control/src/drv/commit_hash.h
+++ b/control/src/drv/commit_hash.h
@@ -1,4 +1,4 @@
#ifndef COMMIT_HASH_H
#define COMMIT_HASH_H
-const char COMMIT_HASH[] = "be3545fcbb7c7a41ec40d489efc952369f81bf5a";
+const char COMMIT_HASH[] = "69e02c20c2eef57a31b513144c7379d63701f01f";
#endif // COMMIT_HASH_H
diff --git a/control/src/ui/view_monitor.h b/control/src/ui/view_monitor.h
index 9ab39b5..457e161 100644
--- a/control/src/ui/view_monitor.h
+++ b/control/src/ui/view_monitor.h
@@ -8,23 +8,44 @@
#include "view_info.h"
#include "../drv/b15f.h"
-/*! View to display all B15 inputs. */
+/**
+ * Klasse für die Anzeige aller analogen & digitalen Eingänge des B15.
+ */
class ViewMonitor : public ViewInfo
{
public:
+ /**
+ * Standard-Konstruktor ohne Argumente
+ */
ViewMonitor(void);
+
+ /**
+ * Verarbeitet einen Tastendruck, z.B. Enter = Button angewählt.
+ * \param key gedrückte Taste
+ * \return Call, der nach dem keypress ausgeführt werden soll
+ */
virtual call_t keypress(int& key) override;
private:
+ /**
+ * Formatiert einen eingelesen Port-Wert in einen Bitstring und Hexadezimalzahlen.
+ * \param b Port-Wert
+ * \return formatierter String
+ */
std::string fancyDigitalString(uint8_t& b);
+ /**
+ * Formatiert einen eingelesen ADC-Wert und zeigt eine Prozentleiste.
+ * \param b analoger Wert
+ * \return formatierter String
+ */
std::string fancyAnalogString(uint16_t& v);
protected:
- virtual void worker(void);
- volatile bool run_worker = true;
- std::thread t_worker;
+ virtual void worker(void); //!< Funktion, die vom Worker-Thread ausgeführt, um die Anzeige zu aktualisieren.
+ volatile bool run_worker = true; //!< Legt fest, ob die Schleife im worker() weiterhin fortgeführt werden soll. Bei false bricht die Schleife ab.
+ std::thread t_worker; //!< Worker-Thread
};
diff --git a/docs/html/annotated.html b/docs/html/annotated.html
index 42e0e7e..97f1d2e 100644
--- a/docs/html/annotated.html
+++ b/docs/html/annotated.html
@@ -85,7 +85,7 @@ $(function() {
diff --git a/docs/html/b15f_8cpp_source.html b/docs/html/b15f_8cpp_source.html
index 3df8b32..533c326 100644
--- a/docs/html/b15f_8cpp_source.html
+++ b/docs/html/b15f_8cpp_source.html
@@ -121,7 +121,7 @@ $(function() {
diff --git a/docs/html/b15f_8h_source.html b/docs/html/b15f_8h_source.html
index 18c842a..8f0c15a 100644
--- a/docs/html/b15f_8h_source.html
+++ b/docs/html/b15f_8h_source.html
@@ -117,7 +117,7 @@ $(function() {
diff --git a/docs/html/classB15F-members.html b/docs/html/classB15F-members.html
index 9546393..c2f135d 100644
--- a/docs/html/classB15F-members.html
+++ b/docs/html/classB15F-members.html
@@ -114,7 +114,7 @@ $(function() {
diff --git a/docs/html/classB15F.html b/docs/html/classB15F.html
index c82b4b2..76bf09a 100644
--- a/docs/html/classB15F.html
+++ b/docs/html/classB15F.html
@@ -1309,7 +1309,7 @@ constexpr static uint32_t
diff --git a/docs/html/classDot-members.html b/docs/html/classDot-members.html
index 8a9f3c5..1814208 100644
--- a/docs/html/classDot-members.html
+++ b/docs/html/classDot-members.html
@@ -76,7 +76,7 @@ $(function() {
diff --git a/docs/html/classDot.html b/docs/html/classDot.html
index f04fbd9..71ff64f 100644
--- a/docs/html/classDot.html
+++ b/docs/html/classDot.html
@@ -196,7 +196,7 @@ Public Member Functions |
diff --git a/docs/html/classDriverException-members.html b/docs/html/classDriverException-members.html
index 835b92d..e19a66d 100644
--- a/docs/html/classDriverException-members.html
+++ b/docs/html/classDriverException-members.html
@@ -77,7 +77,7 @@ $(function() {
diff --git a/docs/html/classDriverException.html b/docs/html/classDriverException.html
index 129358d..d15d305 100644
--- a/docs/html/classDriverException.html
+++ b/docs/html/classDriverException.html
@@ -247,7 +247,7 @@ std::string
diff --git a/docs/html/classPlottyFile-members.html b/docs/html/classPlottyFile-members.html
index 7344642..11df990 100644
--- a/docs/html/classPlottyFile-members.html
+++ b/docs/html/classPlottyFile-members.html
@@ -100,7 +100,7 @@ $(function() {
diff --git a/docs/html/classPlottyFile.html b/docs/html/classPlottyFile.html
index ca14873..dfada5a 100644
--- a/docs/html/classPlottyFile.html
+++ b/docs/html/classPlottyFile.html
@@ -811,7 +811,7 @@ Public Member Functions |
diff --git a/docs/html/classTimeoutException-members.html b/docs/html/classTimeoutException-members.html
index ed75098..fff51f5 100644
--- a/docs/html/classTimeoutException-members.html
+++ b/docs/html/classTimeoutException-members.html
@@ -77,7 +77,7 @@ $(function() {
diff --git a/docs/html/classTimeoutException.html b/docs/html/classTimeoutException.html
index 4794db7..811778f 100644
--- a/docs/html/classTimeoutException.html
+++ b/docs/html/classTimeoutException.html
@@ -239,7 +239,7 @@ std::string
diff --git a/docs/html/classUSART-members.html b/docs/html/classUSART-members.html
index fd40572..ac90f6e 100644
--- a/docs/html/classUSART-members.html
+++ b/docs/html/classUSART-members.html
@@ -86,7 +86,7 @@ $(function() {
diff --git a/docs/html/classUSART.html b/docs/html/classUSART.html
index 452cae6..87adf51 100644
--- a/docs/html/classUSART.html
+++ b/docs/html/classUSART.html
@@ -523,7 +523,7 @@ Public Member Functions |
diff --git a/docs/html/classUSARTException-members.html b/docs/html/classUSARTException-members.html
index 177d5c4..952ab9b 100644
--- a/docs/html/classUSARTException-members.html
+++ b/docs/html/classUSARTException-members.html
@@ -77,7 +77,7 @@ $(function() {
diff --git a/docs/html/classUSARTException.html b/docs/html/classUSARTException.html
index 804be23..71a7332 100644
--- a/docs/html/classUSARTException.html
+++ b/docs/html/classUSARTException.html
@@ -239,7 +239,7 @@ std::string
diff --git a/docs/html/classView-members.html b/docs/html/classView-members.html
index b8890ee..bfa73bf 100644
--- a/docs/html/classView-members.html
+++ b/docs/html/classView-members.html
@@ -89,7 +89,7 @@ $(function() {
diff --git a/docs/html/classView.html b/docs/html/classView.html
index 6299c49..90b9a5e 100644
--- a/docs/html/classView.html
+++ b/docs/html/classView.html
@@ -444,7 +444,7 @@ constexpr static int |
diff --git a/docs/html/classViewInfo-members.html b/docs/html/classViewInfo-members.html
index bdbd8a1..0f612af 100644
--- a/docs/html/classViewInfo-members.html
+++ b/docs/html/classViewInfo-members.html
@@ -99,7 +99,7 @@ $(function() {
diff --git a/docs/html/classViewInfo.html b/docs/html/classViewInfo.html
index eebd3a2..4e3fb1c 100644
--- a/docs/html/classViewInfo.html
+++ b/docs/html/classViewInfo.html
@@ -390,7 +390,7 @@ Additional Inherited Members |
diff --git a/docs/html/classViewMonitor-members.html b/docs/html/classViewMonitor-members.html
index 11c3acb..fe0d240 100644
--- a/docs/html/classViewMonitor-members.html
+++ b/docs/html/classViewMonitor-members.html
@@ -79,7 +79,7 @@ $(function() {
keypress(int &key) override | ViewMonitor | virtual |
label_close | ViewInfo | protected |
repaint(void) | View | virtual |
- run_worker (defined in ViewMonitor) | ViewMonitor | protected |
+ run_worker | ViewMonitor | protected |
setCall(call_t call) | ViewInfo | virtual |
setLabelClose(std::string label) | ViewInfo | virtual |
setText(std::string text) | ViewInfo | virtual |
@@ -88,22 +88,22 @@ $(function() {
start_x | View | protected |
start_y | View | protected |
str_split(const std::string &str, const std::string delim) | View | static |
- t_worker (defined in ViewMonitor) | ViewMonitor | protected |
+ t_worker | ViewMonitor | protected |
text | ViewInfo | protected |
text_offset_x | ViewInfo | protectedstatic |
text_offset_y | ViewInfo | protectedstatic |
title | View | protected |
View(void) | View | |
ViewInfo(void) | ViewInfo | |
- ViewMonitor(void) (defined in ViewMonitor) | ViewMonitor | |
+ ViewMonitor(void) | ViewMonitor | |
width | View | protected |
win | View | protectedstatic |
- worker(void) (defined in ViewMonitor) | ViewMonitor | protectedvirtual |
+ worker(void) | ViewMonitor | protectedvirtual |
~View(void) | View | virtual |
diff --git a/docs/html/classViewMonitor.html b/docs/html/classViewMonitor.html
index e816603..3efcd70 100644
--- a/docs/html/classViewMonitor.html
+++ b/docs/html/classViewMonitor.html
@@ -88,6 +88,8 @@ $(function() {
|
+ | ViewMonitor (void) |
+ |
virtual call_t | keypress (int &key) override |
|
@@ -114,16 +116,19 @@ Public Member Functions
|
-virtual void | worker (void) |
+virtual void worker (void) |
+ | Funktion, die vom Worker-Thread ausgeführt, um die Anzeige zu aktualisieren.
|
|
|
-volatile bool | run_worker = true |
+volatile bool run_worker = true |
+ | Legt fest, ob die Schleife im worker() weiterhin fortgeführt werden soll. Bei false bricht die Schleife ab.
|
|
-std::thread | t_worker |
+std::thread t_worker |
+ | Worker-Thread.
|
|
@@ -197,10 +202,32 @@ constexpr static int | | |
-View to display all B15 inputs.
+
Klasse für die Anzeige aller analogen & digitalen Eingänge des B15.
-
Definition at line 13 of file view_monitor.h.
-
+
Definition at line 15 of file view_monitor.h.
+
+
+◆ ViewMonitor()
+
+
+
+
+
+ ViewMonitor::ViewMonitor |
+ ( |
+ void |
+ | ) |
+ |
+
+
+
+
Standard-Konstruktor ohne Argumente
+
+
Definition at line 3 of file view_monitor.cpp.
+
+
+
+
◆ keypress()
@@ -245,7 +272,7 @@ constexpr static int
diff --git a/docs/html/classViewPromt-members.html b/docs/html/classViewPromt-members.html
index ba2a693..adf815b 100644
--- a/docs/html/classViewPromt-members.html
+++ b/docs/html/classViewPromt-members.html
@@ -105,7 +105,7 @@ $(function() {
diff --git a/docs/html/classViewPromt.html b/docs/html/classViewPromt.html
index e59d998..accff7f 100644
--- a/docs/html/classViewPromt.html
+++ b/docs/html/classViewPromt.html
@@ -273,7 +273,7 @@ Additional Inherited Members |
diff --git a/docs/html/classViewSelection-members.html b/docs/html/classViewSelection-members.html
index 6698c65..b70becc 100644
--- a/docs/html/classViewSelection-members.html
+++ b/docs/html/classViewSelection-members.html
@@ -94,7 +94,7 @@ $(function() {
diff --git a/docs/html/classViewSelection.html b/docs/html/classViewSelection.html
index f702445..4ff0481 100644
--- a/docs/html/classViewSelection.html
+++ b/docs/html/classViewSelection.html
@@ -240,7 +240,7 @@ Additional Inherited Members
diff --git a/docs/html/classes.html b/docs/html/classes.html
index c87e7d8..3836c8c 100644
--- a/docs/html/classes.html
+++ b/docs/html/classes.html
@@ -105,7 +105,7 @@ $(function() {
diff --git a/docs/html/cli_8cpp_source.html b/docs/html/cli_8cpp_source.html
index abda5ea..9978cb0 100644
--- a/docs/html/cli_8cpp_source.html
+++ b/docs/html/cli_8cpp_source.html
@@ -77,7 +77,7 @@ $(function() {
virtual void setTitle(std::string title)
diff --git a/docs/html/commit__hash_8h_source.html b/docs/html/commit__hash_8h_source.html
index 6662c85..0a7d187 100644
--- a/docs/html/commit__hash_8h_source.html
+++ b/docs/html/commit__hash_8h_source.html
@@ -70,10 +70,10 @@ $(function() {
commit_hash.h
-
3 const char COMMIT_HASH[] =
"be3545fcbb7c7a41ec40d489efc952369f81bf5a";
4 #endif // COMMIT_HASH_H
+ 3 const char COMMIT_HASH[] =
"69e02c20c2eef57a31b513144c7379d63701f01f";
4 #endif // COMMIT_HASH_H
diff --git a/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html b/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html
index b5c9a3f..f9d9c02 100644
--- a/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html
+++ b/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html
@@ -73,7 +73,7 @@ $(function() {
diff --git a/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html b/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html
index ee26b78..4dea88d 100644
--- a/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html
+++ b/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html
@@ -73,7 +73,7 @@ $(function() {
diff --git a/docs/html/dot_8cpp_source.html b/docs/html/dot_8cpp_source.html
index d225d50..0f28596 100644
--- a/docs/html/dot_8cpp_source.html
+++ b/docs/html/dot_8cpp_source.html
@@ -77,7 +77,7 @@ $(function() {
Dot(uint16_t x, uint16_t y, uint8_t curve)
diff --git a/docs/html/dot_8h_source.html b/docs/html/dot_8h_source.html
index 57910da..708b1b9 100644
--- a/docs/html/dot_8h_source.html
+++ b/docs/html/dot_8h_source.html
@@ -78,7 +78,7 @@ $(function() {
Dot(uint16_t x, uint16_t y, uint8_t curve)
diff --git a/docs/html/driverexception_8h_source.html b/docs/html/driverexception_8h_source.html
index 09a9de3..958fa61 100644
--- a/docs/html/driverexception_8h_source.html
+++ b/docs/html/driverexception_8h_source.html
@@ -79,7 +79,7 @@ $(function() {
diff --git a/docs/html/files.html b/docs/html/files.html
index 6cbc2b6..b82f7ed 100644
--- a/docs/html/files.html
+++ b/docs/html/files.html
@@ -101,7 +101,7 @@ $(function() {
diff --git a/docs/html/functions.html b/docs/html/functions.html
index 3a2ff65..a663310 100644
--- a/docs/html/functions.html
+++ b/docs/html/functions.html
@@ -335,6 +335,9 @@ $(function() {
reverse()
: B15F
+run_worker
+: ViewMonitor
+
@@ -433,6 +436,9 @@ $(function() {
- t -
@@ -495,6 +504,9 @@ $(function() {
win
: View
+worker()
+: ViewMonitor
+
writeToFile()
: PlottyFile
@@ -521,7 +533,7 @@ $(function() {
diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html
index 63ae921..dd48d42 100644
--- a/docs/html/functions_func.html
+++ b/docs/html/functions_func.html
@@ -400,6 +400,9 @@ $(function() {
ViewInfo()
: ViewInfo
+ViewMonitor()
+: ViewMonitor
+
@@ -409,6 +412,9 @@ $(function() {
, TimeoutException
, USARTException
+worker()
+: ViewMonitor
+
writeToFile()
: PlottyFile
@@ -435,7 +441,7 @@ $(function() {
diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html
index 2151bdd..88ece39 100644
--- a/docs/html/functions_vars.html
+++ b/docs/html/functions_vars.html
@@ -106,12 +106,18 @@ $(function() {
RECONNECT_TRIES
: B15F
+run_worker
+: ViewMonitor
+
start_x
: View
start_y
: View
+t_worker
+: ViewMonitor
+
text
: ViewInfo
@@ -137,7 +143,7 @@ $(function() {
diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html
index 1a89836..b97c6ef 100644
--- a/docs/html/hierarchy.html
+++ b/docs/html/hierarchy.html
@@ -86,7 +86,7 @@ $(function() {
diff --git a/docs/html/index.html b/docs/html/index.html
index 0d38f71..3cdd4b4 100644
--- a/docs/html/index.html
+++ b/docs/html/index.html
@@ -175,7 +175,7 @@ Dabei gehören Punkte mit dem gleichen Index für curve
(uint8_
diff --git a/docs/html/plottyfile_8cpp_source.html b/docs/html/plottyfile_8cpp_source.html
index baa0b4b..6446299 100644
--- a/docs/html/plottyfile_8cpp_source.html
+++ b/docs/html/plottyfile_8cpp_source.html
@@ -101,7 +101,7 @@ $(function() {
std::string getUnitX(void) const
diff --git a/docs/html/plottyfile_8h_source.html b/docs/html/plottyfile_8h_source.html
index 62ac267..50407c9 100644
--- a/docs/html/plottyfile_8h_source.html
+++ b/docs/html/plottyfile_8h_source.html
@@ -102,7 +102,7 @@ $(function() {
std::string getUnitX(void) const
diff --git a/docs/html/requests_8h_source.html b/docs/html/requests_8h_source.html
index eff5feb..7a54f2a 100644
--- a/docs/html/requests_8h_source.html
+++ b/docs/html/requests_8h_source.html
@@ -73,7 +73,7 @@ $(function() {
4 constexpr
static uint8_t RQ_DISCARD = 0;
5 constexpr
static uint8_t RQ_TEST = 1;
6 constexpr
static uint8_t RQ_INFO = 2;
7 constexpr
static uint8_t RQ_INT_TEST = 3;
8 constexpr
static uint8_t RQ_SELF_TEST = 4;
9 constexpr
static uint8_t RQ_DIGITAL_WRITE_0 = 5;
10 constexpr
static uint8_t RQ_DIGITAL_WRITE_1 = 6;
11 constexpr
static uint8_t RQ_DIGITAL_READ_0 = 7;
12 constexpr
static uint8_t RQ_DIGITAL_READ_1 = 8;
13 constexpr
static uint8_t RQ_READ_DIP_SWITCH = 9;
14 constexpr
static uint8_t RQ_ANALOG_WRITE_0 = 10;
15 constexpr
static uint8_t RQ_ANALOG_WRITE_1 = 11;
16 constexpr
static uint8_t RQ_ANALOG_READ = 12;
17 constexpr
static uint8_t RQ_ADC_DAC_STROKE = 13;
18 constexpr
static uint8_t RQ_PWM_SET_FREQ = 14;
19 constexpr
static uint8_t RQ_PWM_SET_VALUE = 15;
20 constexpr
static uint8_t RQ_SET_MEM_8 = 16;
21 constexpr
static uint8_t RQ_GET_MEM_8 = 17;
22 constexpr
static uint8_t RQ_SET_MEM_16 = 18;
23 constexpr
static uint8_t RQ_GET_MEM_16 = 19;
24 constexpr
static uint8_t RQ_COUNTER_OFFSET = 20;
25 constexpr
static uint8_t RQ_SERVO_ENABLE = 21;
26 constexpr
static uint8_t RQ_SERVO_DISABLE = 22;
27 constexpr
static uint8_t RQ_SERVO_SET_POS = 23;
29 uint8_t
const rq_len[] =
44 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 ,
diff --git a/docs/html/search/all_11.js b/docs/html/search/all_11.js
index 7f009ca..9f76639 100644
--- a/docs/html/search/all_11.js
+++ b/docs/html/search/all_11.js
@@ -2,7 +2,7 @@ var searchData=
[
['view',['View',['../classView.html',1,'View'],['../classView.html#a0a9be6e5fb588412aab31cacf5e43b04',1,'View::View()']]],
['viewinfo',['ViewInfo',['../classViewInfo.html',1,'ViewInfo'],['../classViewInfo.html#a95a3a81de65ef42615bbe5a843e8d5f6',1,'ViewInfo::ViewInfo()']]],
- ['viewmonitor',['ViewMonitor',['../classViewMonitor.html',1,'']]],
+ ['viewmonitor',['ViewMonitor',['../classViewMonitor.html',1,'ViewMonitor'],['../classViewMonitor.html#a080526967fac26eeaa5b73468fdac26d',1,'ViewMonitor::ViewMonitor()']]],
['viewpromt',['ViewPromt',['../classViewPromt.html',1,'']]],
['viewselection',['ViewSelection',['../classViewSelection.html',1,'']]]
];
diff --git a/docs/html/search/all_12.js b/docs/html/search/all_12.js
index 4f5cf1d..ffd40a7 100644
--- a/docs/html/search/all_12.js
+++ b/docs/html/search/all_12.js
@@ -4,5 +4,6 @@ var searchData=
['what',['what',['../classDriverException.html#a781362760bcd75b1bd5448629df58446',1,'DriverException::what()'],['../classTimeoutException.html#a97eaf01fc39ddb94b060020b42fefd6e',1,'TimeoutException::what()'],['../classUSARTException.html#a2af5e3c00cd0585c7427c2e0420a8f15',1,'USARTException::what()']]],
['width',['width',['../classView.html#ae039aa744b085db819ae149705b2c32b',1,'View']]],
['win',['win',['../classView.html#a5ddee2bf0b26dbcfa7780be17ff33dd7',1,'View']]],
+ ['worker',['worker',['../classViewMonitor.html#a245a1dc3cc43a84f63e1175a195581a2',1,'ViewMonitor']]],
['writetofile',['writeToFile',['../classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305',1,'PlottyFile']]]
];
diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js
index 2c0fc33..d079e8d 100644
--- a/docs/html/search/all_d.js
+++ b/docs/html/search/all_d.js
@@ -6,5 +6,6 @@ var searchData=
['reconnect_5ftimeout',['RECONNECT_TIMEOUT',['../classB15F.html#a040951746fbfd632e12bd1ad14578816',1,'B15F']]],
['reconnect_5ftries',['RECONNECT_TRIES',['../classB15F.html#a6c4895bdbcd71ff6743becf97985c2dc',1,'B15F']]],
['repaint',['repaint',['../classView.html#aa7b1f1179e3c4f06bef1e99355d0d592',1,'View']]],
- ['reverse',['reverse',['../classB15F.html#a2937f22f1cfc9b533f4b5bf4db726a68',1,'B15F']]]
+ ['reverse',['reverse',['../classB15F.html#a2937f22f1cfc9b533f4b5bf4db726a68',1,'B15F']]],
+ ['run_5fworker',['run_worker',['../classViewMonitor.html#a79a68894c0a05422b5707202d28a6db0',1,'ViewMonitor']]]
];
diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js
index 5d93e26..e998cfa 100644
--- a/docs/html/search/all_f.js
+++ b/docs/html/search/all_f.js
@@ -1,5 +1,6 @@
var searchData=
[
+ ['t_5fworker',['t_worker',['../classViewMonitor.html#a377eb8deab3061aa4e084be9b791c056',1,'ViewMonitor']]],
['testconnection',['testConnection',['../classB15F.html#a6b8c7da1fb9b619543844e0ce7597d83',1,'B15F']]],
['testintconv',['testIntConv',['../classB15F.html#ac2c7b6d84da5239ee7cc3d44e689d9db',1,'B15F']]],
['text',['text',['../classViewInfo.html#ac392a569ef16af3dc11ee659f3fa1eb4',1,'ViewInfo']]],
diff --git a/docs/html/search/functions_d.js b/docs/html/search/functions_d.js
index fcaf074..8200514 100644
--- a/docs/html/search/functions_d.js
+++ b/docs/html/search/functions_d.js
@@ -1,5 +1,6 @@
var searchData=
[
['view',['View',['../classView.html#a0a9be6e5fb588412aab31cacf5e43b04',1,'View']]],
- ['viewinfo',['ViewInfo',['../classViewInfo.html#a95a3a81de65ef42615bbe5a843e8d5f6',1,'ViewInfo']]]
+ ['viewinfo',['ViewInfo',['../classViewInfo.html#a95a3a81de65ef42615bbe5a843e8d5f6',1,'ViewInfo']]],
+ ['viewmonitor',['ViewMonitor',['../classViewMonitor.html#a080526967fac26eeaa5b73468fdac26d',1,'ViewMonitor']]]
];
diff --git a/docs/html/search/functions_e.js b/docs/html/search/functions_e.js
index 6335f37..773bb5d 100644
--- a/docs/html/search/functions_e.js
+++ b/docs/html/search/functions_e.js
@@ -1,5 +1,6 @@
var searchData=
[
['what',['what',['../classDriverException.html#a781362760bcd75b1bd5448629df58446',1,'DriverException::what()'],['../classTimeoutException.html#a97eaf01fc39ddb94b060020b42fefd6e',1,'TimeoutException::what()'],['../classUSARTException.html#a2af5e3c00cd0585c7427c2e0420a8f15',1,'USARTException::what()']]],
+ ['worker',['worker',['../classViewMonitor.html#a245a1dc3cc43a84f63e1175a195581a2',1,'ViewMonitor']]],
['writetofile',['writeToFile',['../classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305',1,'PlottyFile']]]
];
diff --git a/docs/html/search/variables_7.js b/docs/html/search/variables_7.js
index fbf0a47..d75da1d 100644
--- a/docs/html/search/variables_7.js
+++ b/docs/html/search/variables_7.js
@@ -1,5 +1,6 @@
var searchData=
[
['reconnect_5ftimeout',['RECONNECT_TIMEOUT',['../classB15F.html#a040951746fbfd632e12bd1ad14578816',1,'B15F']]],
- ['reconnect_5ftries',['RECONNECT_TRIES',['../classB15F.html#a6c4895bdbcd71ff6743becf97985c2dc',1,'B15F']]]
+ ['reconnect_5ftries',['RECONNECT_TRIES',['../classB15F.html#a6c4895bdbcd71ff6743becf97985c2dc',1,'B15F']]],
+ ['run_5fworker',['run_worker',['../classViewMonitor.html#a79a68894c0a05422b5707202d28a6db0',1,'ViewMonitor']]]
];
diff --git a/docs/html/search/variables_9.js b/docs/html/search/variables_9.js
index ce82adb..f24859e 100644
--- a/docs/html/search/variables_9.js
+++ b/docs/html/search/variables_9.js
@@ -1,5 +1,6 @@
var searchData=
[
+ ['t_5fworker',['t_worker',['../classViewMonitor.html#a377eb8deab3061aa4e084be9b791c056',1,'ViewMonitor']]],
['text',['text',['../classViewInfo.html#ac392a569ef16af3dc11ee659f3fa1eb4',1,'ViewInfo']]],
['text_5foffset_5fx',['text_offset_x',['../classViewInfo.html#a4681a8138f17ea229aca02e6db7357cd',1,'ViewInfo']]],
['text_5foffset_5fy',['text_offset_y',['../classViewInfo.html#a34a9239c8954a0c27a22cf44d112f5b8',1,'ViewInfo']]],
diff --git a/docs/html/timeoutexception_8h_source.html b/docs/html/timeoutexception_8h_source.html
index 727164e..edb008d 100644
--- a/docs/html/timeoutexception_8h_source.html
+++ b/docs/html/timeoutexception_8h_source.html
@@ -79,7 +79,7 @@ $(function() {
TimeoutException(const std::string &message)
diff --git a/docs/html/ui_8cpp_source.html b/docs/html/ui_8cpp_source.html
index 9e932c4..8e57797 100644
--- a/docs/html/ui_8cpp_source.html
+++ b/docs/html/ui_8cpp_source.html
@@ -71,7 +71,7 @@ $(function() {
2 #include "../drv/b15f.h" 4 std::vector<View*> win_stack;
10 view->
setTitle(
"B15F - Command Line Interface");
11 view->addChoice(
"[ Monitor - Eingaben beobachten ]", &show_monitor);
12 view->addChoice(
"[ Digitale Ausgabe BA0 ]", &show_digital_output0);
13 view->addChoice(
"[ Digitale Ausgabe BA1 ]", &show_digital_output1);
14 view->addChoice(
"[ Analoge Ausgabe AA0 ]", &show_analog_output0);
15 view->addChoice(
"[ Analoge Ausgabe AA1 ]", &show_analog_output1);
16 view->addChoice(
"[ Selbsttest des B15 ]", &show_selftest_info);
17 view->addChoice(
"[ Informationen ]", &show_info);
18 view->addChoice(
"",
nullptr);
19 view->addChoice(
"[ Beenden ]", &finish);
22 win_stack.push_back(view);
33 win_stack.back()->repaint();
34 nextCall = win_stack.back()->keypress(key);
42 while(win_stack.size());
49 delete win_stack.back();
53 win_stack.back()->repaint();
64 if(t_refresh.joinable())
75 view->
setText(
"Informationen zu Board 15 Famulus Edition\n \nProjektseite: https://github.com/devfix/b15f/\nDokumentation: https://devfix.github.io/b15f/\n \nB15F Software entwickelt von Tristan Krause für das Hardware-Labor.\nKontakt: tristan.krause@stud.htwk-leipzig.de");
79 win_stack.push_back(view);
83 void show_monitor(
int)
87 view->
setText(
"\nErfasse Messwerte...");
91 win_stack.push_back(view);
95 void show_invalid_port_input(
int)
99 view->
setText(
"Bitte geben Sie einen Wert aus dem Intervall [0, FF] an.");
103 win_stack.push_back(view);
107 void show_invalid_dac_input(
int)
111 view->
setText(
"Bitte geben Sie einen Wert aus dem Intervall [0, 1023] an.");
115 win_stack.push_back(view);
119 void write_digital_output0(
int)
123 int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16);
125 throw std::invalid_argument(
"bad value");
126 uint8_t port = static_cast<uint8_t>(d);
132 catch(std::invalid_argument& ex)
134 show_invalid_port_input(0);
138 void write_digital_output1(
int)
142 int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16);
144 throw std::invalid_argument(
"bad value");
145 uint8_t port = static_cast<uint8_t>(d);
151 catch(std::invalid_argument& ex)
153 show_invalid_port_input(0);
157 void write_analog_output0(
int)
161 uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput());
163 throw std::invalid_argument(
"bad value");
169 catch(std::invalid_argument& ex)
171 show_invalid_dac_input(0);
175 void write_analog_output1(
int)
179 uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput());
181 throw std::invalid_argument(
"bad value");
187 catch(std::invalid_argument& ex)
189 show_invalid_dac_input(0);
193 void show_digital_output0(
int)
196 view->
setTitle(
"Digitale Ausgabe BE0");
197 view->setMessage(
"\nAusgabe Port-Wert (hex): 0x");
198 view->setCancel(
"[ Zurueck ]",
true);
199 view->setConfirm(
"[ OK ]", &write_digital_output0);
202 win_stack.push_back(view);
206 void show_digital_output1(
int)
209 view->
setTitle(
"Digitale Ausgabe BE1");
210 view->setMessage(
"\nAusgabe Port-Wert (hex): 0x");
211 view->setCancel(
"[ Zurueck ]",
true);
212 view->setConfirm(
"[ OK ]", &write_digital_output1);
215 win_stack.push_back(view);
219 void show_analog_output0(
int)
222 view->
setTitle(
"Analoge Ausgabe AA0");
223 view->setMessage(
"\nAusgabe 10-Bit-Wert (0...1023): ");
224 view->setCancel(
"[ Zurueck ]",
true);
225 view->setConfirm(
"[ OK ]", &write_analog_output0);
228 win_stack.push_back(view);
232 void show_analog_output1(
int)
235 view->
setTitle(
"Analoge Ausgabe AA1");
236 view->setMessage(
"\nAusgabe 10-Bit-Wert (0...1023): ");
237 view->setCancel(
"[ Zurueck ]",
true);
238 view->setConfirm(
"[ OK ]", &write_analog_output1);
241 win_stack.push_back(view);
245 void start_selftest(
int)
252 view->
setText(
"Das B15 befindet sich jetzt im Selbsttestmodus.\n \nSelbsttest:\nZu Beginn geht der Reihe nach jede LED von BA0 bis BA1 an.\nDanach leuchten die LEDs an AA0 und AA1 kurz auf.\nZum Schluss spiegelt in einer Endlosschleife:\n* BA0 Port BE0\n* BA1 die DIP-Schalter S7\n* AA0 ADC0\n* AA1 ADC1");
257 win_stack.push_back(view);
261 void stop_selftest(
int)
271 void show_selftest_info(
int)
275 view->
setText(
"Bitte entfernen Sie jetzt alle Draehte von den Anschlussklemmen und\nbestätigen mit Enter.");
277 view->
setCall(&start_selftest);
280 win_stack.push_back(view);
-
+
void analogWrite0(uint16_t port)
void analogWrite1(uint16_t port)
void digitalWrite0(uint8_t)
@@ -94,7 +94,7 @@ $(function() {
void digitalWrite1(uint8_t)
diff --git a/docs/html/ui_8h_source.html b/docs/html/ui_8h_source.html
index 71ae0b6..6e0faf6 100644
--- a/docs/html/ui_8h_source.html
+++ b/docs/html/ui_8h_source.html
@@ -73,7 +73,7 @@ $(function() {
5 #include "view_selection.h" 7 #include "view_monitor.h" 8 #include "view_promt.h" 17 void show_monitor(
int);
18 void show_invalid_port_input(
int);
19 void show_invalid_dac_input(
int);
20 void write_digital_output0(
int);
21 void write_digital_output1(
int);
22 void write_analog_output0(
int);
23 void write_analog_output1(
int);
24 void show_digital_output0(
int);
25 void show_digital_output1(
int);
26 void show_analog_output0(
int);
27 void show_analog_output1(
int);
30 void show_selftest_info(
int);
31 void start_selftest(
int);
32 void stop_selftest(
int);
35 extern std::vector<View*> win_stack;
36 extern std::thread t_refresh;
diff --git a/docs/html/usart_8cpp_source.html b/docs/html/usart_8cpp_source.html
index 67e7ceb..cadc1f6 100644
--- a/docs/html/usart_8cpp_source.html
+++ b/docs/html/usart_8cpp_source.html
@@ -88,7 +88,7 @@ $(function() {
diff --git a/docs/html/usart_8h_source.html b/docs/html/usart_8h_source.html
index eaf2eb7..4ebd986 100644
--- a/docs/html/usart_8h_source.html
+++ b/docs/html/usart_8h_source.html
@@ -88,7 +88,7 @@ $(function() {
void flushOutputBuffer(void)
diff --git a/docs/html/usartexception_8h_source.html b/docs/html/usartexception_8h_source.html
index ca27f65..95dbb21 100644
--- a/docs/html/usartexception_8h_source.html
+++ b/docs/html/usartexception_8h_source.html
@@ -79,7 +79,7 @@ $(function() {
virtual ~USARTException()=default
diff --git a/docs/html/view_8cpp_source.html b/docs/html/view_8cpp_source.html
index f2e3888..3004ac5 100644
--- a/docs/html/view_8cpp_source.html
+++ b/docs/html/view_8cpp_source.html
@@ -88,7 +88,7 @@ $(function() {
virtual void draw(void)=0
diff --git a/docs/html/view_8h_source.html b/docs/html/view_8h_source.html
index 920047c..c8948a3 100644
--- a/docs/html/view_8h_source.html
+++ b/docs/html/view_8h_source.html
@@ -91,7 +91,7 @@ $(function() {
constexpr static int KEY_ENT
Key value for the Enter key.
diff --git a/docs/html/view__info_8cpp_source.html b/docs/html/view__info_8cpp_source.html
index 71a96b6..9261c88 100644
--- a/docs/html/view__info_8cpp_source.html
+++ b/docs/html/view__info_8cpp_source.html
@@ -93,7 +93,7 @@ $(function() {
constexpr static int KEY_ENT
Key value for the Enter key.
diff --git a/docs/html/view__info_8h_source.html b/docs/html/view__info_8h_source.html
index d5bf10e..24ae3f4 100644
--- a/docs/html/view__info_8h_source.html
+++ b/docs/html/view__info_8h_source.html
@@ -87,7 +87,7 @@ $(function() {
virtual void draw(void) override
diff --git a/docs/html/view__monitor_8cpp_source.html b/docs/html/view__monitor_8cpp_source.html
index df59651..fcd6f9a 100644
--- a/docs/html/view__monitor_8cpp_source.html
+++ b/docs/html/view__monitor_8cpp_source.html
@@ -70,14 +70,15 @@ $(function() {
view_monitor.cpp
-
1 #include "view_monitor.h" 3 ViewMonitor::ViewMonitor() : t_worker(&
ViewMonitor::worker, this)
17 if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
21 size_t mouse_x =
event.x, mouse_y =
event.y;
22 if(mouse_y == row && mouse_x >= column && mouse_x < column +
label_close.length())
44 std::string ViewMonitor::fancyDigitalString(uint8_t& b)
46 std::string bitstring(std::bitset<8>(b).to_string());
49 std::stringstream str;
52 str <<
"0x" << std::setfill (
'0') << std::setw(2) << std::hex << (int) b << std::dec;
56 std::string ViewMonitor::fancyAnalogString(uint16_t& v)
58 std::stringstream str;
59 double volt = round(v * 100.0 * 5.0 / 1023.0) / 100.0;
61 str << std::setfill (
'0') << std::setw(4) << (int) v <<
" " << std::fixed << std::setprecision(2) << volt <<
" V ";
64 uint8_t p = round(v * 40.0 / 1023.0);
65 for(uint8_t i = 0; i < p; i++)
67 for(uint8_t i = 0; i < 40 - p; i++)
69 str <<
"]" << std::endl;
74 void ViewMonitor::worker()
84 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
87 std::this_thread::sleep_for(std::chrono::milliseconds(100));
94 for(uint8_t i = 0; i <
sizeof(adc) /
sizeof(adc[0]); i++)
98 std::stringstream str;
108 str <<
"Digitale Enigaenge:" << std::endl;
109 str <<
"Binaere Eingabe 0: " << fancyDigitalString(be0) << std::endl;
110 str <<
"Binaere Eingabe 1: " << fancyDigitalString(be1) << std::endl;
111 str <<
"Dip Schalter (S7): " << fancyDigitalString(dsw) << std::endl;
121 str <<
"Analoge Eingaenge:" << std::endl;
122 for(uint8_t i = 0; i <
sizeof(adc) /
sizeof(adc[0]); i++)
124 str <<
"Kanal " << std::to_string((
int) i) <<
": ";
125 str << fancyAnalogString(adc[i]) << std::endl;
133 std::cout <<
"DriverException: " << ex.
what() << std::endl;
144 B15F::abort(
"Die Verbindung ist unterbrochen worden. Wurde ein Stecker gezogen? :D");
+ 1 #include "view_monitor.h" 17 if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
21 size_t mouse_x =
event.x, mouse_y =
event.y;
22 if(mouse_y == row && mouse_x >= column && mouse_x < column +
label_close.length())
44 std::string ViewMonitor::fancyDigitalString(uint8_t& b)
46 std::string bitstring(std::bitset<8>(b).to_string());
49 std::stringstream str;
52 str <<
"0x" << std::setfill (
'0') << std::setw(2) << std::hex << (int) b << std::dec;
56 std::string ViewMonitor::fancyAnalogString(uint16_t& v)
58 std::stringstream str;
59 double volt = round(v * 100.0 * 5.0 / 1023.0) / 100.0;
61 str << std::setfill (
'0') << std::setw(4) << (int) v <<
" " << std::fixed << std::setprecision(2) << volt <<
" V ";
64 uint8_t p = round(v * 40.0 / 1023.0);
65 for(uint8_t i = 0; i < p; i++)
67 for(uint8_t i = 0; i < 40 - p; i++)
69 str <<
"]" << std::endl;
84 std::this_thread::sleep_for(std::chrono::milliseconds(1000));
87 std::this_thread::sleep_for(std::chrono::milliseconds(100));
94 for(uint8_t i = 0; i <
sizeof(adc) /
sizeof(adc[0]); i++)
98 std::stringstream str;
108 str <<
"Digitale Enigaenge:" << std::endl;
109 str <<
"Binaere Eingabe 0: " << fancyDigitalString(be0) << std::endl;
110 str <<
"Binaere Eingabe 1: " << fancyDigitalString(be1) << std::endl;
111 str <<
"Dip Schalter (S7): " << fancyDigitalString(dsw) << std::endl;
121 str <<
"Analoge Eingaenge:" << std::endl;
122 for(uint8_t i = 0; i <
sizeof(adc) /
sizeof(adc[0]); i++)
124 str <<
"Kanal " << std::to_string((
int) i) <<
": ";
125 str << fancyAnalogString(adc[i]) << std::endl;
133 std::cout <<
"DriverException: " << ex.
what() << std::endl;
144 B15F::abort(
"Die Verbindung ist unterbrochen worden. Wurde ein Stecker gezogen? :D");
virtual call_t keypress(int &key) override
-
+
constexpr static int text_offset_x
Relativer Abstand des Textes zum linken Rahmen.
int width
width of view in terminal characters
uint8_t digitalRead0(void)
virtual const char * what() const
uint8_t readDipSwitch(void)
+
void delay_ms(uint16_t ms)
std::vector< call_t > calls
calls (function pointers) for different button actions in the view (if any)
static B15F & getInstance(void)
@@ -88,17 +89,20 @@ $(function() {
std::string label_close
Beschriftung für Button zum Schließen.
uint16_t analogRead(uint8_t channel)
virtual void repaint(void)
+volatile bool run_worker
Legt fest, ob die Schleife im worker() weiterhin fortgeführt werden soll. Bei false bricht die Schlei...
+virtual void worker(void)
Funktion, die vom Worker-Thread ausgeführt, um die Anzeige zu aktualisieren.
int close_offset_y
Relative Y Koordinate des Buttons zum Schließen im Window.
uint8_t digitalRead1(void)
int start_x
x offset (characters) in the terminal, used to center the window on repaint()
std::string text
Benachrichtigungstext dieser View.
int start_y
y offset (characters) in the terminal, used to center the window on repaint()
+std::thread t_worker
Worker-Thread.
constexpr static int KEY_ENT
Key value for the Enter key.
diff --git a/docs/html/view__monitor_8h_source.html b/docs/html/view__monitor_8h_source.html
index 9f22b05..624d78e 100644
--- a/docs/html/view__monitor_8h_source.html
+++ b/docs/html/view__monitor_8h_source.html
@@ -70,13 +70,17 @@ $(function() {
view_monitor.h
-
9 #include "../drv/b15f.h" 18 virtual call_t
keypress(
int& key)
override;
21 std::string fancyDigitalString(uint8_t& b);
22 std::string fancyAnalogString(uint16_t& v);
25 virtual void worker(
void);
26 volatile bool run_worker =
true;
31 #endif // VIEW_MONITOR_H
+ 9 #include "../drv/b15f.h" 29 virtual call_t
keypress(
int& key)
override;
37 std::string fancyDigitalString(uint8_t& b);
43 std::string fancyAnalogString(uint16_t& v);
52 #endif // VIEW_MONITOR_H
virtual call_t keypress(int &key) override
-
+
+
+volatile bool run_worker
Legt fest, ob die Schleife im worker() weiterhin fortgeführt werden soll. Bei false bricht die Schlei...
+virtual void worker(void)
Funktion, die vom Worker-Thread ausgeführt, um die Anzeige zu aktualisieren.
+std::thread t_worker
Worker-Thread.
diff --git a/docs/html/view__promt_8cpp_source.html b/docs/html/view__promt_8cpp_source.html
index d838c02..302a6d4 100644
--- a/docs/html/view__promt_8cpp_source.html
+++ b/docs/html/view__promt_8cpp_source.html
@@ -83,7 +83,7 @@ $(function() {
constexpr static int KEY_ENT
Key value for the Enter key.
diff --git a/docs/html/view__promt_8h_source.html b/docs/html/view__promt_8h_source.html
index c67bb83..f464d3a 100644
--- a/docs/html/view__promt_8h_source.html
+++ b/docs/html/view__promt_8h_source.html
@@ -77,7 +77,7 @@ $(function() {
virtual call_t keypress(int &key) override
diff --git a/docs/html/view__selection_8cpp_source.html b/docs/html/view__selection_8cpp_source.html
index b953db6..74092ac 100644
--- a/docs/html/view__selection_8cpp_source.html
+++ b/docs/html/view__selection_8cpp_source.html
@@ -81,7 +81,7 @@ $(function() {
constexpr static int KEY_ENT
Key value for the Enter key.
diff --git a/docs/html/view__selection_8h_source.html b/docs/html/view__selection_8h_source.html
index 06965d3..f6908e6 100644
--- a/docs/html/view__selection_8h_source.html
+++ b/docs/html/view__selection_8h_source.html
@@ -77,7 +77,7 @@ $(function() {
virtual void draw(void) override