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
CancelPacket.cpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title CancelPacket.cpp
3
// \author bocchino
4
// \brief cpp file for FilePacket::CancelPacket
5
//
6
// \copyright
7
// Copyright 2009-2016, by the California Institute of Technology.
8
// ALL RIGHTS RESERVED. United States Government Sponsorship
9
// acknowledged.
10
//
11
// ======================================================================
12
13
#include <
Fw/FilePacket/FilePacket.hpp
>
14
#include <
Fw/Types/Assert.hpp
>
15
16
namespace
Fw
{
17
18
void
FilePacket::CancelPacket ::
19
initialize
(
const
U32 sequenceIndex)
20
{
21
this->
header
.initialize(
FilePacket::T_CANCEL
, sequenceIndex);
22
}
23
24
U32
FilePacket::CancelPacket ::
25
bufferSize
(
void
)
const
26
{
27
return
this->header.bufferSize();
28
}
29
30
SerializeStatus
FilePacket::CancelPacket ::
31
toBuffer
(
Buffer
& buffer)
const
32
{
33
SerialBuffer
serialBuffer(
34
reinterpret_cast<
U8
*
>
(buffer.
getdata
()),
35
buffer.
getsize
()
36
);
37
return
this->header.toSerialBuffer(serialBuffer);
38
}
39
40
SerializeStatus
FilePacket::CancelPacket ::
41
fromSerialBuffer(
SerialBuffer
& serialBuffer)
42
{
43
44
FW_ASSERT
(this->header.type ==
T_CANCEL
);
45
46
if
(serialBuffer.
getBuffLeft
() != 0)
47
return
FW_DESERIALIZE_SIZE_MISMATCH
;
48
49
return
FW_SERIALIZE_OK
;
50
51
}
52
53
}
Fw::SerialBuffer
A variable-length serializable buffer.
Definition:
SerialBuffer.hpp:26
Fw::Buffer::getsize
U32 getsize(void)
get member size
Definition:
BufferSerializableAc.cpp:61
Fw::FilePacket::CancelPacket::header
Header header
The packet header.
Definition:
FilePacket.hpp:266
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition:
Serializable.hpp:14
Fw::FW_DESERIALIZE_SIZE_MISMATCH
@ FW_DESERIALIZE_SIZE_MISMATCH
Data was left in in the buffer, but not enough to deserialize.
Definition:
Serializable.hpp:20
U8
uint8_t U8
8-bit unsigned integer
Definition:
BasicTypes.hpp:76
Fw::Buffer
Definition:
BufferSerializableAc.hpp:24
Fw::FilePacket::T_CANCEL
@ T_CANCEL
Definition:
FilePacket.hpp:40
Assert.hpp
Fw::FW_SERIALIZE_OK
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
Definition:
Serializable.hpp:15
Fw::SerializeBufferBase::getBuffLeft
NATIVE_UINT_TYPE getBuffLeft() const
returns how much deserialization buffer is left
Definition:
Serializable.cpp:619
Fw::Buffer::getdata
U64 getdata(void)
get member data
Definition:
BufferSerializableAc.cpp:57
FW_ASSERT
#define FW_ASSERT(...)
Definition:
Assert.hpp:9
FilePacket.hpp
Fw::FilePacket::CancelPacket::toBuffer
SerializeStatus toBuffer(Buffer &buffer) const
Convert this CancelPacket to a Buffer.
Definition:
CancelPacket.cpp:31
Fw::FilePacket::CancelPacket::initialize
void initialize(const U32 sequenceIndex)
Initialize a cancel packet.
Definition:
CancelPacket.cpp:19
Fw::FilePacket::CancelPacket::bufferSize
U32 bufferSize(void) const
Compute the buffer size needed to hold this CancelPacket.
Definition:
CancelPacket.cpp:25
Fw
Definition:
BufferGetPortAc.cpp:6
Fw
FilePacket
CancelPacket.cpp
Generated by
1.8.19