F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PingPortAc.hpp
Go to the documentation of this file.
1 /*
2  * PingPort.hpp
3  *
4  * Created on: Wednesday, 14 October 2020
5  * Author: mstarch
6  *
7  */
8 #ifndef SVC_PING_PORT_HPP_
9 #define SVC_PING_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 
21 
22 namespace Svc {
23 
26 
28  public:
29  enum {
30  SERIALIZED_SIZE = sizeof(U32)
31  };
32  typedef void (*CompFuncPtr)(Fw::PassiveComponentBase* callComp, NATIVE_INT_TYPE portNum, U32 key);
33 
34  InputPingPort(void);
35  void init(void);
36  void addCallComp(Fw::PassiveComponentBase* callComp, CompFuncPtr funcPtr);
37  void invoke(U32 key);
38  protected:
39  private:
40  CompFuncPtr m_func;
41 #if FW_PORT_SERIALIZATION == 1
42  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase &buffer);
43 #endif
44 };
47 
49  public:
50  OutputPingPort(void);
51  void init(void);
52  void addCallPort(InputPingPort* callPort);
53  void invoke(U32 key);
54  protected:
55  private:
56  InputPingPort* m_port;
57  };
58 } // end namespace Svc
59 #endif /* SVC_PING_PORT_HPP_ */
60 
StringType.hpp
Declares ISF string base class.
InputPortBase.hpp
PassiveComponentBase.hpp
Svc::InputPingPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: PingPortAc.hpp:30
Svc::InputPingPort::invoke
void invoke(U32 key)
invoke port interface
Definition: PingPortAc.cpp:52
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition: Serializable.hpp:14
Serializable.hpp
Svc::InputPingPort::init
void init(void)
initialization function
Definition: PingPortAc.cpp:38
Svc::InputPingPort::CompFuncPtr
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, U32 key)
port callback definition
Definition: PingPortAc.hpp:32
Svc::OutputPingPort::init
void init(void)
Definition: PingPortAc.cpp:89
Svc::OutputPingPort::invoke
void invoke(U32 key)
Definition: PingPortAc.cpp:103
Svc::OutputPingPort::addCallPort
void addCallPort(InputPingPort *callPort)
Definition: PingPortAc.cpp:93
Fw::PassiveComponentBase
Definition: PassiveComponentBase.hpp:10
Svc::InputPingPort
Definition: PingPortAc.hpp:27
Svc::OutputPingPort::OutputPingPort
OutputPingPort(void)
Definition: PingPortAc.cpp:84
Fw::InputPortBase
Definition: InputPortBase.hpp:14
Svc::OutputPingPort
Definition: PingPortAc.hpp:48
Svc::InputPingPort::InputPingPort
InputPingPort(void)
constructor
Definition: PingPortAc.cpp:33
OutputPortBase.hpp
FpConfig.hpp
ISF configuration file.
Fw::OutputPortBase
Definition: OutputPortBase.hpp:13
Svc
Definition: ActiveLoggerComponentAc.cpp:22
BasicTypes.hpp
Declares ISF basic types.
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Svc::InputPingPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: PingPortAc.cpp:42