F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
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
r
s
t
v
w
Variables
Typedefs
Enumerations
Enumerator
a
b
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
x
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
d
e
f
g
h
i
l
m
n
p
q
r
s
t
u
v
w
x
Typedefs
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
w
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
Functions
i
m
p
s
u
Variables
Typedefs
Enumerations
Enumerator
c
d
e
f
m
o
p
r
s
t
v
Macros
_
a
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
T.hpp
Go to the documentation of this file.
1
// A minimal implementation of abstract type T
2
3
#ifndef T_HPP
4
#define T_HPP
5
6
// Include Fw/Types/Serializable.fpp from the F Prime framework
7
#include "Fw/Types/Serializable.hpp"
8
9
struct
T
:
public
Fw::Serializable
{
// Extend Fw::Serializable
10
11
// Define some shorthand for F Prime types
12
typedef
Fw::SerializeStatus
SS
;
13
typedef
Fw::SerializeBufferBase
B
;
14
15
// Define the constant SERIALIZED_SIZE
16
enum
Constants
{
SERIALIZED_SIZE
=
sizeof
(U32) };
17
18
// Provide a zero-argument constructor
19
T
() :
x
(0) { }
20
21
// Define a comparison operator
22
bool
operator==
(
const
T
& that)
const
{
return
this->
x
== that.
x
; }
23
24
// Define the virtual serialize method
25
SS
serialize
(
B
& b)
const
{
return
b.
serialize
(
x
); }
26
27
// Define the virtual deserialize method
28
SS
deserialize
(
B
& b) {
return
b.
deserialize
(
x
); }
29
30
// Provide some data
31
U32
x
;
32
33
};
34
35
#endif
Fw::SerializeBufferBase
Definition:
Serializable.hpp:43
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition:
Serializable.hpp:14
T::Constants
Constants
Definition:
T.hpp:16
Fw::SerializeBufferBase::serialize
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Definition:
Serializable.cpp:69
T::T
T()
Definition:
T.hpp:19
T::x
U32 x
Definition:
T.hpp:31
T
Definition:
T.hpp:9
Fw::Serializable
forward declaration
Definition:
Serializable.hpp:26
Fw::SerializeBufferBase::deserialize
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
Definition:
Serializable.cpp:294
T::operator==
bool operator==(const T &that) const
Definition:
T.hpp:22
T::B
Fw::SerializeBufferBase B
Definition:
T.hpp:13
T::deserialize
SS deserialize(B &b)
deserialize to contents
Definition:
T.hpp:28
T::serialize
SS serialize(B &b) const
serialize contents
Definition:
T.hpp:25
T::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Definition:
T.hpp:16
T::SS
Fw::SerializeStatus SS
Definition:
T.hpp:12
cmake-build-debug
fpp-tools
src
docs
users-guide
examples
impl-abs-type
T.hpp
Generated by
1.8.17