F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
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
void
init
(
40
const
NATIVE_INT_TYPE
queueDepth,
41
const
NATIVE_INT_TYPE
instance
42
);
43
46
~FileManager
();
47
48
PRIVATE:
49
50
// ----------------------------------------------------------------------
51
// Command handler implementations
52
// ----------------------------------------------------------------------
53
56
void
CreateDirectory_cmdHandler(
57
const
FwOpcodeType
opCode,
58
const
U32 cmdSeq,
59
const
Fw::CmdStringArg
& dirName
60
);
61
64
void
RemoveFile_cmdHandler(
65
const
FwOpcodeType
opCode,
66
const
U32 cmdSeq,
67
const
Fw::CmdStringArg
& fileName,
68
const
bool
ignoreErrors
69
);
70
73
void
MoveFile_cmdHandler(
74
const
FwOpcodeType
opCode,
75
const
U32 cmdSeq,
76
const
Fw::CmdStringArg
& sourceFileName,
77
const
Fw::CmdStringArg
& destFileName
78
);
79
82
void
RemoveDirectory_cmdHandler(
83
const
FwOpcodeType
opCode,
84
const
U32 cmdSeq,
85
const
Fw::CmdStringArg
& dirName
86
);
87
90
void
ShellCommand_cmdHandler(
91
const
FwOpcodeType
opCode,
92
const
U32 cmdSeq,
93
const
Fw::CmdStringArg
& command,
94
const
Fw::CmdStringArg
& logFileName
95
);
96
99
void
AppendFile_cmdHandler(
100
const
FwOpcodeType
opCode,
101
const
U32 cmdSeq,
102
const
Fw::CmdStringArg
& source,
103
const
Fw::CmdStringArg
& target
104
);
105
108
void
FileSize_cmdHandler(
109
const
FwOpcodeType
opCode,
110
const
U32 cmdSeq,
111
const
Fw::CmdStringArg
& fileName
112
);
113
116
void
pingIn_handler(
117
const
NATIVE_INT_TYPE
portNum,
118
U32 key
119
);
120
121
PRIVATE:
122
123
// ----------------------------------------------------------------------
124
// Helper methods
125
// ----------------------------------------------------------------------
126
129
NATIVE_INT_TYPE
systemCall(
130
const
Fw::CmdStringArg
& command,
131
const
Fw::CmdStringArg
& logFileName
132
)
const
;
133
136
void
emitTelemetry(
137
const
Os::FileSystem::Status
status
138
);
139
142
void
sendCommandResponse(
143
const
FwOpcodeType
opCode,
144
const
U32 cmdSeq,
145
const
Os::FileSystem::Status
status
146
);
147
148
PRIVATE:
149
150
// ----------------------------------------------------------------------
151
// Variables
152
// ----------------------------------------------------------------------
153
156
U32 commandCount;
157
160
U32 errorCount;
161
162
163
};
164
165
}
// end namespace Svc
166
167
#endif
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition
BasicTypes.h:51
FileSystem.hpp
FwOpcodeType
U32 FwOpcodeType
Definition
FpConfig.h:56
Fw::CmdStringArg
Definition
CmdString.hpp:10
Svc::FileManager
Definition
FileManager.hpp:23
Svc::FileManager::~FileManager
~FileManager()
Definition
FileManager.cpp:47
Svc::FileManager::init
void init(const NATIVE_INT_TYPE queueDepth, const NATIVE_INT_TYPE instance)
Definition
FileManager.cpp:38
Os::FileSystem::Status
Status
Definition
FileSystem.hpp:14
Svc
Definition
ActiveRateGroupCfg.hpp:18
Svc
FileManager
FileManager.hpp
Generated by
1.9.7