ConOpSys V2970  P004.07
ANVILEX control operating system
Interval_Timer.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Interval_Timer.h
3 //! @brief Interval timer 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/Interval_Timer.h $
7 //! $Revision: 2076 $
8 //! $Date: 2020-09-12 20:30:44 +0500 (Sa, 12 Sep 2020) $
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 
44 #include "Defines.h"
45 
46 //------------------------------------------------------------------------------
47 // Class definitions
48 //------------------------------------------------------------------------------
49 
50 //! @brief Interval timer clase
52 {
53 
54  //----------------------------------------------------------------------------
55  // Public methods, variables and defines
56  //----------------------------------------------------------------------------
57 
58  public:
59 
60  //!-------------------------------------------------------------------------
61  //! @brief Class constructor method
62  //! @note None
63  //! \par Override
64  //! Not allowed
65  //! @attention Don't call this method directly.
66  //--------------------------------------------------------------------------
67 
69 
70  //!-------------------------------------------------------------------------
71  //! @brief Set interval timer value
72  //! @note None
73  //! @param [in] u32_New_Interval - Interval value in timer ticks
74  //! \par Override
75  //! Not allowed
76  //! @attention None
77  //--------------------------------------------------------------------------
78 
79  VOID Set_Interval( U32 u32_New_Interval );
80 
81  //!-------------------------------------------------------------------------
82  //! @brief Enable timer operation method.
83  //! @note None
84  //! \par Override
85  //! Not allowed
86  //! @attention None
87  //--------------------------------------------------------------------------
88 
89  VOID Enable();
90 
91  //!-------------------------------------------------------------------------
92  //! @brief Disable timer operation method.
93  //! @note None
94  //! \par Override
95  //! Not allowed
96  //! @attention None
97  //--------------------------------------------------------------------------
98 
99  VOID Disable();
100 
101  //!-------------------------------------------------------------------------
102  //! @brief Execute timer core method.
103  //! @note None
104  //! \par Override
105  //! Not allowed
106  //! @attention None
107  //--------------------------------------------------------------------------
108 
109  BOOL Execute();
110 
111  //----------------------------------------------------------------------------
112  // Protected methods, variables and defines
113  //----------------------------------------------------------------------------
114 
115  protected:
116 
117  //----------------------------------------------------------------------------
118  // private methods, variables and defines
119  //----------------------------------------------------------------------------
120 
121  private:
122 
123  //! @brief Timer enabled flag
125 
126  //! @brief Interval value in counts
128 
129  //! @brief Timer interval counter
131 
132 };
133 
134 //------------------------------------------------------------------------------
135 // End Of File
136 //------------------------------------------------------------------------------
ConOpSys data type definitions header file.
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
int TRIL
Thrilean datatype defenition.
Definition: Defines.h:143
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
Interval timer clase.
Definition: Interval_Timer.h:52
U32 u32_Counter
Timer interval counter.
Definition: Interval_Timer.h:130
VOID Disable()
Disable timer operation method.
Definition: Interval_Timer.cpp:112
TInterval_Timer()
Class constructor method.
Definition: Interval_Timer.cpp:48
BOOL Execute()
Execute timer core method.
Definition: Interval_Timer.cpp:137
VOID Set_Interval(U32 u32_New_Interval)
Set interval timer value.
Definition: Interval_Timer.cpp:62
TRIL tril_Enabled
Timer enabled flag.
Definition: Interval_Timer.h:124
VOID Enable()
Enable timer operation method.
Definition: Interval_Timer.cpp:87
U32 u32_Interval
Interval value in counts.
Definition: Interval_Timer.h:127