• 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

Revision88d1a4650808569846ef3580cc0ec788a6519c51 (tree)
Time2018-03-01 23:47:23
Authortakemasa <suikan@user...>
Commitertakemasa

Log Message

Fixed DebuggFIFO timeout. Make doxygen comment better.

Change Summary

Incremental Difference

--- a/stm32_development/murasaki/murasaki/debugger.hpp
+++ b/stm32_development/murasaki/murasaki/debugger.hpp
@@ -33,6 +33,7 @@ namespace murasaki {
3333 * \li \ref PLATFORM_CONFIG_DEBUG_LINE_SIZE
3434 * \li \ref PLATFORM_CONFIG_DEBUG_TASK_STACK_SIZE
3535 * \li \ref PLATFORM_CONFIG_DEBUG_TASK_PRIORITY
36+ * \li @ref PLATFORM_CONFIG_DEBUG_SERIAL_TIMEOUT
3637 *
3738 * See \ref MURASAKI_PLATFORM_GROUP as example this class.
3839 *
--- a/stm32_development/murasaki/murasaki/debuggerfifo.cpp
+++ b/stm32_development/murasaki/murasaki/debuggerfifo.cpp
@@ -55,8 +55,9 @@ unsigned int DebuggerFifo::Get(uint8_t data[], unsigned int size)
5555 }
5656 taskEXIT_CRITICAL();
5757
58+ // wait for the arriaval of the data.
5859 if ( ret_val == 0)
59- sync_->WaitForSignalFromTask();
60+ sync_->WaitForSignalFromTask(static_cast<murasaki::WaitMilliSeconds>(1000 / portTICK_PERIOD_MS));
6061
6162 return ret_val;
6263
--- a/stm32_development/murasaki/murasaki/debuggerfifo.hpp
+++ b/stm32_development/murasaki/murasaki/debuggerfifo.hpp
@@ -1,8 +1,8 @@
1-/*
2- * debuggerfifo.hpp
1+/**
2+ * @file debuggerfifo.hpp
33 *
4- * Created on: 2018/03/01
5- * Author: takemasa
4+ * @date 2018/03/01
5+ * @author takemasa
66 */
77
88 #ifndef DEBUGGERFIFO_HPP_
@@ -10,9 +10,30 @@
1010
1111 #include <abstractfifo.hpp>
1212 #include "synchronizer.hpp"
13+#include "abstractlogger.hpp"
1314
1415 namespace murasaki {
15-
16+/**
17+ * @defgroup MURASAKI_HELPER_GROUP Helper classes
18+ * @brief Classes to support the murasaki-class.
19+ * @details
20+ * These classess are not used by customer.
21+ * @ingroup MURASAKI_GROUP
22+ */
23+/**
24+ * @brief FIFO with thread safe.
25+ * @details
26+ * Non blocking , thread safe FIFO
27+ *
28+ * The Put member function returns with "copied" data count.
29+ * If the internal buffer is full, it returns without copy data.
30+ * This is thread safe and ISR/Task bi-modal.
31+ *
32+ * The Get member funciton returns with "copied" data count and data.
33+ * If the internal buffer is empty, it returns without copy data.
34+ *
35+ * @ingroup MURASAKI_HELPER_GROUP
36+ */
1637 class DebuggerFifo : public AbstractFifo
1738 {
1839 public:
@@ -28,29 +49,41 @@ class DebuggerFifo : public AbstractFifo
2849 */
2950 virtual ~DebuggerFifo();
3051 /**
31- * @brief Put the data into the internal buffer.
52+ * @brief Put the data into the internal buffer.This is thread safe. Task/ISR bimodal.
3253 * @param data Data to be copied to the internal buffer
3354 * @param size Data count to be copied
3455 * @return The count of copied data. 0, if the internal buffer is full.
3556 */
3657 virtual unsigned int Put(uint8_t const data[], unsigned int size);
3758 /**
38- * @brief Get the data from the internal buffer.
59+ * @brief Get the data from the internal buffer. This is thread safe function. Do not call from ISR.
3960 * @param data Data buffer to receive from the internal buffer
4061 * @param size Size of the data parameter.
4162 * @return The count of copied data. 0, if the internal buffer is empty
4263 */
4364 virtual unsigned int Get(uint8_t data[], unsigned int size);
44- /*
45- * @brief Mark all the data inside the internal buffer as "not sent".
65+ /**
66+ * @brief Mark all the data inside the internal buffer as "not sent". Thread safe.
4667 */
4768 virtual void ReWind();
4869 private:
70+ // Alias to call the parent member function.
4971 typedef AbstractFifo inherited;
72+ // For the communication between generator / consumer.
5073 Synchronizer * const sync_;
5174
5275 };
5376
77+/**
78+ * @brief A stracture to engroup the logging tools.
79+ * @ingroup MURASAKI_HELPER_GROUP
80+ */
81+struct LoggingHelpers
82+{
83+ AbstractFifo * fifo;
84+ AbstractLogger * logger;
85+ ;
86+
5487 } /* namespace murasaki */
5588
5689 #endif /* DEBUGGERFIFO_HPP_ */