F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileReadPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FileReadPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FileRead port
5 // ======================================================================
6 
7 #ifndef Svc_FileReadPortAc_HPP
8 #define Svc_FileReadPortAc_HPP
9 
10 #include <cstdio>
11 #include <cstring>
12 
13 #include "Fw/Buffer/Buffer.hpp"
15 #include "Fw/FPrimeBasicTypes.hpp"
19 #include "Fw/Types/String.hpp"
21 
22 namespace Svc {
23 
26  public Fw::InputPortBase
27  {
28 
29  public:
30 
31  // ----------------------------------------------------------------------
32  // Constants
33  // ----------------------------------------------------------------------
34 
35  enum {
40  };
41 
42  public:
43 
44  // ----------------------------------------------------------------------
45  // Types
46  // ----------------------------------------------------------------------
47 
49  typedef void (*CompFuncPtr)(
50  Fw::PassiveComponentBase* callComp,
51  FwIndexType portNum,
52  const Fw::StringBase& path,
53  Fw::Buffer& buffer
54  );
55 
56  public:
57 
58  // ----------------------------------------------------------------------
59  // Input Port Member functions
60  // ----------------------------------------------------------------------
61 
64 
66  void init();
67 
69  void addCallComp(
70  Fw::PassiveComponentBase* callComp,
71  CompFuncPtr funcPtr
72  );
73 
75  void invoke(
76  const Fw::StringBase& path,
77  Fw::Buffer& buffer
78  );
79 
80  private:
81 
82 #if FW_PORT_SERIALIZATION == 1
83 
85  Fw::SerializeStatus invokeSerial(Fw::LinearBufferBase& _buffer);
86 
87 #endif
88 
89  private:
90 
91  // ----------------------------------------------------------------------
92  // Member variables
93  // ----------------------------------------------------------------------
94 
96  CompFuncPtr m_func;
97 
98  };
99 
102  public Fw::OutputPortBase
103  {
104 
105  public:
106 
107  // ----------------------------------------------------------------------
108  // Output Port Member functions
109  // ----------------------------------------------------------------------
110 
113 
115  void init();
116 
118  void addCallPort(
119  InputFileReadPort* callPort
120  );
121 
123  void invoke(
124  const Fw::StringBase& path,
125  Fw::Buffer& buffer
126  ) const;
127 
128  private:
129 
130  // ----------------------------------------------------------------------
131  // Member variables
132  // ----------------------------------------------------------------------
133 
135  InputFileReadPort* m_port;
136 
137  };
138 
139 }
140 
141 #endif
InputFileReadPort()
Constructor.
SerializeStatus
forward declaration for string
Input FileRead port.
The size of the serial representations of the port arguments.
Size of Fw::Buffer when serialized.
Definition: Buffer.hpp:64
void addCallPort(InputFileReadPort *callPort)
Register an input port.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(const Fw::StringBase &path, Fw::Buffer &buffer)
Invoke a port interface.
OutputFileReadPort()
Constructor.
void invoke(const Fw::StringBase &path, Fw::Buffer &buffer) const
Invoke a port interface.
PlatformIndexType FwIndexType
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer)
The port callback function type.
RateGroupDivider component implementation.
Output FileRead port.
static constexpr SizeType STATIC_SERIALIZED_SIZE(SizeType maxLength)
void init()
Initialization function.
void init()
Initialization function.