F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
g
h
i
m
o
p
r
s
t
v
w
Variables
Typedefs
a
b
c
d
e
f
g
h
l
o
p
r
s
t
u
w
Enumerations
Enumerator
a
b
c
f
h
i
n
o
p
s
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
Typedefs
c
e
s
t
u
w
Enumerations
b
c
d
g
h
m
o
q
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Related Symbols
a
b
c
d
f
g
h
l
p
r
s
t
u
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
l
m
n
p
r
s
t
u
v
Functions
c
i
m
p
s
u
Variables
_
b
c
f
i
l
p
r
s
Typedefs
b
c
f
i
n
p
s
u
Enumerations
Enumerator
a
b
c
d
f
g
h
p
r
s
t
Macros
_
a
c
d
f
g
h
i
l
m
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
I2cPortAc.cpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title I2cPortAc.cpp
3
// \author Generated by fpp-to-cpp
4
// \brief cpp file for I2c port
5
// ======================================================================
6
7
#include "
F-Prime/Drv/I2cDriverPorts/I2cPortAc.hpp
"
8
#include "
Fw/Types/Assert.hpp
"
9
#include "
Fw/Types/StringUtils.hpp
"
10
11
namespace
Drv
{
12
13
// ----------------------------------------------------------------------
14
// Input Port Member functions
15
// ----------------------------------------------------------------------
16
17
InputI2cPort ::
18
InputI2cPort() :
19
Fw
::InputPortBase(),
20
m_func(nullptr)
21
{
22
23
}
17
InputI2cPort :: {
…
}
24
25
void
InputI2cPort ::
26
init()
27
{
28
Fw::InputPortBase::init
();
29
}
25
void
InputI2cPort :: {
…
}
30
31
void
InputI2cPort ::
32
addCallComp(
33
Fw::PassiveComponentBase
* callComp,
34
CompFuncPtr funcPtr
35
)
36
{
37
FW_ASSERT
(callComp !=
nullptr
);
38
FW_ASSERT
(funcPtr !=
nullptr
);
39
40
this->m_comp = callComp;
41
this->m_func = funcPtr;
42
this->m_connObj = callComp;
43
}
31
void
InputI2cPort :: {
…
}
44
45
Drv::I2cStatus
InputI2cPort ::
46
invoke(
47
U32 addr,
48
Fw::Buffer
& serBuffer
49
)
50
{
51
#if FW_PORT_TRACING == 1
52
this->trace();
53
#endif
54
55
FW_ASSERT
(this->m_comp !=
nullptr
);
56
FW_ASSERT
(this->m_func !=
nullptr
);
57
58
return
this->m_func(this->m_comp, this->m_portNum, addr, serBuffer);
59
}
45
Drv::I2cStatus
InputI2cPort :: {
…
}
60
61
#if FW_PORT_SERIALIZATION == 1
62
63
Fw::SerializeStatus
InputI2cPort ::
64
invokeSerial(
Fw::SerializeBufferBase
& _buffer)
65
{
66
// For ports with a return type, invokeSerial is not used
67
(void) _buffer;
68
69
FW_ASSERT
(0);
70
return
Fw::FW_SERIALIZE_OK
;
71
}
72
73
#endif
74
75
// ----------------------------------------------------------------------
76
// Output Port Member functions
77
// ----------------------------------------------------------------------
78
79
OutputI2cPort ::
80
OutputI2cPort() :
81
Fw
::OutputPortBase(),
82
m_port(nullptr)
83
{
84
85
}
79
OutputI2cPort :: {
…
}
86
87
void
OutputI2cPort ::
88
init()
89
{
90
Fw::OutputPortBase::init
();
91
}
87
void
OutputI2cPort :: {
…
}
92
93
void
OutputI2cPort ::
94
addCallPort(
InputI2cPort
* callPort)
95
{
96
FW_ASSERT
(callPort !=
nullptr
);
97
98
this->m_port = callPort;
99
this->m_connObj = callPort;
100
101
#if FW_PORT_SERIALIZATION == 1
102
this->m_serPort =
nullptr
;
103
#endif
104
}
93
void
OutputI2cPort :: {
…
}
105
106
Drv::I2cStatus
OutputI2cPort ::
107
invoke(
108
U32 addr,
109
Fw::Buffer
& serBuffer
110
)
111
{
112
#if FW_PORT_TRACING == 1
113
this->trace();
114
#endif
115
116
FW_ASSERT
(this->m_port !=
nullptr
);
117
return
this->m_port->invoke(addr, serBuffer);
118
}
106
Drv::I2cStatus
OutputI2cPort :: {
…
}
119
120
}
Assert.hpp
FW_ASSERT
#define FW_ASSERT(...)
Definition
Assert.hpp:14
I2cPortAc.hpp
StringUtils.hpp
Drv::I2cStatus
Definition
I2cStatusEnumAc.hpp:18
Drv::InputI2cPort
Input I2c port.
Definition
I2cPortAc.hpp:26
Fw::Buffer
Definition
Buffer.hpp:43
Fw::InputPortBase::init
virtual void init()
Definition
InputPortBase.cpp:18
Fw::OutputPortBase::init
virtual void init()
Definition
OutputPortBase.cpp:21
Fw::PassiveComponentBase
Definition
PassiveComponentBase.hpp:10
Fw::SerializeBufferBase
Definition
Serializable.hpp:41
Drv
Definition
BlockDriverComponentAc.cpp:15
Fw
Definition
FppConstantsAc.hpp:98
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition
Serializable.hpp:13
Fw::FW_SERIALIZE_OK
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
Definition
Serializable.hpp:14
Drv
I2cDriverPorts
I2cPortAc.cpp
Generated by
1.10.0