Skip to content

Commit dbed84b

Browse files
committed
Fix #142, scrub header guards
Use a consistent header guard on all sample app header files. Also convert file-scope block comments to doxygen format.
1 parent dac28c0 commit dbed84b

9 files changed

+89
-117
lines changed

fsw/mission_inc/sample_app_perfids.h

+10-14
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,17 @@
1818
** See the License for the specific language governing permissions and
1919
** limitations under the License.
2020
**
21-
** File: sample_app_perfids.h
22-
**
23-
** Purpose:
24-
** Define Sample App Performance IDs
25-
**
26-
** Notes:
27-
**
2821
*************************************************************************/
29-
#ifndef _sample_app_perfids_h_
30-
#define _sample_app_perfids_h_
3122

32-
#define SAMPLE_APP_PERF_ID 91
23+
/**
24+
* @file
25+
*
26+
* Define Sample App Performance IDs
27+
*/
28+
29+
#ifndef SAMPLE_APP_PERFIDS_H
30+
#define SAMPLE_APP_PERFIDS_H
3331

34-
#endif /* _sample_app_perfids_h_ */
32+
#define SAMPLE_APP_PERF_ID 91
3533

36-
/************************/
37-
/* End of File Comment */
38-
/************************/
34+
#endif /* SAMPLE_APP_PERFIDS_H */

fsw/platform_inc/sample_app_msgids.h

+11-17
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,23 @@
1818
** See the License for the specific language governing permissions and
1919
** limitations under the License.
2020
**
21-
** File: sample_app_msgids.h
22-
**
23-
** Purpose:
24-
** Define Sample App Message IDs
25-
**
26-
** Notes:
27-
** Message ID bits relate to the message header based on which version
28-
** of the message id implementation is being used
29-
**
3021
*************************************************************************/
31-
#ifndef _sample_app_msgids_h_
32-
#define _sample_app_msgids_h_
3322

34-
/* The Sample App assumes default configuration which uses V1 of message id implementation */
23+
/**
24+
* @file
25+
*
26+
* Define Sample App Message IDs
27+
*
28+
* \note The Sample App assumes default configuration which uses V1 of message id implementation
29+
*/
30+
31+
#ifndef SAMPLE_APP_MSGIDS_H
32+
#define SAMPLE_APP_MSGIDS_H
3533

3634
/* V1 Command Message IDs must be 0x18xx */
3735
#define SAMPLE_APP_CMD_MID 0x1882
3836
#define SAMPLE_APP_SEND_HK_MID 0x1883
3937
/* V1 Telemetry Message IDs must be 0x08xx */
4038
#define SAMPLE_APP_HK_TLM_MID 0x0883
4139

42-
#endif /* _sample_app_msgids_h_ */
43-
44-
/************************/
45-
/* End of File Comment */
46-
/************************/
40+
#endif /* SAMPLE_APP_MSGIDS_H */

fsw/platform_inc/sample_app_table.h

+10-15
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@
1818
** See the License for the specific language governing permissions and
1919
** limitations under the License.
2020
**
21-
** File: sample_app_table.h
22-
**
23-
** Purpose:
24-
** Define sample app table
25-
**
26-
** Notes:
27-
**
28-
**
2921
*******************************************************************************/
30-
#ifndef _sample_app_table_h_
31-
#define _sample_app_table_h_
22+
23+
/**
24+
* @file
25+
*
26+
* Define sample app table
27+
*/
28+
29+
#ifndef SAMPLE_APP_TABLE_H
30+
#define SAMPLE_APP_TABLE_H
3231

3332
/*
3433
** Table structure
@@ -40,8 +39,4 @@ typedef struct
4039

4140
} SAMPLE_APP_Table_t;
4241

43-
#endif /* _sample_app_table_h_ */
44-
45-
/************************/
46-
/* End of File Comment */
47-
/************************/
42+
#endif /* SAMPLE_APP_TABLE_H */

fsw/src/sample_app.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
** See the License for the specific language governing permissions and
1919
** limitations under the License.
2020
**
21-
** File: sample_app.h
22-
**
23-
** Purpose:
24-
** This file is main hdr file for the SAMPLE application.
25-
**
26-
**
2721
*******************************************************************************/
2822

29-
#ifndef _sample_app_h_
30-
#define _sample_app_h_
23+
/**
24+
* @file
25+
*
26+
* Main header file for the SAMPLE application
27+
*/
28+
29+
#ifndef SAMPLE_APP_H
30+
#define SAMPLE_APP_H
3131

3232
/*
3333
** Required header files.
@@ -115,4 +115,4 @@ int32 SAMPLE_APP_TblValidationFunc(void *TblData);
115115

116116
bool SAMPLE_APP_VerifyCmdLength(CFE_MSG_Message_t *MsgPtr, size_t ExpectedLength);
117117

118-
#endif /* _sample_app_h_ */
118+
#endif /* SAMPLE_APP_H */

fsw/src/sample_app_events.h

+10-14
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
** See the License for the specific language governing permissions and
1919
** limitations under the License.
2020
**
21-
** File: sample_app_events.h
22-
**
23-
** Purpose:
24-
** Define SAMPLE App Events IDs
25-
**
26-
** Notes:
27-
**
2821
*************************************************************************/
29-
#ifndef _sample_app_events_h_
30-
#define _sample_app_events_h_
22+
23+
/**
24+
* @file
25+
*
26+
* Define SAMPLE App Events IDs
27+
*/
28+
29+
#ifndef SAMPLE_APP_EVENTS_H
30+
#define SAMPLE_APP_EVENTS_H
3131

