Skip to content

Commit abc9b52

Browse files
authored
PRIVATE->private and PROTECTED->protected updates in Svc/File* (#3446) (#3659)
1 parent 378a7a3 commit abc9b52

File tree

3 files changed

+44
-22
lines changed

3 files changed

+44
-22
lines changed

Svc/FileDownlink/FileDownlink.hpp

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ namespace Svc {
2626
public FileDownlinkComponentBase
2727
{
2828

29-
PRIVATE:
29+
friend class FileDownlinkTester;
30+
31+
private:
3032

3133
// ----------------------------------------------------------------------
3234
// Types
@@ -35,6 +37,8 @@ namespace Svc {
3537
//! The Mode class
3638
class Mode {
3739

40+
friend class FileDownlinkTester;
41+
3842
public:
3943

4044
//! The Mode type
@@ -74,12 +78,14 @@ namespace Svc {
7478
//! Class representing an outgoing file
7579
class File {
7680

81+
friend class FileDownlinkTester;
82+
7783
public:
7884

7985
//! Constructor
8086
File() : m_size(0) { }
8187

82-
PRIVATE:
88+
private:
8389

8490
//! The source file name
8591
Fw::LogStringArg m_sourceName;
@@ -140,6 +146,8 @@ namespace Svc {
140146
//! Class to record files sent
141147
class FilesSent {
142148

149+
friend class FileDownlinkTester;
150+
143151
public:
144152

145153
//! Construct a FilesSent object
@@ -156,7 +164,7 @@ namespace Svc {
156164
this->m_fileDownlink->tlmWrite_FilesSent(m_sent_file_count);
157165
}
158166

159-
PRIVATE:
167+
private:
160168

161169
//! The total number of file sent
162170
U32 m_sent_file_count;
@@ -169,6 +177,8 @@ namespace Svc {
169177
//! Class to record packets sent
170178
class PacketsSent {
171179

180+
friend class FileDownlinkTester;
181+
172182
public:
173183

174184
//! Construct a PacketsSent object
@@ -185,7 +195,7 @@ namespace Svc {
185195
this->m_fileDownlink->tlmWrite_PacketsSent(m_sent_packet_count);
186196
}
187197

188-
PRIVATE:
198+
private:
189199

190200
//! The total number of downlinked packets
191201
U32 m_sent_packet_count;
@@ -198,6 +208,8 @@ namespace Svc {
198208
//! Class to record warnings
199209
class Warnings {
200210

211+
friend class FileDownlinkTester;
212+
201213
public:
202214

203215
//! Construct a Warnings object
@@ -214,15 +226,15 @@ namespace Svc {
214226
//! Issue a File Read Error warning
215227
void fileRead(const Os::File::Status status);
216228

217-
PRIVATE:
229+
private:
218230

219231
//! Record a warning
220232
void warning() {
221233
++this->m_warning_count;
222234
this->m_fileDownlink->tlmWrite_Warnings(m_warning_count);
223235
}
224236

225-
PRIVATE:
237+
private:
226238

227239
//! The total number of warnings
228240
U32 m_warning_count;
@@ -287,7 +299,7 @@ namespace Svc {
287299
//!
288300
~FileDownlink();
289301

290-
PRIVATE:
302+
private:
291303

292304
// ----------------------------------------------------------------------
293305
// Handler implementations for user-defined typed input ports
@@ -327,7 +339,7 @@ namespace Svc {
327339

328340

329341

330-
PRIVATE:
342+
private:
331343

332344
// ----------------------------------------------------------------------
333345
// Command handler implementations
@@ -361,7 +373,7 @@ namespace Svc {
361373
);
362374

363375

364-
PRIVATE:
376+
private:
365377

366378
// ----------------------------------------------------------------------
367379
// Private helper methods
@@ -397,7 +409,7 @@ namespace Svc {
397409
//Send response after completing file downlink
398410
void sendResponse(SendFileStatus resp);
399411

400-
PRIVATE:
412+
private:
401413

402414
// ----------------------------------------------------------------------
403415
// Member variables

Svc/FileManager/FileManager.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Svc {
3838
//!
3939
~FileManager();
4040

41-
PRIVATE:
41+
private:
4242

4343
// ----------------------------------------------------------------------
4444
// Command handler implementations
@@ -111,7 +111,7 @@ namespace Svc {
111111
U32 key /*!< Value to return to pinger*/
112112
);
113113

114-
PRIVATE:
114+
private:
115115

116116
// ----------------------------------------------------------------------
117117
// Helper methods
@@ -138,7 +138,7 @@ namespace Svc {
138138
const Os::FileSystem::Status status //!< The status
139139
);
140140

141-
PRIVATE:
141+
private:
142142

143143
// ----------------------------------------------------------------------
144144
// Variables

Svc/FileUplink/FileUplink.hpp

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ namespace Svc {
2323
public FileUplinkComponentBase
2424
{
2525

26-
PRIVATE:
26+
friend class FileUplinkTester;
27+
28+
private:
2729

2830
// ----------------------------------------------------------------------
2931
// Types
@@ -35,6 +37,8 @@ namespace Svc {
3537
//! An object representing an incoming file
3638
class File {
3739

40+
friend class FileUplinkTester;
41+
3842
public:
3943

4044
//! The file size
@@ -46,7 +50,7 @@ namespace Svc {
4650
//! The underlying OS file
4751
Os::File osFile;
4852

49-
PRIVATE:
53+
private:
5054

5155
//! The checksum for the file
5256
::CFDP::Checksum m_checksum;
@@ -75,6 +79,8 @@ namespace Svc {
7579
//! Object to record files received
7680
class FilesReceived {
7781

82+
friend class FileUplinkTester;
83+
7884
public:
7985

8086
//! Construct a FilesReceived object
@@ -91,7 +97,7 @@ namespace Svc {
9197
this->m_fileUplink->tlmWrite_FilesReceived(m_received_files_counter);
9298
}
9399

94-
PRIVATE:
100+
private:
95101

96102
//! The total number of files received
97103
U32 m_received_files_counter;
@@ -104,6 +110,8 @@ namespace Svc {
104110
//! Object to record packets received
105111
class PacketsReceived {
106112

113+
friend class FileUplinkTester;
114+
107115
public:
108116

109117
//! Construct a PacketsReceived object
@@ -120,7 +128,7 @@ namespace Svc {
120128
this->m_fileUplink->tlmWrite_PacketsReceived(m_received_packet_count);
121129
}
122130

123-
PRIVATE:
131+
private:
124132

125133
//! The total number of received packets
126134
U32 m_received_packet_count;
@@ -133,6 +141,8 @@ namespace Svc {
133141
//! Object to record warnings
134142
class Warnings {
135143

144+
friend class FileUplinkTester;
145+
136146
public:
137147

138148
//! Construct a Warnings object
@@ -175,15 +185,15 @@ namespace Svc {
175185
const U32 read
176186
);
177187

178-
PRIVATE:
188+
private:
179189

180190
//! Record a warning
181191
void warning() {
182192
++this->m_warning_count;
183193
this->m_fileUplink->tlmWrite_Warnings(m_warning_count);
184194
}
185195

186-
PRIVATE:
196+
private:
187197

188198
//! The total number of warnings
189199
U32 m_warning_count;
@@ -209,7 +219,7 @@ namespace Svc {
209219
//!
210220
~FileUplink();
211221

212-
PRIVATE:
222+
private:
213223

214224
// ----------------------------------------------------------------------
215225
// Handler implementations for user-defined typed input ports
@@ -230,7 +240,7 @@ namespace Svc {
230240
);
231241

232242

233-
PRIVATE:
243+
private:
234244

235245
// ----------------------------------------------------------------------
236246
// Private helper functions
@@ -263,7 +273,7 @@ namespace Svc {
263273
//! Go to DATA mode
264274
void goToDataMode();
265275

266-
PRIVATE:
276+
private:
267277

268278
// ----------------------------------------------------------------------
269279
// Member variables

0 commit comments

Comments
 (0)