F´ Flight Software - C/C++ Documentation
NASA-v1.5.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
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
g
h
i
m
r
s
t
v
w
Variables
Typedefs
Enumerations
Enumerator
a
b
c
f
h
i
l
m
n
o
p
s
t
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
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
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
c
t
u
w
Enumerations
b
c
d
e
f
g
h
i
m
o
p
q
s
t
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
w
Related Functions
a
b
c
f
g
h
l
p
r
s
t
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
w
Functions
f
i
m
s
u
Variables
_
c
f
i
l
p
t
Typedefs
Enumerations
Enumerator
a
c
d
f
i
m
p
r
s
t
w
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
BufferSerializableAc.hpp
Go to the documentation of this file.
1
/*
2
* Buffer.hpp
3
*
4
* Created on: Wednesday, 14 October 2020
5
* Author: mstarch
6
*
7
*/
8
#ifndef BUFFER_HPP_
9
#define BUFFER_HPP_
10
11
#include <
Fw/Types/BasicTypes.hpp
>
12
#include <
Fw/Types/Serializable.hpp
>
13
#if FW_SERIALIZABLE_TO_STRING
14
#include <
Fw/Types/StringType.hpp
>
15
#include <stdio.h>
// snprintf
16
#ifdef BUILD_UT
17
#include <iostream>
18
#include <
Fw/Types/EightyCharString.hpp
>
19
#endif
20
#endif
21
22
namespace
Fw
{
23
24
class
Buffer
:
public
Fw::Serializable
{
25
26
27
public
:
28
29
enum
{
30
SERIALIZED_SIZE
=
31
sizeof
(U32) +
32
sizeof
(U32) +
33
sizeof
(
U64
) +
34
sizeof
(U32)
35
};
36
37
Buffer
(
void
);
38
Buffer
(
const
Buffer
* src);
39
Buffer
(
const
Buffer
& src);
40
Buffer
(U32 managerID, U32 bufferID,
U64
data, U32 size);
41
const
Buffer
&
operator=
(
const
Buffer
& src);
42
bool
operator==
(
const
Buffer
& src)
const
;
43
#ifdef BUILD_UT
44
// to support GoogleTest framework in unit tests
45
friend
std::ostream& operator<<(std::ostream& os,
const
Buffer
& obj);
46
#endif
47
48
void
set
(U32 managerID, U32 bufferID,
U64
data, U32 size);
49
50
U32
getmanagerID
(
void
);
51
U32
getbufferID
(
void
);
52
U64
getdata
(
void
);
53
U32
getsize
(
void
);
54
55
void
setmanagerID
(U32 val);
56
void
setbufferID
(U32 val);
57
void
setdata
(
U64
val);
58
void
setsize
(U32 val);
59
60
61
Fw::SerializeStatus
serialize
(
Fw::SerializeBufferBase
& buffer)
const
;
62
Fw::SerializeStatus
deserialize
(
Fw::SerializeBufferBase
& buffer);
63
#if FW_SERIALIZABLE_TO_STRING || BUILD_UT
64
void
toString(
Fw::StringBase
& text)
const
;
65
#endif
66
protected
:
67
68
enum
{
69
TYPE_ID
= 0xA4583D9C
70
};
71
72
U32
m_managerID
;
//<! managerID - The ID of the buffer manager that allocated this buffer
73
U32
m_bufferID
;
//<! bufferID - The ID of this buffer
74
U64
m_data
;
//<! data - A pointer to the data
75
U32
m_size
;
//<! size - The data size in bytes
76
private
:
77
78
};
79
}
// end namespace Fw
80
#endif
/* BUFFER_HPP_ */
81
StringType.hpp
Declares ISF string base class.
Fw::Buffer::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Definition:
BufferSerializableAc.hpp:30
Fw::Buffer::setsize
void setsize(U32 val)
set member size
Definition:
BufferSerializableAc.cpp:74
Fw::Buffer::getsize
U32 getsize(void)
get member size
Definition:
BufferSerializableAc.cpp:61
Fw::Buffer::setdata
void setdata(U64 val)
set member data
Definition:
BufferSerializableAc.cpp:71
Fw::SerializeBufferBase
Definition:
Serializable.hpp:43
Fw::Buffer::operator=
const Buffer & operator=(const Buffer &src)
equal operator
Definition:
BufferSerializableAc.cpp:28
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition:
Serializable.hpp:14
Serializable.hpp
Fw::Buffer::m_bufferID
U32 m_bufferID
Definition:
BufferSerializableAc.hpp:73
Fw::StringBase
Definition:
StringType.hpp:23
Fw::Buffer
Definition:
BufferSerializableAc.hpp:24
Fw::Buffer::set
void set(U32 managerID, U32 bufferID, U64 data, U32 size)
set values
Definition:
BufferSerializableAc.cpp:42
Fw::Serializable
forward declaration
Definition:
Serializable.hpp:26
U64
#define U64(C)
Definition:
sha.h:176
Fw::Buffer::getdata
U64 getdata(void)
get member data
Definition:
BufferSerializableAc.cpp:57
EightyCharString.hpp
Fw::Buffer::m_managerID
U32 m_managerID
Definition:
BufferSerializableAc.hpp:72
Fw::Buffer::setbufferID
void setbufferID(U32 val)
set member bufferID
Definition:
BufferSerializableAc.cpp:68
Fw::Buffer::m_data
U64 m_data
Definition:
BufferSerializableAc.hpp:74
Fw::Buffer::TYPE_ID
@ TYPE_ID
type id
Definition:
BufferSerializableAc.hpp:69
Fw::Buffer::serialize
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
serialization function
Definition:
BufferSerializableAc.cpp:77
Fw::Buffer::getmanagerID
U32 getmanagerID(void)
get member managerID
Definition:
BufferSerializableAc.cpp:49
BasicTypes.hpp
Declares ISF basic types.
Fw::Buffer::operator==
bool operator==(const Buffer &src) const
equality operator
Definition:
BufferSerializableAc.cpp:33
Fw::Buffer::m_size
U32 m_size
Definition:
BufferSerializableAc.hpp:75
Fw::Buffer::setmanagerID
void setmanagerID(U32 val)
set member managerID
Definition:
BufferSerializableAc.cpp:65
Fw::Buffer::Buffer
Buffer(void)
Default constructor.
Definition:
BufferSerializableAc.cpp:11
Fw::Buffer::deserialize
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
deserialization function
Definition:
BufferSerializableAc.cpp:104
Fw
Definition:
BufferGetPortAc.cpp:6
Fw::Buffer::getbufferID
U32 getbufferID(void)
get member bufferID
Definition:
BufferSerializableAc.cpp:53
build-fprime-automatic-native
F-Prime
Fw
Buffer
BufferSerializableAc.hpp
Generated by
1.8.19