F´ Flight Software - C/C++ Documentation devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TlmPortAc.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title TlmPortAc.hpp
3// \author Generated by fpp-to-cpp
4// \brief hpp file for Tlm port
5// ======================================================================
6
7#ifndef Fw_TlmPortAc_HPP
8#define Fw_TlmPortAc_HPP
9
10#include <cstdio>
11#include <cstring>
12
13#include "FpConfig.hpp"
17#include "Fw/Time/Time.hpp"
18#include "Fw/Tlm/TlmBuffer.hpp"
21
22namespace Fw {
23
28 {
29
30 public:
31
32 // ----------------------------------------------------------------------
33 // Constants
34 // ----------------------------------------------------------------------
35
36 enum {
39 sizeof(FwChanIdType) +
42 };
43
44 public:
45
46 // ----------------------------------------------------------------------
47 // Types
48 // ----------------------------------------------------------------------
49
51 typedef void (*CompFuncPtr)(
53 NATIVE_INT_TYPE portNum,
54 FwChanIdType id,
55 Fw::Time& timeTag,
56 Fw::TlmBuffer& val
57 );
58
59 public:
60
61 // ----------------------------------------------------------------------
62 // Input Port Member functions
63 // ----------------------------------------------------------------------
64
67
69 void init();
70
72 void addCallComp(
73 Fw::PassiveComponentBase* callComp,
74 CompFuncPtr funcPtr
75 );
76
78 void invoke(
79 FwChanIdType id,
80 Fw::Time& timeTag,
81 Fw::TlmBuffer& val
82 );
83
84 private:
85
86#if FW_PORT_SERIALIZATION == 1
87
89 Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
90
91#endif
92
93 private:
94
95 // ----------------------------------------------------------------------
96 // Member variables
97 // ----------------------------------------------------------------------
98
100 CompFuncPtr m_func;
101
102 };
103
107 public Fw::OutputPortBase
108 {
109
110 public:
111
112 // ----------------------------------------------------------------------
113 // Output Port Member functions
114 // ----------------------------------------------------------------------
115
118
120 void init();
121
123 void addCallPort(
124 InputTlmPort* callPort
125 );
126
128 void invoke(
129 FwChanIdType id,
130 Fw::Time& timeTag,
131 Fw::TlmBuffer& val
132 );
133
134 private:
135
136 // ----------------------------------------------------------------------
137 // Member variables
138 // ----------------------------------------------------------------------
139
141 InputTlmPort* m_port;
142
143 };
144
145}
146
147#endif
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
U32 FwChanIdType
Definition FpConfig.h:59
C++-compatible configuration header for fprime configuration.
Declares ISF string base class.
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
Definition TlmPortAc.hpp:38
void init()
Initialization function.
Definition TlmPortAc.cpp:56
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
The port callback function type.
Definition TlmPortAc.hpp:51
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke a port interface.
Definition TlmPortAc.cpp:76
InputTlmPort()
Constructor.
Definition TlmPortAc.cpp:48
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition TlmPortAc.cpp:62
void addCallPort(InputTlmPort *callPort)
Register an input port.
OutputTlmPort()
Constructor.
void init()
Initialization function.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke a port interface.
@ SERIALIZED_SIZE
Definition Time.hpp:13
SerializeStatus
forward declaration for string