ConOpSys V2970  P004.07
ANVILEX control operating system
Protocol_PLUG_Over_UART.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Protocol_PLUG_Over_UART.h
3 //! @brief Dummy communication protocol over UART class header file.
4 //! @attention No special attention requered.
5 //! @copyright (C) 2015-2021 ANVILEX LLC
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Engine/Protocol_PLUG_Over_UART.h $
7 //! $Revision: 2826 $
8 //! $Date: 2021-07-28 13:46:37 +0500 (Mi, 28 Jul 2021) $
9 //! $Author: minch $
10 //------------------------------------------------------------------------------
11 //
12 // Redistribution and use in source and binary forms, with or without
13 // modification, are permitted provided that the following conditions are met:
14 //
15 // 1. Redistributions of source code must retain the above copyright notice,
16 // this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright notice,
19 // this list of conditions and the following disclaimer in the documentation
20 // and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of ANVILEX nor the names of its contributors may be
23 // used to endorse or promote products derived from this software without
24 // specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 // POSSIBILITY OF SUCH DAMAGE.
37 //
38 //------------------------------------------------------------------------------
39 
40 #pragma once
41 
42 //------------------------------------------------------------------------------
43 // Include system files
44 //------------------------------------------------------------------------------
45 
46 #include "Protocol_Base.h"
47 
48 //------------------------------------------------------------------------------
49 // Class definitions
50 //------------------------------------------------------------------------------
51 
52 //! @brief Dummy communication protocol over UART class implementation
54 {
55 
56  //----------------------------------------------------------------------------
57  // Public defines, methods and variables
58  //----------------------------------------------------------------------------
59 
60  public:
61 
62  //--------------------------------------------------------------------------
63  // Public methods
64  //--------------------------------------------------------------------------
65 
66  //!-------------------------------------------------------------------------
67  //! @brief Class constructor method.
68  //! @note None
69  //! \par Override
70  //! Not allowed
71  //! @attention Don't call this method directly.
72  //--------------------------------------------------------------------------
73 
75 
76  //!-------------------------------------------------------------------------
77  //! @brief Class destructor method.
78  //! @note None
79  //! \par Override
80  //! Not allowed
81  //! @attention Don't call this method directly.
82  //--------------------------------------------------------------------------
83 
85 
86  //!-------------------------------------------------------------------------
87  //! @brief Object initialisation method.
88  //! @note None
89  //! @return None
90  //! \par Override
91  //! Not allowed
92  //! @attention None
93  //--------------------------------------------------------------------------
94 
95  VOID Init();
96 
97  //!-------------------------------------------------------------------------
98  //! @brief PLUG protocol 1ms cyclic processing method.
99  //! @note None
100  //! @return None
101  //! \par Override
102  //! Not allowed
103  //! @attention None
104  //--------------------------------------------------------------------------
105 
106  virtual VOID Execute_1ms();
107 
108  //!-------------------------------------------------------------------------
109  //! @brief Protocol execution method.
110  //! @note None
111  //! @return None
112  //! \par Override
113  //! Not allowed
114  //! @attention None
115  //--------------------------------------------------------------------------
116 
117  virtual VOID Execute();
118 
119  //!-------------------------------------------------------------------------
120  //! @brief Method sends actual driver information over specified communication link protocol.
121  //! @note None
122  //! @param [in] *object_Protocol - Pointer to the connunication link protocol
123  //! @return None
124  //! \par Override
125  //! Not allowed
126  //! @attention None
127  //--------------------------------------------------------------------------
128 
129  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
130 
131  //!-------------------------------------------------------------------------
132  //! @brief Enter in terminal operation mode method.
133  //! @note None
134  //! @return None
135  //! \par Override
136  //! Not allowed
137  //! @attention None
138  //--------------------------------------------------------------------------
139 
140  virtual VOID Enter_Terminal_Mode();
141 
142  //!-------------------------------------------------------------------------
143  //! @brief Enter in protocol operation mode method.
144  //! @note None
145  //! @return None
146  //! \par Override
147  //! Not allowed
148  //! @attention None
149  //--------------------------------------------------------------------------
150 
151  virtual VOID Enter_Protocol_Mode();
152 
153  //!-------------------------------------------------------------------------
154  //! @brief Enable show system welcome message method.
155  //! @note None
156  //! @return None
157  //! \par Override
158  //! Not allowed
159  //! @attention None
160  //--------------------------------------------------------------------------
161 
163 
164  //!-------------------------------------------------------------------------
165  //! @brief Disable show system welcome message method.
166  //! @note None
167  //! @return None
168  //! \par Override
169  //! Not allowed
170  //! @attention None
171  //--------------------------------------------------------------------------
172 
174 
175  //!-------------------------------------------------------------------------
176  //! @brief Enable system ready message method.
177  //! @note None
178  //! @return None
179  //! \par Override
180  //! Not allowed
181  //! @attention None
182  //--------------------------------------------------------------------------
183 
185 
186  //!-------------------------------------------------------------------------
187  //! @brief Disable system ready message method.
188  //! @note None
189  //! @return None
190  //! \par Override
191  //! Not allowed
192  //! @attention None
193  //--------------------------------------------------------------------------
194 
196 
197  //!-------------------------------------------------------------------------
198  //! @brief Return terminal operation mode status method.
199  //! @note None
200  //! @return BOOL - Protocol operatuin mode status
201  //! @retval false - Non-terminal mode selected
202  //! @retval true - Terminal mode selected
203  //! \par Override
204  //! Not allowed
205  //! @attention None
206  //--------------------------------------------------------------------------
207 
208  virtual BOOL Is_Terminal_Mode();
209 
210  //!-------------------------------------------------------------------------
211  //! @brief Return protocol operatuin mode status method.
212  //! @note None
213  //! @return BOOL - Protocol operatuin mode status
214  //! @retval false - Non-protocol mode selected
215  //! @retval true - Protocol mode selected
216  //! \par Override
217  //! Not allowed
218  //! @attention None
219  //--------------------------------------------------------------------------
220 
221  virtual BOOL Is_Protocol_Mode();
222 
223  //!-------------------------------------------------------------------------
224  //! @brief Communication data receive method
225  //! @note None
226  //! @param [in] u8_Receive_Value - Received value
227  //! @return None
228  //! \par Override
229  //! Requered
230  //! @attention None
231  //--------------------------------------------------------------------------
232 
233  virtual VOID Communication_Data_Receive( U8 u8_Receive_Value );
234 
235  //!-------------------------------------------------------------------------
236  //! @brief Communication data receive method
237  //! @note None
238  //! @param [in] void_Receive_Data - Pointer on received data
239  //! @return None
240  //! \par Override
241  //! Requered
242  //! @attention None
243  //--------------------------------------------------------------------------
244 
245  virtual VOID Communication_Data_Receive( VOID *void_Receive_Data );
246 
247  //!-------------------------------------------------------------------------
248  //! @brief Receiveed string processing method
249  //! @note None
250  //! @param [in] *c8_String - Pointer to the null terminated string
251  //! @return None
252  //! \par Override
253  //! Not allowed
254  //! @attention This method called from interrupt
255  //--------------------------------------------------------------------------
256 
257  virtual VOID Receive_String( C8 *c8_String );
258 
259  //!-------------------------------------------------------------------------
260  //! @brief Receiveed string processing method
261  //! @note This method is not used in this object.
262  //! @param [in] *c8_String - Pointer to the null terminated string
263  //! @param [in] u32_Length - Length of the string
264  //! @return None
265  //! \par Override
266  //! Not allowed
267  //! @attention This method called from interrupt
268  //--------------------------------------------------------------------------
269 
270  virtual VOID Receive_String( C8 *c8_String, U32 u32_Length );
271 
272  //!-------------------------------------------------------------------------
273  //! @brief Transmit boot welcome message method
274  //! @note None
275  //! @return None
276  //! \par Override
277  //! Not allowed
278  //! @attention This method called from interrupt
279  //--------------------------------------------------------------------------
280 
282 
283  //!-------------------------------------------------------------------------
284  //! @brief Transmit boot ready message method.
285  //! @note None
286  //! @return None
287  //! \par Override
288  //! Not allowed
289  //! @attention None
290  //--------------------------------------------------------------------------
291 
293 
294  //----------------------------------------------------------------------------
295  // Protected defines, methods and variables
296  //----------------------------------------------------------------------------
297 
298  protected:
299 
300  //----------------------------------------------------------------------------
301  // Private defines, methods and variables
302  //----------------------------------------------------------------------------
303 
304  private:
305 
306 };
307 
308 //------------------------------------------------------------------------------
309 // End of file
310 //------------------------------------------------------------------------------
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
unsigned char U8
Binary 8-Bit unsigned integer datatype defenition.
Definition: Defines.h:183
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
char C8
ASCII 8-Bit char datatype defenition.
Definition: Defines.h:156
Communication protocol base class header file.
Definition: Protocol_Base.h:57
Dummy communication protocol over UART class implementation.
Definition: Protocol_PLUG_Over_UART.h:54
virtual VOID Receive_String(C8 *c8_String)
Receiveed string processing method.
Definition: Protocol_PLUG_Over_UART.cpp:195
TProtocol_PLUG_Over_UART()
Class constructor method.
Definition: Protocol_PLUG_Over_UART.cpp:54
VOID Show_System_Ready_Message_Enable()
Enable system ready message method.
Definition: Protocol_PLUG_Over_UART.cpp:150
virtual VOID Execute_1ms()
PLUG protocol 1ms cyclic processing method.
Definition: Protocol_PLUG_Over_UART.cpp:239
virtual VOID Execute()
Protocol execution method.
Definition: Protocol_PLUG_Over_UART.cpp:247
virtual VOID Communication_Data_Receive(U8 u8_Receive_Value)
Communication data receive method.
Definition: Protocol_PLUG_Over_UART.cpp:173
~TProtocol_PLUG_Over_UART()
Class destructor method.
Definition: Protocol_PLUG_Over_UART.cpp:62
VOID Init()
Object initialisation method.
Definition: Protocol_PLUG_Over_UART.cpp:70
virtual VOID Enter_Terminal_Mode()
Enter in terminal operation mode method.
Definition: Protocol_PLUG_Over_UART.cpp:82
VOID Transmit_System_Ready_Message()
Transmit boot ready message method.
Definition: Protocol_PLUG_Over_UART.cpp:228
VOID Transmit_Boot_Welcome_Message()
Transmit boot welcome message method.
Definition: Protocol_PLUG_Over_UART.cpp:217
VOID Show_System_Welcome_Message_Disable()
Disable show system welcome message method.
Definition: Protocol_PLUG_Over_UART.cpp:139
virtual BOOL Is_Terminal_Mode()
Return terminal operation mode status method.
Definition: Protocol_PLUG_Over_UART.cpp:104
virtual BOOL Is_Protocol_Mode()
Return protocol operatuin mode status method.
Definition: Protocol_PLUG_Over_UART.cpp:116
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Method sends actual driver information over specified communication link protocol.
Definition: Protocol_PLUG_Over_UART.cpp:255
virtual VOID Enter_Protocol_Mode()
Enter in protocol operation mode method.
Definition: Protocol_PLUG_Over_UART.cpp:93
VOID Show_System_Ready_Message_Disable()
Disable system ready message method.
Definition: Protocol_PLUG_Over_UART.cpp:161
VOID Show_System_Welcome_Message_Enable()
Enable show system welcome message method.
Definition: Protocol_PLUG_Over_UART.cpp:128