F´ Flight Software - C/C++ Documentation
NASA-v2.0.1
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
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
b
d
e
f
g
h
i
l
m
n
p
q
s
t
u
v
w
Typedefs
Enumerations
Enumerator
a
b
c
d
e
f
g
h
l
m
n
o
p
q
r
s
t
w
Related Functions
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
k
l
m
n
p
r
s
t
u
v
Functions
f
i
m
s
u
Variables
Typedefs
Enumerations
Enumerator
c
d
f
m
p
r
s
t
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
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:24
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
Fw::Buffer::getData
U8 * getData() const
Definition:
Buffer.cpp:56
Fw::Buffer
Definition:
Buffer.hpp:43
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:614
Fw::Buffer::getSize
U32 getSize() const
Definition:
Buffer.cpp:60
FW_ASSERT
#define FW_ASSERT(...)
Definition:
Assert.hpp:9
Fw::FilePacket::CancelPacket::toBuffer
SerializeStatus toBuffer(Buffer &buffer) const
Convert this CancelPacket to a Buffer.
Definition:
CancelPacket.cpp:31
FilePacket.hpp
Fw::FilePacket::CancelPacket::initialize
void initialize(const U32 sequenceIndex)
Initialize a cancel packet.
Definition:
CancelPacket.cpp:19
Fw::FilePacket::Header::type
Type type
The packet type.
Definition:
FilePacket.hpp:90
Fw::FilePacket::CancelPacket::bufferSize
U32 bufferSize(void) const
Compute the buffer size needed to hold this CancelPacket.
Definition:
CancelPacket.cpp:25
Fw
Definition:
Buffer.cpp:21
Fw
FilePacket
CancelPacket.cpp
Generated by
1.8.17