mFrame
載入中...
搜尋中...
無符合項目
SerialPortInputStream.h
1
8#ifndef HAL_DB068A0B_C322_4F94_95C6_77512B353910
9#define HAL_DB068A0B_C322_4F94_95C6_77512B353910
10
11/* ***************************************************************************************
12 * Include
13 */
14
15//----------------------------------------------------------------------------------------
16#include "mframe.h"
17
18//----------------------------------------------------------------------------------------
19#include "./../serial/UART.h"
20
21/* ***************************************************************************************
22 * Namespace
23 */
24namespace hal::serial {
25 class SerialPortInputStream;
26} // namespace hal::serial
27
28/* ***************************************************************************************
29 * Class/Interface/Struct/Enum
30 */
31
38 /* *************************************************************************************
39 * Variable
40 */
41
42 private:
43 hal::serial::UART& vBase;
44
45 /* *************************************************************************************
46 * Abstract Method
47 */
48
49 /* *************************************************************************************
50 * Construct Method
51 */
52 public:
59
64 virtual ~SerialPortInputStream(void) override;
65
66 /* *************************************************************************************
67 * Operator Method
68 */
69
70 /* *************************************************************************************
71 * Public Method <Override> - mframe::io::SimpleInputStream
72 */
73 public:
74 virtual bool abortRead(void) override;
75
76 virtual bool read(mframe::lang::Appendable& appendable,
77 void* attachment,
78 mframe::io::CompletionHandler<int>* handler) override;
79
80 /* *************************************************************************************
81 * Public Method <Override> - hal::serial::UARTEventReceiver
82 */
83 public:
84 virtual bool onReceiver(const uint8 data) override;
85
86 /* *************************************************************************************
87 * Public Method
88 */
89
90 /* *************************************************************************************
91 * Protected Method
92 */
93
94 /* *************************************************************************************
95 * Private Method
96 */
97
98 /* *************************************************************************************
99 * Static Variable
100 */
101
102 /* *************************************************************************************
103 * Static Method
104 */
105};
106
107/* ***************************************************************************************
108 * End of file
109 */
110
111#endif /* HAL_DB068A0B_C322_4F94_95C6_77512B353910 */
序列埠輸入串流。
Definition SerialPortInputStream.h:37
SerialPortInputStream(hal::serial::UART &base)
Construct a new Serial Port Input Stream object.
virtual bool read(mframe::lang::Appendable &appendable, void *attachment, mframe::io::CompletionHandler< int > *handler) override
非同步讀取。從輸入串流中讀取一些字節數,並將他們存到寫入緩衝區writeBuffer。
virtual bool onReceiver(const uint8 data) override
接收緩衝滿事件。
virtual ~SerialPortInputStream(void) override
Destroy the Serial Port Input Stream object.
virtual bool abortRead(void) override
Definition SimpleInputStream.h:33
Definition IIC.h:25
Definition UARTEventReceiver.h:29
[Interface]硬體抽象層,同步非同步收發器。
Definition UART.h:36
Definition CompletionHandler.h:32
可附加的 <Interface>
Definition Appendable.h:36