ConOpSys V2970  P004.07
ANVILEX control operating system
P014_47_V1_0_PFOTX.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file P014_47_V1_0_PFOTX.h
3 //! @brief Plastic fiber optic TX board P014.47 V1.0 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/P014_47_V1_0_PFOTX/P014_47_V1_0_PFOTX.h $
7 //! $Revision: 2262 $
8 //! $Date: 2020-12-05 07:20:48 +0500 (Sa, 05 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 Plastic fiber optic TX board P014.47 V1.0 class
70 //------------------------------------------------------------------------------
71 
72 class TP014_47_V1_0_PFOTX : public TFunctional_Block_Base
73 {
74 
75  //----------------------------------------------------------------------------
76  // Public defines, methods and variables
77  //----------------------------------------------------------------------------
78 
79  public:
80 
81  //--------------------------------------------------------------------------
82  // Public type definitions
83  //--------------------------------------------------------------------------
84 
85  // Register structure for generic access
86  typedef struct
87  {
88 
89  union
90  {
91  U16 u16_TX_Channels_Status; //!< Fiber optic transmitter status signal
92  U16 u16_TX_Channels_Write; //!< Write fiber optic channels test register
93  };
94 
95  U16 u16_TX_Channel_Set; //!< Set fiber optic channels test register
96  U16 u16_TX_Channel_Clear; //!< Clear fiber optic channels test register
97  U16 u16_TX_Channel_Toggle; //!< Toggle fiber optic channels test register
98 
100 
101  //--------------------------------------------------------------------------
102  // Public methods
103  //--------------------------------------------------------------------------
104 
105  // Constructor and destructor
106  TP014_47_V1_0_PFOTX(); //!< Constructor method
107  ~TP014_47_V1_0_PFOTX(); //!< Destructor method
108 
109  VOID Map( TP014_47_V1_0_PFOTX_Registers *struct_Registers_Base_Address );
110  virtual VOID Init();
111  virtual VOID Execute();
112  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
113 
114  //--------------------------------------------------------------------------
115  // Public variables
116  //--------------------------------------------------------------------------
117 
118  //--------------------------------------------------------------------------
119  // Block inputs
120  //--------------------------------------------------------------------------
121 
122  //--------------------------------------------------------------------------
123  // Block outputs
124  //--------------------------------------------------------------------------
125 
139 
140  //----------------------------------------------------------------------------
141  // Protected defines, methods and variables
142  //----------------------------------------------------------------------------
143 
144  protected:
145 
146  //----------------------------------------------------------------------------
147  // Private defines, methods and variables
148  //----------------------------------------------------------------------------
149 
150  private:
151 
152  typedef union
153  {
155  struct
156  {
169  U16 :1;
170  U16 :1;
171  U16 :1;
172  U16 :1;
173  };
174  } TStatus;
175 
177 
178 };
179 
180 //------------------------------------------------------------------------------
181 // End Of File
182 //------------------------------------------------------------------------------
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 output connector class.
Definition: Block_Output_Connector.h:59
Plastic fiber optic TX board P014.47 V1.0 class.
Definition: P014_47_V1_0_PFOTX.h:73
TBlock_Output_Connector object_bool_Channel_2_Status
Definition: P014_47_V1_0_PFOTX.h:128
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send detailed information about functional block.
Definition: P014_47_V1_0_PFOTX.cpp:203
TBlock_Output_Connector object_bool_Channel_8_Status
Definition: P014_47_V1_0_PFOTX.h:134
TBlock_Output_Connector object_bool_Channel_1_Status
Definition: P014_47_V1_0_PFOTX.h:127
TBlock_Output_Connector object_bool_Channel_9_Status
Definition: P014_47_V1_0_PFOTX.h:135
TBlock_Output_Connector object_u16_Channels_Status
Definition: P014_47_V1_0_PFOTX.h:126
virtual VOID Execute()
Plastic fiber optic TX board P014.47 V1.0 execute method.
Definition: P014_47_V1_0_PFOTX.cpp:170
~TP014_47_V1_0_PFOTX()
Destructor method.
Definition: P014_47_V1_0_PFOTX.cpp:135
TBlock_Output_Connector object_bool_Channel_10_Status
Definition: P014_47_V1_0_PFOTX.h:136
TBlock_Output_Connector object_bool_Channel_5_Status
Definition: P014_47_V1_0_PFOTX.h:131
TBlock_Output_Connector object_bool_Channel_7_Status
Definition: P014_47_V1_0_PFOTX.h:133
TP014_47_V1_0_PFOTX()
Constructor method.
Definition: P014_47_V1_0_PFOTX.cpp:68
virtual VOID Init()
Plastic fiber optic TX board P014.47 V1.0 object initialization.
Definition: P014_47_V1_0_PFOTX.cpp:160
TBlock_Output_Connector object_bool_Channel_11_Status
Definition: P014_47_V1_0_PFOTX.h:137
TBlock_Output_Connector object_bool_Channel_12_Status
Definition: P014_47_V1_0_PFOTX.h:138
TBlock_Output_Connector object_bool_Channel_3_Status
Definition: P014_47_V1_0_PFOTX.h:129
volatile TP014_47_V1_0_PFOTX_Registers * struct_Registers
Definition: P014_47_V1_0_PFOTX.h:176
VOID Map(TP014_47_V1_0_PFOTX_Registers *struct_Registers_Base_Address)
Plastic fiber optic TX board P014.47 V1.0 memory mapping.
Definition: P014_47_V1_0_PFOTX.cpp:146
TBlock_Output_Connector object_bool_Channel_4_Status
Definition: P014_47_V1_0_PFOTX.h:130
TBlock_Output_Connector object_bool_Channel_6_Status
Definition: P014_47_V1_0_PFOTX.h:132
Definition: Protocol_Base.h:57
Definition: P014_47_V1_0_PFOTX.h:87
U16 u16_TX_Channel_Set
Set fiber optic channels test register.
Definition: P014_47_V1_0_PFOTX.h:95
U16 u16_TX_Channel_Clear
Clear fiber optic channels test register.
Definition: P014_47_V1_0_PFOTX.h:96
U16 u16_TX_Channels_Status
Fiber optic transmitter status signal.
Definition: P014_47_V1_0_PFOTX.h:91
U16 u16_TX_Channel_Toggle
Toggle fiber optic channels test register.
Definition: P014_47_V1_0_PFOTX.h:97
U16 u16_TX_Channels_Write
Write fiber optic channels test register.
Definition: P014_47_V1_0_PFOTX.h:92
U16 u16_Channel_8
Definition: P014_47_V1_0_PFOTX.h:164
U16 u16_Channel_7
Definition: P014_47_V1_0_PFOTX.h:163
U16 u16_Channel_5
Definition: P014_47_V1_0_PFOTX.h:161
U16 u16_Channel_1
Definition: P014_47_V1_0_PFOTX.h:157
U16 u16_Channel_9
Definition: P014_47_V1_0_PFOTX.h:165
U16 u16_Channel_11
Definition: P014_47_V1_0_PFOTX.h:167
U16 u16_Channel_3
Definition: P014_47_V1_0_PFOTX.h:159
U16 u16_Channel_4
Definition: P014_47_V1_0_PFOTX.h:160
U16 u16_Channels
Definition: P014_47_V1_0_PFOTX.h:154
U16 u16_Channel_6
Definition: P014_47_V1_0_PFOTX.h:162
U16 u16_Channel_2
Definition: P014_47_V1_0_PFOTX.h:158
U16 u16_Channel_10
Definition: P014_47_V1_0_PFOTX.h:166
U16 u16_Channel_12
Definition: P014_47_V1_0_PFOTX.h:168