F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
GpioWritePortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title GpioWritePortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for GpioWrite port
5 // ======================================================================
6 
7 #ifndef Drv_GpioWritePortAc_HPP
8 #define Drv_GpioWritePortAc_HPP
9 
10 #include <cstdio>
11 #include <cstring>
12 
14 #include "FpConfig.hpp"
18 #include "Fw/Types/LogicEnumAc.hpp"
19 #include "Fw/Types/StringType.hpp"
20 
21 namespace Drv {
22 
25  public Fw::InputPortBase
26  {
27 
28  public:
29 
30  // ----------------------------------------------------------------------
31  // Constants
32  // ----------------------------------------------------------------------
33 
34  enum {
38  };
39 
40  public:
41 
42  // ----------------------------------------------------------------------
43  // Types
44  // ----------------------------------------------------------------------
45 
48  Fw::PassiveComponentBase* callComp,
49  FwIndexType portNum,
50  const Fw::Logic& state
51  );
52 
53  public:
54 
55  // ----------------------------------------------------------------------
56  // Input Port Member functions
57  // ----------------------------------------------------------------------
58 
61 
63  void init();
64 
66  void addCallComp(
67  Fw::PassiveComponentBase* callComp,
68  CompFuncPtr funcPtr
69  );
70 
72  Drv::GpioStatus invoke(const Fw::Logic& state);
73 
74  private:
75 
76 #if FW_PORT_SERIALIZATION == 1
77 
79  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
80 
81 #endif
82 
83  private:
84 
85  // ----------------------------------------------------------------------
86  // Member variables
87  // ----------------------------------------------------------------------
88 
90  CompFuncPtr m_func;
91 
92  };
93 
96  public Fw::OutputPortBase
97  {
98 
99  public:
100 
101  // ----------------------------------------------------------------------
102  // Output Port Member functions
103  // ----------------------------------------------------------------------
104 
107 
109  void init();
110 
112  void addCallPort(
113  InputGpioWritePort* callPort
114  );
115 
117  Drv::GpioStatus invoke(const Fw::Logic& state);
118 
119  private:
120 
121  // ----------------------------------------------------------------------
122  // Member variables
123  // ----------------------------------------------------------------------
124 
126  InputGpioWritePort* m_port;
127 
128  };
129 
130 }
131 
132 #endif
PlatformIndexType FwIndexType
Definition: FpConfig.h:25
C++-compatible configuration header for fprime configuration.
Input GpioWrite port.
void init()
Initialization function.
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
Drv::GpioStatus(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, const Fw::Logic &state)
The port callback function type.
InputGpioWritePort()
Constructor.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Drv::GpioStatus invoke(const Fw::Logic &state)
Invoke a port interface.
Output GpioWrite port.
OutputGpioWritePort()
Constructor.
void addCallPort(InputGpioWritePort *callPort)
Register an input port.
void init()
Initialization function.
Drv::GpioStatus invoke(const Fw::Logic &state)
Invoke a port interface.
Logic states.
Definition: LogicEnumAc.hpp:19
@ SERIALIZED_SIZE
The size of the serial representation.
Definition: LogicEnumAc.hpp:49
SerializeStatus
forward declaration for string