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
a
b
c
d
e
f
h
l
o
p
r
s
t
w
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
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
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
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
DataBuffer.cpp
Go to the documentation of this file.
1
#include <
Drv/DataTypes/DataBuffer.hpp
>
2
#include <
Fw/Types/Assert.hpp
>
3
4
namespace
Drv
{
5
6
DataBuffer::DataBuffer
(
const
U8
*args,
NATIVE_UINT_TYPE
size) {
7
Fw::SerializeStatus
stat =
Fw::SerializeBufferBase::setBuff
(args,size);
8
FW_ASSERT
(
Fw::FW_SERIALIZE_OK
== stat,
static_cast<
NATIVE_INT_TYPE
>
(stat));
9
}
10
11
DataBuffer::DataBuffer
() {
12
}
13
14
DataBuffer::~DataBuffer
() {
15
}
16
17
DataBuffer::DataBuffer
(
const
DataBuffer
& other) :
Fw
::SerializeBufferBase() {
18
Fw::SerializeStatus
stat =
Fw::SerializeBufferBase::setBuff
(other.m_data,other.
getBuffLength
());
19
FW_ASSERT
(
Fw::FW_SERIALIZE_OK
== stat,
static_cast<
NATIVE_INT_TYPE
>
(stat));
20
}
21
22
DataBuffer
&
DataBuffer::operator=
(
const
DataBuffer
& other) {
23
if
(
this
== &other) {
24
return
*
this
;
25
}
26
27
Fw::SerializeStatus
stat =
Fw::SerializeBufferBase::setBuff
(other.m_data,other.
getBuffLength
());
28
FW_ASSERT
(
Fw::FW_SERIALIZE_OK
== stat,
static_cast<
NATIVE_INT_TYPE
>
(stat));
29
return
*
this
;
30
}
31
32
NATIVE_UINT_TYPE
DataBuffer::getBuffCapacity
()
const
{
33
return
sizeof
(this->m_data);
34
}
35
36
const
U8
*
DataBuffer::getBuffAddr
()
const
{
37
return
this->m_data;
38
}
39
40
U8
*
DataBuffer::getBuffAddr
() {
41
return
this->m_data;
42
}
43
44
}
Drv::DataBuffer
Definition:
DataBuffer.hpp:9
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition:
Serializable.hpp:14
U8
uint8_t U8
8-bit unsigned integer
Definition:
BasicTypes.hpp:76
Drv::DataBuffer::DataBuffer
DataBuffer()
Definition:
DataBuffer.cpp:11
Drv
Definition:
BlockDriver.hpp:11
Assert.hpp
Fw::FW_SERIALIZE_OK
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
Definition:
Serializable.hpp:15
Drv::DataBuffer::operator=
DataBuffer & operator=(const DataBuffer &other)
Definition:
DataBuffer.cpp:22
Drv::DataBuffer::getBuffCapacity
NATIVE_UINT_TYPE getBuffCapacity() const
returns capacity, not current size, of buffer
Definition:
DataBuffer.cpp:32
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition:
BasicTypes.hpp:30
Drv::DataBuffer::getBuffAddr
U8 * getBuffAddr()
gets buffer address for data filling
Definition:
DataBuffer.cpp:36
Drv::DataBuffer::~DataBuffer
virtual ~DataBuffer()
Definition:
DataBuffer.cpp:14
FW_ASSERT
#define FW_ASSERT(...)
Definition:
Assert.hpp:8
Fw::SerializeBufferBase::getBuffLength
NATIVE_UINT_TYPE getBuffLength() const
returns current buffer size
Definition:
Serializable.cpp:591
Fw::SerializeBufferBase::setBuff
SerializeStatus setBuff(const U8 *src, NATIVE_UINT_TYPE length)
sets buffer contents and size
Definition:
Serializable.cpp:595
DataBuffer.hpp
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition:
BasicTypes.hpp:29
Fw
Definition:
Buffer.cpp:21
Drv
DataTypes
DataBuffer.cpp
Generated by
1.8.17