ConOpSys V2970  P004.07
ANVILEX control operating system
Communication_Data_Link.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Communication_Data_Link.h
3 //! @brief Communication data link 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/Communication_Data_Link.h $
7 //! $Revision: 2822 $
8 //! $Date: 2021-07-26 18:21:27 +0500 (Mo, 26 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 "Defines.h"
47 
48 //------------------------------------------------------------------------------
49 // Class definitions
50 //------------------------------------------------------------------------------
51 
52 //! @brief Communication data link class
53 //! @details This class implements interlink capability between physical and protocol communication layers.
55 {
56 
57  //----------------------------------------------------------------------------
58  // Public defines, methods and variables
59  //----------------------------------------------------------------------------
60 
61  public:
62 
63  //!-------------------------------------------------------------------------
64  //! @brief Class constructor method.
65  //! @note None
66  //! \par Override
67  //! Not allowed
68  //! @attention Don't call this method directly.
69  //--------------------------------------------------------------------------
70 
72 
73  //!-------------------------------------------------------------------------
74  //! @brief Connect data link method.
75  //! @note None
76  //! @param [in] *object_New_Data_Link - Type of the connection
77  //! @return None
78  //! \par Override
79  //! Not requered
80  //! @attention None
81  //--------------------------------------------------------------------------
82 
83  VOID Connect_Data_Link( TCommunication_Data_Link* object_New_Data_Link );
84 
85  //!-------------------------------------------------------------------------
86  //! @brief Disconnect data link method.
87  //! @note None
88  //! @return None
89  //! \par Override
90  //! Requered
91  //! @attention None
92  //--------------------------------------------------------------------------
93 
95 
96  //!-------------------------------------------------------------------------
97  //! @brief 1 ms cyclic execution method
98  //! @note None
99  //! @return None
100  //! \par Override
101  //! Not allowed
102  //! @attention None
103  //--------------------------------------------------------------------------
104 
105  virtual VOID Execute_1ms();
106 
107  //!-------------------------------------------------------------------------
108  //! @brief Background cyclic execution method
109  //! @note None
110  //! @return None
111  //! \par Override
112  //! Not allowed
113  //! @attention None
114  //--------------------------------------------------------------------------
115 
116  virtual VOID Execute();
117 
118 //! @todo Anvilex GG: Remove after tests
119 
120 // //!-------------------------------------------------------------------------
121 // //! @brief Set transmit mode method
122 // //! @note None
123 // //! @return None
124 // //! \par Override
125 // //! Requered
126 // //! @attention None
127 // //--------------------------------------------------------------------------
128 
129 // virtual VOID Set_Transmit_Mode();
130 
131 // //!-------------------------------------------------------------------------
132 // //! @brief Set receive mode method
133 // //! @note None
134 // //! @return None
135 // //! \par Override
136 // //! Requered
137 // //! @attention None
138 // //--------------------------------------------------------------------------
139 
140 // virtual VOID Set_Receive_Mode();
141 
142  //----------------------------------------------------------------------------
143  // Protected defines, methods and variables
144  //----------------------------------------------------------------------------
145 
146  protected:
147 
148  //!-------------------------------------------------------------------------
149  //! @brief Communication data transmit method
150  //! @note None
151  //! @param [in] u8_Transmit_Value - Value to transmit
152  //! @return None
153  //! \par Override
154  //! Requered
155  //! @attention None
156  //--------------------------------------------------------------------------
157 
158  virtual VOID Communication_Data_Transmit( U8 u8_Transmit_Value );
159 
160  //!-------------------------------------------------------------------------
161  //! @brief Communication data receive method
162  //! @note None
163  //! @param [in] u8_Receive_Value - Received value
164  //! @return None
165  //! \par Override
166  //! Requered
167  //! @attention None
168  //--------------------------------------------------------------------------
169 
170  virtual VOID Communication_Data_Receive( U8 u8_Receive_Value );
171 
172  //!-------------------------------------------------------------------------
173  //! @brief Communication data receive method
174  //! @note None
175  //! @param [in] void_Receive_Data - Pointer to received data block
176  //! @return None
177  //! \par Override
178  //! Requered
179  //! @attention None
180  //--------------------------------------------------------------------------
181 
182  virtual VOID Communication_Block_Data_Receive( VOID *void_Receive_Data );
183 
184  //!-------------------------------------------------------------------------
185  //! @brief Communication data transmit method
186  //! @note None
187  //! @param [in] void_Receive_Data - Pointer to transmit data block
188  //! @return None
189  //! \par Override
190  //! Requered
191  //! @attention None
192  //--------------------------------------------------------------------------
193 
194  virtual VOID Communication_Block_Data_Transmit( VOID *void_Receive_Data );
195 
196  //--------------------------------------------------------------------------
197  // Protected variables
198  //--------------------------------------------------------------------------
199 
200  //! @brief Pointer to the data link object
202 
203  //----------------------------------------------------------------------------
204  // Private defines, methods and variables
205  //----------------------------------------------------------------------------
206 
207  private:
208 
209 };
210 
211 //------------------------------------------------------------------------------
212 // End of file
213 //------------------------------------------------------------------------------
ConOpSys data type definitions header file.
#define NULL
Definition: Defines.h:388
unsigned char U8
Binary 8-Bit unsigned integer datatype defenition.
Definition: Defines.h:183
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105