F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
FileManager.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title FileManager.hpp
3
// \author bocchino
4
// \brief hpp file for FileManager component implementation class
5
//
6
// \copyright
7
// Copyright 2009-2015, by the California Institute of Technology.
8
// ALL RIGHTS RESERVED. United States Government Sponsorship
9
// acknowledged.
10
//
11
// ======================================================================
12
13
#ifndef Svc_FileManager_HPP
14
#define Svc_FileManager_HPP
15
16
#include "
Svc/FileManager/FileManagerComponentAc.hpp
"
17
#include "
Os/FileSystem.hpp
"
18
19
namespace
Svc
{
20
21
class
FileManager
:
22
public
FileManagerComponentBase
23
{
24
25
public
:
26
27
// ----------------------------------------------------------------------
28
// Construction, initialization, and destruction
29
// ----------------------------------------------------------------------
30
33
FileManager
(
34
const
char
*
const
compName
35
);
36
39
~FileManager
();
40
41
PRIVATE:
42
43
// ----------------------------------------------------------------------
44
// Command handler implementations
45
// ----------------------------------------------------------------------
46
49
void
CreateDirectory_cmdHandler(
50
const
FwOpcodeType
opCode,
51
const
U32 cmdSeq,
52
const
Fw::CmdStringArg
& dirName
53
);
54
57
void
RemoveFile_cmdHandler(
58
const
FwOpcodeType
opCode,
59
const
U32 cmdSeq,
60
const
Fw::CmdStringArg
& fileName,
61
const
bool
ignoreErrors
62
);
63
66
void
MoveFile_cmdHandler(
67
const
FwOpcodeType
opCode,
68
const
U32 cmdSeq,
69
const
Fw::CmdStringArg
& sourceFileName,
70
const
Fw::CmdStringArg
& destFileName
71
);
72
75
void
RemoveDirectory_cmdHandler(
76
const
FwOpcodeType
opCode,
77
const
U32 cmdSeq,
78
const
Fw::CmdStringArg
& dirName
79
);
80
83
void
ShellCommand_cmdHandler(
84
const
FwOpcodeType
opCode,
85
const
U32 cmdSeq,
86
const
Fw::CmdStringArg
& command,
87
const
Fw::CmdStringArg
& logFileName
88
);
89
92
void
AppendFile_cmdHandler(
93
const
FwOpcodeType
opCode,
94
const
U32 cmdSeq,
95
const
Fw::CmdStringArg
& source,
96
const
Fw::CmdStringArg
& target
97
);
98
101
void
FileSize_cmdHandler(
102
const
FwOpcodeType
opCode,
103
const
U32 cmdSeq,
104
const
Fw::CmdStringArg
& fileName
105
);
106
109
void
pingIn_handler(
110
const
NATIVE_INT_TYPE
portNum,
111
U32 key
112
);
113
114
PRIVATE:
115
116
// ----------------------------------------------------------------------
117
// Helper methods
118
// ----------------------------------------------------------------------
119
122
NATIVE_INT_TYPE
systemCall(
123
const
Fw::CmdStringArg
& command,
124
const
Fw::CmdStringArg
& logFileName
125
)
const
;
126
129
void
emitTelemetry(
130
const
Os::FileSystem::Status
status
131
);
132
135
void
sendCommandResponse(
136
const
FwOpcodeType
opCode,
137
const
U32 cmdSeq,
138
const
Os::FileSystem::Status
status
139
);
140
141
PRIVATE:
142
143
// ----------------------------------------------------------------------
144
// Variables
145
// ----------------------------------------------------------------------
146
149
U32 commandCount;
150
153
U32 errorCount;
154
155
156
};
157
158
}
// end namespace Svc
159
160
#endif
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition:
BasicTypes.h:55
FileManagerComponentAc.hpp
FileSystem.hpp
FwOpcodeType
U32 FwOpcodeType
Definition:
FpConfig.h:91
Fw::CmdStringArg
Definition:
CmdString.hpp:17
Os::FileSystemInterface::Status
Status
Definition:
FileSystem.hpp:24
Svc::FileManagerComponentBase
Auto-generated base for FileManager component.
Definition:
FileManagerComponentAc.hpp:36
Svc::FileManager
Definition:
FileManager.hpp:23
Svc::FileManager::~FileManager
~FileManager()
Definition:
FileManager.cpp:38
Svc::FileManager::FileManager
FileManager(const char *const compName)
Definition:
FileManager.cpp:27
Svc
Definition:
ActiveRateGroupCfg.hpp:18
Svc
FileManager
FileManager.hpp
Generated by
1.9.1