• 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

テスト用のあれこれ共用フォルダ


Commit MetaInfo

Revision08e08da601f41867921e53c5728818a0c56f01c5 (tree)
Time2019-02-04 18:42:39
Authortakemasa <suikan@user...>
Commitertakemasa

Log Message

Refactoring the name of the class

Change Summary

Incremental Difference

--- a/stm32_development/murasaki/Inc/platform_defs.hpp
+++ b/stm32_development/murasaki/Inc/platform_defs.hpp
@@ -82,12 +82,12 @@ struct Platform
8282 UartStrategy * uart_console; ///< UART wrapping class object for debugging
8383 AbstractLogger * logger; ///< logging class object for debugger
8484
85- AbstractBitOut * led; ///< GP out under test
85+ BitOutStrategy * led; ///< GP out under test
8686 UartStrategy * uart; ///< UART under test
8787 AbstractSpiMaster * spiMaster; ///< SPI Master under test
8888 AbstractSpiSlave * spiSlave; ///< SPI Slave under test
89- AbstractI2CMaster * i2cMaster; ///< I2C Master under test
90- AbstractI2cSlave * i2cSlave; ///< I2C Slave under test
89+ I2CMasterStrategy * i2cMaster; ///< I2C Master under test
90+ I2cSlaveStrategy * i2cSlave; ///< I2C Slave under test
9191
9292 TaskStrategy * task1; ///< Task under test
9393
--- a/stm32_development/murasaki/murasaki-tp/adau1361.cpp
+++ b/stm32_development/murasaki/murasaki-tp/adau1361.cpp
@@ -13,9 +13,9 @@
1313 #ifdef HAL_I2C_MODULE_ENABLED
1414
1515 namespace murasaki {
16-Adau1361::Adau1361(unsigned int fs, murasaki::AbstractI2CMaster * controler,
16+Adau1361::Adau1361(unsigned int fs, murasaki::I2CMasterStrategy * controler,
1717 unsigned int i2c_device_addr) :
18- AbstractAudioCodec(fs), i2c_(controler), device_addr_(i2c_device_addr) {
18+ AudioCodecStrategy(fs), i2c_(controler), device_addr_(i2c_device_addr) {
1919 }
2020
2121
--- a/stm32_development/murasaki/murasaki-tp/adau1361.hpp
+++ b/stm32_development/murasaki/murasaki-tp/adau1361.hpp
@@ -8,9 +8,9 @@
88 #ifndef MURASAKI_TP_ADAU1361_HPP_
99 #define MURASAKI_TP_ADAU1361_HPP_
1010
11+#include <audiocodecstrategy.hpp>
1112 #include "i2cmaster.hpp"
1213
13-#include <abstractaudiocodec.hpp>
1414
1515 #ifdef HAL_I2C_MODULE_ENABLED
1616
@@ -25,7 +25,7 @@ namespace murasaki {
2525 * \brief Audio Codec LSI class
2626 */
2727
28-class Adau1361: public AbstractAudioCodec {
28+class Adau1361: public AudioCodecStrategy {
2929 public:
3030 /**
3131 * \brief constructor.
@@ -35,7 +35,7 @@ public:
3535 * \details
3636 * initialize the internal variables.
3737 */
38- Adau1361(unsigned int fs, murasaki::AbstractI2CMaster * controler,
38+ Adau1361(unsigned int fs, murasaki::I2CMasterStrategy * controler,
3939 unsigned int i2c_device_addr);
4040
4141 /**
@@ -99,7 +99,7 @@ public:
9999 bool mute = false);
100100
101101 protected:
102- murasaki::AbstractI2CMaster * const i2c_;
102+ murasaki::I2CMasterStrategy * const i2c_;
103103 const unsigned int device_addr_;
104104
105105 /**
--- a/stm32_development/murasaki/murasaki-tp/umbadau1361.hpp
+++ b/stm32_development/murasaki/murasaki-tp/umbadau1361.hpp
@@ -24,7 +24,7 @@ public:
2424 * \details
2525 * initialize the internal variables.
2626 */
27- UmbAdau1361(unsigned int fs, murasaki::AbstractI2CMaster * controler,
27+ UmbAdau1361(unsigned int fs, murasaki::I2CMasterStrategy * controler,
2828 unsigned int addr) :
2929 Adau1361( fs, controler, addr ) {};
3030 protected:
--- a/stm32_development/murasaki/murasaki/abstractaudiocodec.hpp
+++ b/stm32_development/murasaki/murasaki/audiocodecstrategy.hpp
@@ -1,5 +1,5 @@
11 /**
2- * @file abstractaudiocodec.hpp
2+ * @file audiocodecstrategy.hpp
33 *
44 * @date 2018/05/11
55 * @author: takemasa
@@ -16,7 +16,7 @@ namespace murasaki {
1616 * \details
1717 * This class is template for all codec classes
1818 */
19-class AbstractAudioCodec
19+class AudioCodecStrategy
2020 {
2121 public:
2222 /**
@@ -25,8 +25,8 @@ public:
2525 * \details
2626 * initialize the internal variables.
2727 */
28- AbstractAudioCodec( unsigned int fs ):fs_(fs){};
29- virtual ~AbstractAudioCodec(){};
28+ AudioCodecStrategy( unsigned int fs ):fs_(fs){};
29+ virtual ~AudioCodecStrategy(){};
3030
3131 /**
3232 * \brief Actual initializer.
--- a/stm32_development/murasaki/murasaki/bitin.hpp
+++ b/stm32_development/murasaki/murasaki/bitin.hpp
@@ -8,7 +8,7 @@
88 #ifndef BITIN_HPP_
99 #define BITIN_HPP_
1010
11-#include <abstractbitin.hpp>
11+#include <bitinstrategy.hpp>
1212 #include "bitout.hpp"
1313
1414 #ifdef HAL_GPIO_MODULE_ENABLED
@@ -27,7 +27,7 @@ namespace murasaki {
2727 * the GPIO peripheral have to be configured to be right direction.
2828 */
2929
30-class BitIn: public AbstractBitIn {
30+class BitIn: public BitInStrategy {
3131 public:
3232 /**
3333 * @brief Constructor
--- a/stm32_development/murasaki/murasaki/abstractbitin.hpp
+++ b/stm32_development/murasaki/murasaki/bitinstrategy.hpp
@@ -1,12 +1,12 @@
11 /**
2- * @file abstractbitin.hpp
2+ * @file bitinstrategy.hpp
33 *
44 * @date 2018/05/07
55 * @author takemasa
66 */
77
8-#ifndef ABSTRACTBITIN_HPP_
9-#define ABSTRACTBITIN_HPP_
8+#ifndef BITINSTRATEGY_HPP_
9+#define BITINSTRATEGY_HPP_
1010
1111 #include <peripheralstrategy.hpp>
1212
@@ -18,7 +18,7 @@ namespace murasaki {
1818 * A prototype of the general purpose bit input class
1919 *
2020 */
21-class AbstractBitIn: public PeripheralStrategy {
21+class BitInStrategy: public PeripheralStrategy {
2222 public:
2323 /**
2424 * @brief Get a status of the input pin
@@ -33,4 +33,4 @@ class AbstractBitIn: public PeripheralStrategy {
3333
3434 } /* namespace murasaki */
3535
36-#endif /* ABSTRACTBITIN_HPP_ */
36+#endif /* BITINSTRATEGY_HPP_ */
--- a/stm32_development/murasaki/murasaki/bitout.hpp
+++ b/stm32_development/murasaki/murasaki/bitout.hpp
@@ -8,7 +8,7 @@
88 #ifndef BITOUT_HPP_
99 #define BITOUT_HPP_
1010
11-#include <abstractbitout.hpp>
11+#include <bitoutstrategy.hpp>
1212
1313 #ifdef HAL_GPIO_MODULE_ENABLED
1414
@@ -42,7 +42,7 @@ struct GPIO_type {
4242 * the GPIO peripheral have to be configured to be right direction.
4343 */
4444
45-class BitOut: public AbstractBitOut {
45+class BitOut: public BitOutStrategy {
4646 public:
4747 /**
4848 * @brief Constructor
--- a/stm32_development/murasaki/murasaki/abstractbitout.hpp
+++ b/stm32_development/murasaki/murasaki/bitoutstrategy.hpp
@@ -1,12 +1,12 @@
11 /**
2- * @file abstractbitout.hpp
2+ * @file bitoutstrategy.hpp
33 *
44 * @date 2018/05/07
55 * @author takemasa
66 */
77
8-#ifndef ABSTRACTBITOUT_HPP_
9-#define ABSTRACTBITOUT_HPP_
8+#ifndef BITOUTSTRATEGY_HPP_
9+#define BITOUTSTRATEGY_HPP_
1010
1111 #include <peripheralstrategy.hpp>
1212
@@ -19,7 +19,7 @@ namespace murasaki {
1919 *
2020 */
2121
22-class AbstractBitOut: public PeripheralStrategy {
22+class BitOutStrategy: public PeripheralStrategy {
2323 public:
2424 /**
2525 * @brief Set a status of the output pin
@@ -48,4 +48,4 @@ public:
4848
4949 } /* namespace murasaki */
5050
51-#endif /* ABSTRACTBITOUT_HPP_ */
51+#endif /* BITOUTSTRATEGY_HPP_ */
--- a/stm32_development/murasaki/murasaki/debuggerfifo.cpp
+++ b/stm32_development/murasaki/murasaki/debuggerfifo.cpp
@@ -18,7 +18,7 @@ namespace murasaki {
1818
1919
2020 DebuggerFifo::DebuggerFifo(unsigned int buffer_size)
21- : AbstractFifo(buffer_size),
21+ : FifoStrategy(buffer_size),
2222 sync_(new Synchronizer())
2323 {
2424 MURASAKI_ASSERT(sync_ != nullptr);
--- a/stm32_development/murasaki/murasaki/debuggerfifo.hpp
+++ b/stm32_development/murasaki/murasaki/debuggerfifo.hpp
@@ -8,7 +8,7 @@
88 #ifndef DEBUGGERFIFO_HPP_
99 #define DEBUGGERFIFO_HPP_
1010
11-#include <abstractfifo.hpp>
11+#include <fifostrategy.hpp>
1212 #include "synchronizer.hpp"
1313 #include "abstractlogger.hpp"
1414
@@ -34,7 +34,7 @@ namespace murasaki {
3434 *
3535 * @ingroup MURASAKI_HELPER_GROUP
3636 */
37-class DebuggerFifo : public AbstractFifo
37+class DebuggerFifo : public FifoStrategy
3838 {
3939 public:
4040 /**
@@ -74,7 +74,7 @@ class DebuggerFifo : public AbstractFifo
7474 virtual void SetPostMortem();
7575 private:
7676 // Alias to call the parent member function.
77- typedef AbstractFifo inherited;
77+ typedef FifoStrategy inherited;
7878 // For the communication between generator / consumer.
7979 Synchronizer * const sync_;
8080 bool post_mortem_;
--- a/stm32_development/murasaki/murasaki/abstractfifo.cpp
+++ b/stm32_development/murasaki/murasaki/fifostrategy.cpp
@@ -1,18 +1,18 @@
11 /*
2- * basefifo.cpp
2+ * fifostrategy.cpp
33 *
44 * Created on: 2018/02/26
55 * Author: takemasa
66 */
77
8-#include <abstractfifo.hpp>
8+#include <fifostrategy.hpp>
99 #include <murasaki_assert.hpp>
1010 #include <algorithm>
1111 #include <string.h>
1212
1313 namespace murasaki {
1414
15-AbstractFifo::AbstractFifo(unsigned int buffer_size):
15+FifoStrategy::FifoStrategy(unsigned int buffer_size):
1616 size_of_buffer_(buffer_size),
1717 buffer_(new uint8_t[size_of_buffer_])
1818 {
@@ -24,13 +24,13 @@ AbstractFifo::AbstractFifo(unsigned int buffer_size):
2424 }
2525
2626
27-AbstractFifo::~AbstractFifo()
27+FifoStrategy::~FifoStrategy()
2828 {
2929 if (buffer_ != nullptr)
3030 delete[] buffer_;
3131 }
3232
33-unsigned int AbstractFifo::Put(uint8_t const data[], unsigned int size)
33+unsigned int FifoStrategy::Put(uint8_t const data[], unsigned int size)
3434 {
3535 unsigned int avairable;
3636
@@ -67,7 +67,7 @@ unsigned int AbstractFifo::Put(uint8_t const data[], unsigned int size)
6767
6868 }
6969
70-unsigned int AbstractFifo::Get(uint8_t data[], unsigned int size)
70+unsigned int FifoStrategy::Get(uint8_t data[], unsigned int size)
7171 {
7272 unsigned int copy_size = 0;
7373
@@ -98,7 +98,7 @@ unsigned int AbstractFifo::Get(uint8_t data[], unsigned int size)
9898 return copy_size;
9999 }
100100
101-void AbstractFifo::ReWind()
101+void FifoStrategy::ReWind()
102102 {
103103 // by setting tail as head+1, the entire buffer is marked as "not sent"
104104 tail_ = head_ + 1;
--- a/stm32_development/murasaki/murasaki/abstractfifo.hpp
+++ b/stm32_development/murasaki/murasaki/fifostrategy.hpp
@@ -1,12 +1,12 @@
11 /**
2- * @file abstractfifo.hpp
2+ * @file fifostrategy.hpp
33 *
44 * @date 2018/02/26
55 * @author takemasa
66 */
77
8-#ifndef ABSTRACTFIFO_HPP_
9-#define ABSTRACTFIFO_HPP_
8+#ifndef FIFOSTRATEGY_HPP_
9+#define FIFOSTRATEGY_HPP_
1010
1111 #include <ctype.h>
1212 #include <cinttypes>
@@ -25,10 +25,10 @@ namespace murasaki {
2525 * If the internal buffer is empty, it returns without copy data.
2626 * @ingroup MURASAKI_ABSTRACT_GROUP
2727 */
28-class AbstractFifo
28+class FifoStrategy
2929 {
3030 public:
31- AbstractFifo() = delete;
31+ FifoStrategy() = delete;
3232 /**
3333 * @brief Create an internal buffer
3434 * @param buffer_size Size of the internal buffer to be allocated [byte]
@@ -36,11 +36,11 @@ class AbstractFifo
3636 * Allocate the internal buffer with given buffer_size.
3737 * The contents is not initialized.
3838 */
39- AbstractFifo(unsigned int buffer_size);
39+ FifoStrategy(unsigned int buffer_size);
4040 /**
4141 * @brief Delete an internal buffer
4242 */
43- virtual ~AbstractFifo();
43+ virtual ~FifoStrategy();
4444 /**
4545 * @brief Put the data into the internal buffer.
4646 * @param data Data to be copied to the internal buffer
@@ -85,4 +85,4 @@ class AbstractFifo
8585
8686 } /* namespace murasaki */
8787
88-#endif /* ABSTRACTFIFO_HPP_ */
88+#endif /* FIFOSTRATEGY_HPP_ */
--- a/stm32_development/murasaki/murasaki/i2cmaster.hpp
+++ b/stm32_development/murasaki/murasaki/i2cmaster.hpp
@@ -9,7 +9,7 @@
99 #ifndef I2CMASTER_HPP_
1010 #define I2CMASTER_HPP_
1111
12-#include <abstracti2cmaster.hpp>
12+#include <i2cmasterstrategy.hpp>
1313 #include <synchronizer.hpp>
1414 #include "criticalsection.hpp"
1515
@@ -78,7 +78,7 @@ namespace murasaki {
7878 * According to the source code of the HAL_I2C_MASTER_ABORT_IT(), no interrupt will be
7979 * raised by this API call.
8080 */
81-class I2cMaster : public AbstractI2CMaster
81+class I2cMaster : public I2CMasterStrategy
8282 {
8383 public:
8484 /**
--- a/stm32_development/murasaki/murasaki/abstracti2cmaster.hpp
+++ b/stm32_development/murasaki/murasaki/i2cmasterstrategy.hpp
@@ -1,13 +1,13 @@
11 /**
2- * \file abstracti2cmaster.hpp
2+ * \file i2cmasterstrategy.hpp
33 *
44 * \date 2018/02/11
55 * \author: takemasa
66 * \brief Root class definition of the I2C Master.
77 */
88
9-#ifndef ABSTRACTI2CMASTER_HPP_
10-#define ABSTRACTI2CMASTER_HPP_
9+#ifndef I2CMASTERSTRATEGY_HPP_
10+#define I2CMASTERSTRATEGY_HPP_
1111
1212 #include <peripheralstrategy.hpp>
1313
@@ -27,7 +27,7 @@ namespace murasaki {
2727 * Transmit/Receive.
2828 */
2929
30-class AbstractI2CMaster : murasaki::PeripheralStrategy
30+class I2CMasterStrategy : murasaki::PeripheralStrategy
3131 {
3232 public:
3333
@@ -134,4 +134,4 @@ class AbstractI2CMaster : murasaki::PeripheralStrategy
134134
135135 } /* namespace murasaki */
136136
137-#endif /* ABSTRACTI2CMASTER_HPP_ */
137+#endif /* I2CMASTERSTRATEGY_HPP_ */
--- a/stm32_development/murasaki/murasaki/i2cslave.hpp
+++ b/stm32_development/murasaki/murasaki/i2cslave.hpp
@@ -10,7 +10,7 @@
1010 #ifndef I2CSLAVE_HPP_
1111 #define I2CSLAVE_HPP_
1212
13-#include <abstracti2cslave.hpp>
13+#include <i2cslavestrategy.hpp>
1414 #include <synchronizer.hpp>
1515 #include "criticalsection.hpp"
1616
@@ -80,7 +80,7 @@ namespace murasaki {
8080 *
8181
8282 */
83-class I2cSlave : public AbstractI2cSlave {
83+class I2cSlave : public I2cSlaveStrategy {
8484 public:
8585 I2cSlave(I2C_HandleTypeDef * i2c_handle);
8686 virtual ~I2cSlave();
--- a/stm32_development/murasaki/murasaki/abstracti2cslave.hpp
+++ b/stm32_development/murasaki/murasaki/i2cslavestrategy.hpp
@@ -1,13 +1,13 @@
11 /**
2- * @file abstracti2cslave.hpp
2+ * @file i2cslavestrategy.hpp
33 *
44 * @date 2018/10/07
55 * @author takemasa
66 * \brief Root class definition of the I2C Slave.
77 */
88
9-#ifndef ABSTRACTI2CSLAVE_HPP_
10-#define ABSTRACTI2CSLAVE_HPP_
9+#ifndef I2CSLAVESTRATEGY_HPP_
10+#define I2CSLAVESTRATEGY_HPP_
1111
1212 #include <peripheralstrategy.hpp>
1313
@@ -25,7 +25,7 @@ namespace murasaki {
2525 * Two call back member functions are prepared to sync with the interrupt which tells the end of
2626 * Transmit/Receive.
2727 */
28-class AbstractI2cSlave : public murasaki::PeripheralStrategy {
28+class I2cSlaveStrategy : public murasaki::PeripheralStrategy {
2929 public:
3030 /**
3131 * @brief Thread safe, blocking transmission over I2C.
@@ -98,4 +98,4 @@ class AbstractI2cSlave : public murasaki::PeripheralStrategy {
9898
9999 } // namespace
100100
101-#endif /* ABSTRACTI2CSLAVE_HPP_ */
101+#endif /* I2CSLAVESTRATEGY_HPP_ */
--- a/stm32_development/murasaki/murasaki/murasaki.hpp
+++ b/stm32_development/murasaki/murasaki/murasaki.hpp
@@ -26,6 +26,7 @@
2626
2727 // Include HAL to refer from submodules of murasaki.
2828 #include <debugger.hpp>
29+#include <fifostrategy.hpp>
2930 #include <taskstrategy.hpp>
3031
3132 // Configurations
@@ -33,7 +34,6 @@
3334 #include "murasaki_defs.hpp"
3435
3536 // Task and Stack
36-#include "abstractfifo.hpp"
3737 #include "task.hpp"
3838
3939 // Peripherals