F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
ComPortAc.hpp
Go to the documentation of this file.
1 /*
2  * ComPort.hpp
3  *
4  * Created on: Wednesday, 14 October 2020
5  * Author: mstarch
6  *
7  */
8 #ifndef FW_COM_PORT_HPP_
9 #define FW_COM_PORT_HPP_
10 
11 #include <cstring>
12 #include <cstdio>
13 #include <FpConfig.hpp>
17 #include <Fw/Types/BasicTypes.hpp>
19 #include <Fw/Types/StringType.hpp>
20 #include <Fw/Com/ComBuffer.hpp>
21 
22 
23 namespace Fw {
24 
27 
29  public:
30  enum {
32  };
33  typedef void (*CompFuncPtr)(Fw::PassiveComponentBase* callComp, NATIVE_INT_TYPE portNum, ComBuffer &data, U32 context);
34 
35  InputComPort(void);
36  void init(void);
37  void addCallComp(Fw::PassiveComponentBase* callComp, CompFuncPtr funcPtr);
38  void invoke(ComBuffer &data, U32 context);
39  protected:
40  private:
41  CompFuncPtr m_func;
42 #if FW_PORT_SERIALIZATION == 1
43  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase &buffer);
44 #endif
45 };
48 
50  public:
51  OutputComPort(void);
52  void init(void);
53  void addCallPort(InputComPort* callPort);
54  void invoke(ComBuffer &data, U32 context);
55  protected:
56  private:
57  InputComPort* m_port;
58  };
59 } // end namespace Fw
60 #endif /* FW_COM_PORT_HPP_ */
61 
StringType.hpp
Declares ISF string base class.
InputPortBase.hpp
PassiveComponentBase.hpp
Fw::OutputComPort::OutputComPort
OutputComPort(void)
Definition: ComPortAc.cpp:90
Fw::ComBuffer::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Definition: ComBuffer.hpp:26
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition: Serializable.hpp:14
Fw::InputComPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: ComPortAc.hpp:31
Serializable.hpp
Fw::InputComPort::InputComPort
InputComPort(void)
constructor
Definition: ComPortAc.cpp:33
ComBuffer.hpp
Fw::OutputComPort::init
void init(void)
Definition: ComPortAc.cpp:95
Fw::InputComPort::invoke
void invoke(ComBuffer &data, U32 context)
invoke port interface
Definition: ComPortAc.cpp:52
Fw::InputComPort
Definition: ComPortAc.hpp:28
Fw::PassiveComponentBase
Definition: PassiveComponentBase.hpp:10
Fw::OutputComPort::invoke
void invoke(ComBuffer &data, U32 context)
Definition: ComPortAc.cpp:109
Fw::InputPortBase
Definition: InputPortBase.hpp:14
Fw::InputComPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: ComPortAc.cpp:42
OutputPortBase.hpp
Fw::OutputComPort
Definition: ComPortAc.hpp:49
Fw::InputComPort::init
void init(void)
initialization function
Definition: ComPortAc.cpp:38
Fw::InputComPort::CompFuncPtr
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, ComBuffer &data, U32 context)
port callback definition
Definition: ComPortAc.hpp:33
FpConfig.hpp
ISF configuration file.
Fw::OutputPortBase
Definition: OutputPortBase.hpp:13
BasicTypes.hpp
Declares ISF basic types.
Fw::OutputComPort::addCallPort
void addCallPort(InputComPort *callPort)
Definition: ComPortAc.cpp:99
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Fw::ComBuffer
Definition: ComBuffer.hpp:21
Fw
Definition: BufferGetPortAc.cpp:6