• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

shared_fooの不要ディレクトリ削除前のもの


Commit MetaInfo

Revision0d27bd7e9d503836bcac88e05e8acf5d7e46acc5 (tree)
Time2018-03-02 08:23:42
Authortakemasa <suikan@user...>
Commitertakemasa

Log Message

Added DebuggerAutoRePrintTask

Change Summary

Incremental Difference

--- /dev/null
+++ b/stm32_development/murasaki/murasaki/debuggerautoreprinttask.cpp
@@ -0,0 +1,44 @@
1+/*
2+ * debuggerautoreprinttask.cpp
3+ *
4+ * Created on: 2018/03/02
5+ * Author: takemasa
6+ */
7+
8+#include <debuggerautoreprinttask.hpp>
9+#include "debuggerfifo.hpp"
10+#include "murasaki_assert.hpp"
11+
12+namespace murasaki {
13+
14+DebuggerAutoRePrintTask::DebuggerAutoRePrintTask(const char * task_name,
15+ unsigned short stack_depth,
16+ void * task_parameter,
17+ UBaseType_t task_priority)
18+ // Forward initialization parameter to the parent class
19+ : AbstractTask(task_name, stack_depth, task_parameter, task_priority)
20+{
21+ // Do nothing
22+}
23+
24+// Watch the logger and trigger the rewind.
25+void DebuggerAutoRePrintTask::TaskBody(void* ptr)
26+{
27+ MURASAKI_ASSERT(ptr != nullptr);
28+
29+ // ptr is regarded as pointer to the LoggingHelpers
30+ // This struct contains the logger and fifo.
31+ murasaki::LoggingHelpers * const helpers = static_cast<murasaki::LoggingHelpers * const >(ptr);
32+
33+ while (true) {
34+ // Any character?
35+ helpers->logger->getCharacter();
36+
37+ // Then rewind.
38+ helpers->fifo->ReWind();
39+ }
40+
41+}
42+
43+
44+} /* namespace murasaki */
--- /dev/null
+++ b/stm32_development/murasaki/murasaki/debuggerautoreprinttask.hpp
@@ -0,0 +1,57 @@
1+/**
2+ * @file debuggerautoreprinttask.hpp
3+ *
4+ * @date 2018/03/02
5+ * @author takemasa
6+ */
7+
8+#ifndef DEBUGGERAUTOREPRINTTASK_HPP_
9+#define DEBUGGERAUTOREPRINTTASK_HPP_
10+
11+#include <abstracttask.hpp>
12+
13+namespace murasaki {
14+/**
15+ * @brief Watching task for auto re-print
16+ * @details
17+ * Dedicated task for the murasaki::Debugger.
18+ *
19+ * Watches logger input. If any character is received, call the AbstractFifo::ReWind().
20+ * So, from the view point of user, typing any key to re-print the data on screen.
21+ *
22+ * @ingroup MURASAKI_HELPER_GROUP
23+ */
24+
25+class DebuggerAutoRePrintTask : public AbstractTask
26+{
27+ public:
28+ /**
29+ * @brief Constractor. Task entity is not created here.
30+ * @param task_name Name of task. Will be passed to task when started.
31+ * @param stack_depth [Byte]
32+ * @param task_parameter The pointer to the murasaki::LoggingHelpers type variable.
33+ * @param task_priority Priority of the task. from 1 to up to configMAX_PRIORITIES -1. The high number is the high priority.
34+ * @details
35+ * The task implementation of the auto reprint task.
36+ * This task is dedicated to the murasaki::Debugger.
37+ *
38+ * Basically, this task should have higher prority than other task in the system.
39+ * Otherwise, the debug message will be kept waiting until higher priority task yields.
40+ * This is up side down.
41+ */
42+ DebuggerAutoRePrintTask(const char * task_name,
43+ unsigned short stack_depth,
44+ void * task_parameter,
45+ UBaseType_t task_priority);
46+ private:
47+ /**
48+ * @brief Watch the character input then ReWind FIFO
49+ * @param ptr The pointer to the murasaki::LoggingHelpers type variable.
50+ *
51+ */
52+ virtual void TaskBody(void * ptr);
53+};
54+
55+} /* namespace murasaki */
56+
57+#endif /* DEBUGGERAUTOREPRINTTASK_HPP_ */
--- a/stm32_development/murasaki/murasaki/debuggertxtask.hpp
+++ b/stm32_development/murasaki/murasaki/debuggertxtask.hpp
@@ -12,7 +12,7 @@
1212
1313 namespace murasaki {
1414 /**
15- * @brief A mother of all tasks.
15+ * @brief Copy task from FIFO to logger
1616 * @details
1717 * Dedicated task for the murasaki::Debugger.
1818 *