F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
Toggle main menu visibility
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
o
p
r
s
t
v
w
Variables
Typedefs
a
b
c
d
e
f
g
h
l
o
p
r
s
t
u
w
Enumerations
Enumerator
a
b
c
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
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
Typedefs
c
e
s
t
u
w
Enumerations
b
c
d
g
h
m
o
q
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Related Symbols
a
b
c
d
f
g
h
l
p
r
s
t
u
Files
File List
File Members
All
_
a
b
c
d
f
g
h
i
l
m
n
p
r
s
t
u
v
Functions
c
i
m
p
s
u
Variables
_
b
c
f
i
l
p
r
s
Typedefs
b
c
f
i
n
p
s
u
Enumerations
Enumerator
a
b
c
d
f
g
h
p
r
s
t
Macros
_
a
c
d
f
g
h
i
l
m
p
r
s
t
u
v
►
F´ Flight Software - C/C++ Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
SerializableFile.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title SerializableFile.hpp
3
// \author dinkel
4
// \brief hpp file for SerializableFile
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
#ifndef Fw_SerializableFile_HPP
14
#define Fw_SerializableFile_HPP
15
16
#include <
Fw/Types/Serializable.hpp
>
17
#include <
Fw/Types/MemAllocator.hpp
>
18
#include <
Fw/Types/SerialBuffer.hpp
>
19
20
namespace
Fw
{
21
23
class
SerializableFile
{
24
25
public
:
26
enum
Status
{
27
OP_OK
,
28
FILE_OPEN_ERROR
,
29
FILE_WRITE_ERROR
,
30
FILE_READ_ERROR
,
31
DESERIALIZATION_ERROR
32
};
26
enum
Status
{
…
};
33
34
// NOTE!: This should not be used with an allocator that can return a smaller buffer than requested
35
SerializableFile
(
MemAllocator
* allocator,
NATIVE_UINT_TYPE
maxSerializedSize);
36
~SerializableFile
();
37
38
Status
load
(
const
char
* fileName,
Serializable
& serializable);
39
Status
save
(
const
char
* fileName,
Serializable
& serializable);
40
41
PRIVATE:
42
void
reset();
43
MemAllocator
* m_allocator;
44
bool
m_recoverable;
// don't care; for allocator
45
NATIVE_UINT_TYPE
m_actualSize;
// for checking
46
SerialBuffer
m_buffer;
47
};
23
class
SerializableFile
{
…
};
48
}
49
50
#endif
NATIVE_UINT_TYPE
PlatformUIntType NATIVE_UINT_TYPE
Definition
BasicTypes.h:52
MemAllocator.hpp
Defines a base class for a memory allocator for classes.
SerialBuffer.hpp
Serializable.hpp
Fw::MemAllocator
Definition
MemAllocator.hpp:46
Fw::SerialBuffer
A variable-length serializable buffer.
Definition
SerialBuffer.hpp:26
Fw::SerializableFile
The type of a packet header.
Definition
SerializableFile.hpp:23
Fw::SerializableFile::SerializableFile
SerializableFile(MemAllocator *allocator, NATIVE_UINT_TYPE maxSerializedSize)
Definition
SerializableFile.cpp:19
Fw::SerializableFile::save
Status save(const char *fileName, Serializable &serializable)
Definition
SerializableFile.cpp:63
Fw::SerializableFile::Status
Status
Definition
SerializableFile.hpp:26
Fw::SerializableFile::OP_OK
@ OP_OK
Definition
SerializableFile.hpp:27
Fw::SerializableFile::DESERIALIZATION_ERROR
@ DESERIALIZATION_ERROR
Definition
SerializableFile.hpp:31
Fw::SerializableFile::FILE_OPEN_ERROR
@ FILE_OPEN_ERROR
Definition
SerializableFile.hpp:28
Fw::SerializableFile::FILE_WRITE_ERROR
@ FILE_WRITE_ERROR
Definition
SerializableFile.hpp:29
Fw::SerializableFile::FILE_READ_ERROR
@ FILE_READ_ERROR
Definition
SerializableFile.hpp:30
Fw::SerializableFile::load
Status load(const char *fileName, Serializable &serializable)
Definition
SerializableFile.cpp:34
Fw::SerializableFile::~SerializableFile
~SerializableFile()
Definition
SerializableFile.cpp:30
Fw::Serializable
forward declaration
Definition
Serializable.hpp:24
Fw
Definition
FppConstantsAc.hpp:98
Fw
SerializableFile
SerializableFile.hpp
Generated by
1.10.0