3232
#define SAMPLE_APP_RESERVED_EID 0
3333
#define SAMPLE_APP_STARTUP_INF_EID 1
@@ -40,8 +40,4 @@
4040

4141
#define SAMPLE_APP_EVENT_COUNTS 7
4242

43-
#endif /* _sample_app_events_h_ */
44-
45-
/************************/
46-
/* End of File Comment */
47-
/************************/
43+
#endif /* SAMPLE_APP_EVENTS_H */

fsw/src/sample_app_msg.h

+10-15
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@
1818
** See the License for the specific language governing permissions and
1919
** limitations under the License.
2020
**
21-
** File: sample_app_msg.h
22-
**
23-
** Purpose:
24-
** Define SAMPLE App Messages and info
25-
**
26-
** Notes:
27-
**
28-
**
2921
*******************************************************************************/
30-
#ifndef _sample_app_msg_h_
31-
#define _sample_app_msg_h_
22+
23+
/**
24+
* @file
25+
*
26+
* Define SAMPLE App Messages and info
27+
*/
28+
29+
#ifndef SAMPLE_APP_MSG_H
30+
#define SAMPLE_APP_MSG_H
3231

3332
/*
3433
** SAMPLE App command codes
@@ -76,8 +75,4 @@ typedef struct
7675
SAMPLE_APP_HkTlm_Payload_t Payload; /**< \brief Telemetry payload */
7776
} SAMPLE_APP_HkTlm_t;
7877

79-
#endif /* _sample_app_msg_h_ */
80-
81-
/************************/
82-
/* End of File Comment */
83-
/************************/
78+
#endif /* SAMPLE_APP_MSG_H */

fsw/src/sample_app_version.h

+2-7
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
**
2121
*************************************************************************/
2222

23-
/*! @file sample_app_version.h
24-
* @brief Purpose:
23+
/**
24+
* @file
2525
*
2626
* The Sample App header file containing version information
27-
*
2827
*/
2928

3029
#ifndef SAMPLE_APP_VERSION_H
@@ -62,7 +61,3 @@
6261
", Last Official Release: v1.1.0" /* For full support please use this version */
6362

6463
#endif /* SAMPLE_APP_VERSION_H */
65-
66-
/************************/
67-
/* End of File Comment */
68-
/************************/

unit-test/coveragetest/sample_app_coveragetest_common.h

+8-9
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@
1818
** limitations under the License.
1919
*/
2020

21-
/*
22-
** File: sample_app_coveragetest_common.h
23-
**
24-
** Purpose:
25-
** Common definitions for all sample_app coverage tests
26-
*/
21+
/**
22+
* @file
23+
*
24+
* Common definitions for all sample_app coverage tests
25+
*/
2726

28-
#ifndef _SAMPLE_APP_COVERAGETEST_COMMON_H_
29-
#define _SAMPLE_APP_COVERAGETEST_COMMON_H_
27+
#ifndef SAMPLE_APP_COVERAGETEST_COMMON_H
28+
#define SAMPLE_APP_COVERAGETEST_COMMON_H
3029

3130
/*
3231
* Includes
@@ -66,4 +65,4 @@ void Sample_UT_Setup(void);
6665
*/
6766
void Sample_UT_TearDown(void);
6867

69-
#endif
68+
#endif /* SAMPLE_APP_COVERAGETEST_COMMON_H */

unit-test/inc/ut_sample_app.h

+19-17
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,24 @@
1818
** limitations under the License.
1919
*/
2020

21-
/*
22-
** File: ut_sample_app.h
23-
**
24-
** Purpose:
25-
** Extra scaffolding functions for the sample_app unit test
26-
**
27-
** Notes:
28-
** This is an extra UT-specific extern declaration
29-
** to obtain access to an internal data structure
30-
**
31-
** UT often needs to modify internal data structures in ways that
32-
** actual applications never would (bypassing the normal API) in
33-
** order to exercise or set up for off-nominal cases.
34-
*/
35-
#ifndef _UT_SAMPLE_APP_H_
36-
#define _UT_SAMPLE_APP_H_
21+
/**
22+
* @file
23+
*
24+
*
25+
* Purpose:
26+
* Extra scaffolding functions for the sample_app unit test
27+
*
28+
* Notes:
29+
* This is an extra UT-specific extern declaration
30+
* to obtain access to an internal data structure
31+
*
32+
* UT often needs to modify internal data structures in ways that
33+
* actual applications never would (bypassing the normal API) in
34+
* order to exercise or set up for off-nominal cases.
35+
*/
36+
37+
#ifndef UT_SAMPLE_APP_H
38+
#define UT_SAMPLE_APP_H
3739

3840
/*
3941
* Necessary to include these here to get the definition of the
@@ -47,4 +49,4 @@
4749
*/
4850
extern SAMPLE_APP_Data_t SAMPLE_APP_Data;
4951

50-
#endif /* _UT_SAMPLE_APP_H_ */
52+
#endif /* UT_SAMPLE_APP_H */

0 commit comments

Comments
 (0)