ConOpSys V2970  P004.07
ANVILEX control operating system
Bootloader_Base.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Bootloader_Base.h
3 //! @brief Bootloader base class header file.
4 //! @attention No special attention requered.
5 //! @copyright (C) 2015-2020 ANVILEX LLC
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Engine/Application/Application_Base.h $
7 //! $Revision: 2765 $
8 //! $Date: 2021-07-04 04:32:25 +0500 (So, 04 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 // System includes
44 //------------------------------------------------------------------------------
45 
46 #include "System_Resource.h"
47 
48 //!-----------------------------------------------------------------------------
49 //! @brief Bootloader base class
50 //!
51 //! With this class, following functions can be done:
52 //! - Register application commands
53 //! - Register application parameters
54 //------------------------------------------------------------------------------
55 
57 {
58 
59  //----------------------------------------------------------------------------
60  // Public defines, methods and variables
61  //----------------------------------------------------------------------------
62 
63  public:
64 
65  //!-------------------------------------------------------------------------
66  //! @brief Class constructor method
67  //! @note The method create application object.
68  //! @return None
69  //! \par Override
70  //! Not allowed
71  //! @attention Don't call this method directly.
72  //--------------------------------------------------------------------------
73 
75 
76  //!-------------------------------------------------------------------------
77  //! @brief Application destructor method
78  //! @note The method destroys application object.
79  //! @return None
80  //! \par Override
81  //! Not allowed
82  //! @attention Don't call this method directly.
83  //--------------------------------------------------------------------------
84 
86 
87  //!-------------------------------------------------------------------------
88  //! @brief Application initialisation method
89  //! @note The method initialise hardware and system objects.
90  //! @return None
91  //! \par Override
92  //! Allowed
93  //! @attention Don't call this method directly.
94  //--------------------------------------------------------------------------
95 
96  VOID Init();
97 
98  //!-------------------------------------------------------------------------
99  //! @brief Application run method
100  //! @note The method runs main system functionality.
101  //! @return None
102  //! \par Override
103  //! Allowed
104  //! @attention Don't call this method directly.
105  //--------------------------------------------------------------------------
106 
107  VOID Run();
108 
109  //!-------------------------------------------------------------------------
110  //! @brief Application finalisation method
111  //! @note The method prepare hardware and system objects for the system shutdown.
112  //! @return None
113  //! \par Override
114  //! Allowed
115  //! @attention Don't call this method directly.
116  //--------------------------------------------------------------------------
117 
118  VOID Done();
119 
120  //!-------------------------------------------------------------------------
121  //! @brief Set bootloader shutdown request method
122  //! @note The method set bootloader shutdown request.
123  //! @return BOOL - Bootloader shutdown request status
124  //! @retval false - Bootloader shutdown not requested
125  //! @retval true - Bootloader shutdown requested
126  //! \par Override
127  //! Not allowed
128  //! @attention None
129  //--------------------------------------------------------------------------
130 
132 
133  //!-------------------------------------------------------------------------
134  //! @brief Get bootloader shutdown request method
135  //! @note The method returns bootloader shutdown request status.
136  //! @return BOOL - Shutdown request status
137  //! @retval false - Shutdown not requested
138  //! @retval true - Shutdown requested
139  //! \par Override
140  //! Not allowed
141  //! @attention None
142  //--------------------------------------------------------------------------
143 
145 
146  //!-------------------------------------------------------------------------
147  //! @brief User application timer initialisation method
148  //! @note The method implements user timer initialiseation.
149  //! @return None
150  //! \par Override
151  //! Optional
152  //! @attention Don't call this method directly.
153  //--------------------------------------------------------------------------
154 
155  //!-------------------------------------------------------------------------
156  //! @brief User command registration method
157  //! @note The method register user defined commands by command manager system.
158  //! @return None
159  //! \par Override
160  //! Requered
161  //! @attention Don't call this method directly
162  //--------------------------------------------------------------------------
163 
164  virtual VOID Register_Commands() = 0;
165 
166  //!-------------------------------------------------------------------------
167  //! @brief User command registration method
168  //! @note The method register user parameters commands by parameter manager system.
169  //! @return None
170  //! \par Override
171  //! Requered
172  //! @attention Don't call this method directly.
173  //--------------------------------------------------------------------------
174 
175  virtual VOID Register_Parameters() = 0;
176 
177  //!-------------------------------------------------------------------------
178  //! @brief User application LEDs processing method
179  //! @note The method implements user application LEDs functionality.
180  //! @return None
181  //! \par Override
182  //! Optional
183  //! @attention This method is depricated. Don't use it for new applications.
184  //--------------------------------------------------------------------------
185 
187 
188  //----------------------------------------------------------------------------
189  // Protected defines, methods and variables
190  //----------------------------------------------------------------------------
191 
192  protected:
193 
194  //----------------------------------------------------------------------------
195  // Private defines, methods and variables
196  //----------------------------------------------------------------------------
197 
198  private:
199 
200  //--------------------------------------------------------------------------
201  // Private variables
202  //--------------------------------------------------------------------------
203 
204  //! @brief Bootloader shutdown request flag
206 
207 };
208 
209 //------------------------------------------------------------------------------
210 // End of file
211 //------------------------------------------------------------------------------
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
System resource header file.
Bootloader base class.
Definition: Bootloader_Base.h:57
VOID Done()
Application finalisation method.
Definition: Bootloader_Base.cpp:995
~TBootloader_Base()
Application destructor method.
Definition: Bootloader_Base.cpp:110
VOID Run()
Application run method.
Definition: Bootloader_Base.cpp:826
VOID Process_Application_LEDs()
User application LEDs processing method.
Definition: Bootloader_Base.cpp:1044
BOOL Is_Bootloader_Shutdown_Request()
Get bootloader shutdown request method.
virtual VOID Register_Commands()=0
User application timer initialisation method.
VOID Init()
Application initialisation method.
Definition: Bootloader_Base.cpp:121
TBootloader_Base()
Class constructor method.
Definition: Bootloader_Base.cpp:102
BOOL Set_Bootloader_Shutdown_Request()
Set bootloader shutdown request method.
virtual VOID Register_Parameters()=0
User command registration method.
BOOL bool_Bootloader_Shutdown
Bootloader shutdown request flag.
Definition: Bootloader_Base.h:205