ConOpSys V2970  P004.07
ANVILEX control operating system
CPU_Base.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file CPU_Base.h
3 //! @brief CPU 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/CPU_Base.h $
7 //! $Revision: 2339 $
8 //! $Date: 2021-01-08 14:06:54 +0500 (Fr, 08 Jan 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 standard libraries header files
44 //------------------------------------------------------------------------------
45 
46 //------------------------------------------------------------------------------
47 // Include thrid party header files
48 //------------------------------------------------------------------------------
49 
50 //------------------------------------------------------------------------------
51 // Include ConOpSys header files
52 //------------------------------------------------------------------------------
53 
54 #include "Defines.h"
55 
56 //------------------------------------------------------------------------------
57 // Include ConOpSys application header files
58 //------------------------------------------------------------------------------
59 
60 //------------------------------------------------------------------------------
61 // Global defines
62 //------------------------------------------------------------------------------
63 
64 //------------------------------------------------------------------------------
65 // Global macros
66 //------------------------------------------------------------------------------
67 
68 //------------------------------------------------------------------------------
69 // Class definitions
70 //------------------------------------------------------------------------------
71 
72 //! @brief CPU base class
73 class TCPU_Base
74 {
75 
76  //----------------------------------------------------------------------------
77  // Public defines, methods and variables
78  //----------------------------------------------------------------------------
79 
80  public:
81 
82  //--------------------------------------------------------------------------
83  // Private defines
84  //--------------------------------------------------------------------------
85 
86  //! @brief CPU reset sources enumeration
87  typedef enum
88  {
89 
90  //! @brief Undefined reset source
92 
93  //! @brief Unknown reset source
95 
96  //! @brief Power reset source
98 
99  //! @brief Watchdog reset source
101 
103 
104  //--------------------------------------------------------------------------
105  // Private methods
106  //--------------------------------------------------------------------------
107 
108  //!-------------------------------------------------------------------------
109  //! @brief CPU base class constructor method.
110  //! @note None
111  //! \par Override
112  //! Not allowed
113  //! @attention Don't call this method directly.
114  //--------------------------------------------------------------------------
115 
116  TCPU_Base();
117 
118  //!-------------------------------------------------------------------------
119  //! @brief CPU base class destructor method.
120  //! @note None
121  //! \par Override
122  //! Not allowed
123  //! @attention Don't call this method directly.
124  //--------------------------------------------------------------------------
125 
126  virtual ~TCPU_Base();
127 
128  //!-------------------------------------------------------------------------
129  //! @brief CPU object initialisation method.
130  //! @note None
131  //! @return None
132  //! \par Override
133  //! Requered
134  //! @attention None
135  //--------------------------------------------------------------------------
136 
137  virtual VOID Init();
138 
139  //!-------------------------------------------------------------------------
140  //! @brief CPU object finalisation method.
141  //! @note None
142  //! @return None
143  //! \par Override
144  //! Requered
145  //! @attention None
146  //--------------------------------------------------------------------------
147 
148  virtual VOID Done();
149 
150  //----------------------------------------------------------------------------
151  // Protected defines, methods and variables
152  //----------------------------------------------------------------------------
153 
154  protected:
155 
156  //--------------------------------------------------------------------------
157  // Protected variables
158  //--------------------------------------------------------------------------
159 
160  //! @brief Error flag
161  U32 u32_Error_Flag = (U32)0x00000000;
162 
163  //----------------------------------------------------------------------------
164  // Private defines, methods and variables
165  //----------------------------------------------------------------------------
166 
167  private:
168 
169 };
170 
171 //------------------------------------------------------------------------------
172 // End of file
173 //------------------------------------------------------------------------------
ConOpSys data type definitions header file.
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
CPU base class.
Definition: CPU_Base.h:74
virtual ~TCPU_Base()
CPU base class destructor method.
Definition: CPU_Base.cpp:78
virtual VOID Done()
CPU object finalisation method.
Definition: CPU_Base.cpp:98
virtual VOID Init()
CPU object initialisation method.
Definition: CPU_Base.cpp:86
U32 u32_Error_Flag
Error flag.
Definition: CPU_Base.h:161
TReset_Source
CPU reset sources enumeration.
Definition: CPU_Base.h:88
@ enum_Unknown
Unknown reset source.
Definition: CPU_Base.h:94
@ enum_Power_On
Power reset source.
Definition: CPU_Base.h:97
@ enum_Watchdog
Watchdog reset source.
Definition: CPU_Base.h:100
@ enum_Undefined
Undefined reset source.
Definition: CPU_Base.h:91
TCPU_Base()
CPU base class constructor method.
Definition: CPU_Base.cpp:70