F´ Flight Software - C/C++ Documentation
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
17#include "Os/FileSystem.hpp"
18
19namespace Svc {
20
23 {
24
25 public:
26
27 // ----------------------------------------------------------------------
28 // Construction, initialization, and destruction
29 // ----------------------------------------------------------------------
30
34 const char *const compName
35 );
36
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
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:55
U32 FwOpcodeType
Definition FpConfig.h:91
Auto-generated base for FileManager component.