ConOpSys V2970  P004.07
ANVILEX control operating system
P016_37_V1_DS1_IO.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file P016_37_V1_DS1_IO.h
3 //! @brief DS1 I/O board P016.37 V1 hardware driver 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/Hardware/P016_37_V1_DS1_IO/P016_37_V1_DS1_IO.h $
7 //! $Revision: 2280 $
8 //! $Date: 2020-12-12 16:29:27 +0500 (Sa, 12 Dez 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 //------------------------------------------------------------------------------
41 // Protecting header files from mutual, recursive inclusion.
42 //------------------------------------------------------------------------------
43 
44 #pragma once
45 
46 //------------------------------------------------------------------------------
47 // Include standard libraries header files
48 //------------------------------------------------------------------------------
49 
50 //------------------------------------------------------------------------------
51 // Include thrid party header files
52 //------------------------------------------------------------------------------
53 
54 //------------------------------------------------------------------------------
55 // Include ConOpSys header files
56 //------------------------------------------------------------------------------
57 
58 #include "Functional_Block_Base.h"
59 
60 //------------------------------------------------------------------------------
61 // Include ConOpSys application header files
62 //------------------------------------------------------------------------------
63 
64 //------------------------------------------------------------------------------
65 // Macros
66 //------------------------------------------------------------------------------
67 
68 //------------------------------------------------------------------------------
69 //! @brief DS1 I/O board P016.37 V1 class
70 //------------------------------------------------------------------------------
71 
72 class TP016_37_V1_DS1_IO : public TFunctional_Block_Base
73 {
74 
75  //--------------------------------------------------------------------------
76  // Public defines, methods and variables
77  //--------------------------------------------------------------------------
78 
79  public:
80 
81  // Register structure for digital I/O access
82  typedef struct
83  {
84 
85  // Digital inputs
90 
91  // Digital outputs
96 
98 
99  //--------------------------------------------------------------------------
100  // Public methods
101  //--------------------------------------------------------------------------
102 
103  //!-------------------------------------------------------------------------
104  //! @brief Class constructor method.
105  //! @note None
106  //! \par Override
107  //! Not allowed
108  //! @attention Don't call this method directly.
109  //--------------------------------------------------------------------------
110 
112 
113  //!-------------------------------------------------------------------------
114  //! @brief Class destructor method.
115  //! @note None
116  //! \par Override
117  //! Not allowed
118  //! @attention Don't call this method directly.
119  //--------------------------------------------------------------------------
120 
122 
123  VOID Map( TP016_37_V1_DS1_IO_Registers *struct_Registers_Base_Address ); //!< Map method
124  virtual VOID Init();
125  virtual VOID Execute();
128 
129  //--------------------------------------------------------------------------
130  // Public variables
131  //--------------------------------------------------------------------------
132 
133  // Input signals
134 
143 
144  // Output signals
145 
155 
158 
159  //--------------------------------------------------------------------------
160  // Protected defines, methods and variables
161  //--------------------------------------------------------------------------
162 
163  protected:
164 
165  //----------------------------------------------------------------------------
166  // Private defines, methods and variables
167  //--------------------------------------------------------------------------
168 
169  private:
170 
171  // Structure for bit parsing
172  typedef union
173  {
175  struct
176  {
185  U16 :1;
186  U16 :1;
187  U16 :1;
188  U16 :1;
189  U16 :1;
190  U16 :1;
191  U16 :1;
192  U16 :1;
193  };
194  } TChannels;
195 
197 
198 };
199 
200 //------------------------------------------------------------------------------
201 // End Of File
202 //------------------------------------------------------------------------------
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned short U16
Binary 16-Bit unsigned integer datatype defenition.
Definition: Defines.h:193
Function block input connector class.
Definition: Block_Input_Connector.h:83
Function block output connector class.
Definition: Block_Output_Connector.h:59
DS1 I/O board P016.37 V1 class.
Definition: P016_37_V1_DS1_IO.h:73
TBlock_Output_Connector object_bool_Digital_Input_2
Definition: P016_37_V1_DS1_IO.h:136
VOID Execute_Inputs()
Definition: P016_37_V1_DS1_IO.cpp:196
TBlock_Input_Connector object_bool_Digital_Output_5
Definition: P016_37_V1_DS1_IO.h:150
TBlock_Output_Connector object_u16_Digital_Inputs_Status
Definition: P016_37_V1_DS1_IO.h:156
VOID Map(TP016_37_V1_DS1_IO_Registers *struct_Registers_Base_Address)
Map method.
Definition: P016_37_V1_DS1_IO.cpp:153
TBlock_Input_Connector object_bool_Digital_Output_4
Definition: P016_37_V1_DS1_IO.h:149
TBlock_Output_Connector object_bool_Digital_Input_6
Definition: P016_37_V1_DS1_IO.h:140
TBlock_Input_Connector object_bool_Digital_Output_3
Definition: P016_37_V1_DS1_IO.h:148
TBlock_Output_Connector object_bool_Digital_Input_7
Definition: P016_37_V1_DS1_IO.h:141
TBlock_Output_Connector object_bool_Digital_Input_4
Definition: P016_37_V1_DS1_IO.h:138
TBlock_Output_Connector object_bool_Digital_Input_1
Definition: P016_37_V1_DS1_IO.h:135
~TP016_37_V1_DS1_IO()
Class destructor method.
Definition: P016_37_V1_DS1_IO.cpp:145
TBlock_Output_Connector object_bool_Digital_Input_5
Definition: P016_37_V1_DS1_IO.h:139
TBlock_Input_Connector object_bool_Digital_Output_2
Definition: P016_37_V1_DS1_IO.h:147
TP016_37_V1_DS1_IO()
Class constructor method.
Definition: P016_37_V1_DS1_IO.cpp:66
virtual VOID Execute()
Definition: P016_37_V1_DS1_IO.cpp:181
TBlock_Output_Connector object_bool_Digital_Input_3
Definition: P016_37_V1_DS1_IO.h:137
TBlock_Input_Connector object_bool_Digital_Output_6
Definition: P016_37_V1_DS1_IO.h:151
TBlock_Output_Connector object_u16_Digital_Outputs_Status
Definition: P016_37_V1_DS1_IO.h:157
virtual VOID Init()
Definition: P016_37_V1_DS1_IO.cpp:165
TBlock_Input_Connector object_bool_Digital_Output_7
Definition: P016_37_V1_DS1_IO.h:152
TBlock_Input_Connector object_bool_Digital_Output_9
Definition: P016_37_V1_DS1_IO.h:154
TBlock_Input_Connector object_bool_Digital_Output_1
Definition: P016_37_V1_DS1_IO.h:146
TBlock_Output_Connector object_bool_Digital_Input_8
Definition: P016_37_V1_DS1_IO.h:142
volatile TP016_37_V1_DS1_IO_Registers * struct_Registers
Definition: P016_37_V1_DS1_IO.h:196
VOID Execute_Outputs()
Definition: P016_37_V1_DS1_IO.cpp:224
TBlock_Input_Connector object_bool_Digital_Output_8
Definition: P016_37_V1_DS1_IO.h:153
Definition: P016_37_V1_DS1_IO.h:83
U16 u16_Digital_Inputs_Reserve_3
Definition: P016_37_V1_DS1_IO.h:89
U16 u16_Digital_Inputs_Reserve_1
Definition: P016_37_V1_DS1_IO.h:87
U16 u16_Digital_Outputs
Definition: P016_37_V1_DS1_IO.h:92
U16 u16_Digital_Inputs
Definition: P016_37_V1_DS1_IO.h:86
U16 u16_Digital_Outputs_Reserve_2
Definition: P016_37_V1_DS1_IO.h:94
U16 u16_Digital_Inputs_Reserve_2
Definition: P016_37_V1_DS1_IO.h:88
U16 u16_Digital_Outputs_Reserve_3
Definition: P016_37_V1_DS1_IO.h:95
U16 u16_Digital_Outputs_Reserve_1
Definition: P016_37_V1_DS1_IO.h:93
U16 u16_Channels
Definition: P016_37_V1_DS1_IO.h:174
U16 bool_Channel_1
Definition: P016_37_V1_DS1_IO.h:177
U16 bool_Channel_2
Definition: P016_37_V1_DS1_IO.h:178
U16 bool_Channel_8
Definition: P016_37_V1_DS1_IO.h:184
U16 bool_Channel_6
Definition: P016_37_V1_DS1_IO.h:182
U16 bool_Channel_3
Definition: P016_37_V1_DS1_IO.h:179
U16 bool_Channel_4
Definition: P016_37_V1_DS1_IO.h:180
U16 bool_Channel_7
Definition: P016_37_V1_DS1_IO.h:183
U16 bool_Channel_5
Definition: P016_37_V1_DS1_IO.h:181