F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
I2cPortAc.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title I2cPortAc.hpp
3// \author Generated by fpp-to-cpp
4// \brief hpp file for I2c port
5// ======================================================================
6
7#ifndef Drv_I2cPortAc_HPP
8#define Drv_I2cPortAc_HPP
9
10#include <cstdio>
11#include <cstring>
12
14#include "FpConfig.hpp"
15#include "Fw/Buffer/Buffer.hpp"
20
21namespace Drv {
22
26 {
27
28 public:
29
30 // ----------------------------------------------------------------------
31 // Constants
32 // ----------------------------------------------------------------------
33
34 enum {
37 sizeof(U32) +
39 };
40
41 public:
42
43 // ----------------------------------------------------------------------
44 // Types
45 // ----------------------------------------------------------------------
46
50 FwIndexType portNum,
51 U32 addr,
52 Fw::Buffer& serBuffer
53 );
54
55 public:
56
57 // ----------------------------------------------------------------------
58 // Input Port Member functions
59 // ----------------------------------------------------------------------
60
63
65 void init();
66
68 void addCallComp(
69 Fw::PassiveComponentBase* callComp,
70 CompFuncPtr funcPtr
71 );
72
75 U32 addr,
76 Fw::Buffer& serBuffer
77 );
78
79 private:
80
81#if FW_PORT_SERIALIZATION == 1
82
84 Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
85
86#endif
87
88 private:
89
90 // ----------------------------------------------------------------------
91 // Member variables
92 // ----------------------------------------------------------------------
93
95 CompFuncPtr m_func;
96
97 };
98
101 public Fw::OutputPortBase
102 {
103
104 public:
105
106 // ----------------------------------------------------------------------
107 // Output Port Member functions
108 // ----------------------------------------------------------------------
109
112
114 void init();
115
117 void addCallPort(
118 InputI2cPort* callPort
119 );
120
123 U32 addr,
124 Fw::Buffer& serBuffer
125 ) const;
126
127 private:
128
129 // ----------------------------------------------------------------------
130 // Member variables
131 // ----------------------------------------------------------------------
132
134 InputI2cPort* m_port;
135
136 };
137
138}
139
140#endif
PlatformIndexType FwIndexType
Definition FpConfig.h:25
C++-compatible configuration header for fprime configuration.
Input I2c port.
Definition I2cPortAc.hpp:26
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition I2cPortAc.cpp:32
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
Definition I2cPortAc.hpp:36
Drv::I2cStatus(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, U32 addr, Fw::Buffer &serBuffer)
The port callback function type.
Definition I2cPortAc.hpp:48
InputI2cPort()
Constructor.
Definition I2cPortAc.cpp:18
Drv::I2cStatus invoke(U32 addr, Fw::Buffer &serBuffer)
Invoke a port interface.
Definition I2cPortAc.cpp:46
void init()
Initialization function.
Definition I2cPortAc.cpp:26
Output I2c port.
Drv::I2cStatus invoke(U32 addr, Fw::Buffer &serBuffer) const
Invoke a port interface.
void init()
Initialization function.
Definition I2cPortAc.cpp:88
OutputI2cPort()
Constructor.
Definition I2cPortAc.cpp:80
void addCallPort(InputI2cPort *callPort)
Register an input port.
Definition I2cPortAc.cpp:94
@ SERIALIZED_SIZE
Size of Fw::Buffer when serialized.
Definition Buffer.hpp:48
SerializeStatus
forward declaration for string