Skip to content

Commit

Permalink
Close #51, Add buildnumber and baseline
Browse files Browse the repository at this point in the history
Add macros to include build number and baseline
Add new macro for version string
Modify startup message to report version string
Add change to readme
  • Loading branch information
astrogeco committed Aug 11, 2020
1 parent d305869 commit ab534a7
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 18 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ ci_lab is a simple command uplink application that accepts CCSDS telecommand pac

## Version History

### Development Build: 2.3.0+dev36

- Add build name and build number to version reporting
- See <https://github.com/nasa/ci_lab/pull/53>

### Development Build: 2.3.5

- Replace references to `ccsds.h` types with the `cfe_sb.h`-provided type.
- See <https://github.com/nasa/ci_lab/pull/50>
- Replace references to `ccsds.h` types with the `cfe_sb.h`-provided type.
- See <https://github.com/nasa/ci_lab/pull/50>

### Development Build: 2.3.4

Expand Down
6 changes: 4 additions & 2 deletions fsw/src/ci_lab_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ void CI_LAB_TaskInit(void)

CFE_SB_InitMsg(&CI_LAB_Global.HkBuffer.HkTlm, CI_LAB_HK_TLM_MID, CI_LAB_HK_TLM_LNGTH, true);

CFE_EVS_SendEvent(CI_LAB_STARTUP_INF_EID, CFE_EVS_EventType_INFORMATION, "CI Lab Initialized. Version %d.%d.%d.%d",
CI_LAB_MAJOR_VERSION, CI_LAB_MINOR_VERSION, CI_LAB_REVISION, CI_LAB_MISSION_REV);
CFE_EVS_SendEvent (CI_LAB_STARTUP_INF_EID,
CFE_EVS_EventType_INFORMATION,
"CI Lab Initialized.%s",
CI_LAB_VERSION_STRING);

} /* End of CI_LAB_TaskInit() */

Expand Down
53 changes: 39 additions & 14 deletions fsw/src/ci_lab_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,48 @@
** See the License for the specific language governing permissions and
** limitations under the License.
**
** File: ci_lab_version.h
**
** Purpose:
** The CI Lab Application header file containing version number
**
** Notes:
**
*************************************************************************/
#ifndef _ci_lab_version_h_
#define _ci_lab_version_h_

#define CI_LAB_MAJOR_VERSION 2
#define CI_LAB_MINOR_VERSION 3
#define CI_LAB_REVISION 5
#define CI_LAB_MISSION_REV 0
/*! @file ci_lab_version.h
* @brief Purpose:
*
* The CI Lab App header file containing version information
*
*/

#ifndef CI_LAB_VERSION_H
#define CI_LAB_VERSION_H

/* Development Build Macro Definitions */

#define CI_LAB_BUILD_NUMBER 36 /*!< Development Build: Number of commits since baseline */
#define CI_LAB_BUILD_BASELINE "v2.3.0" /*!< Development Build: git tag that is the base for the current development */

/* Version Macro Definitions */

#define CI_LAB_MAJOR_VERSION 2 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define CI_LAB_MINOR_VERSION 3 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define CI_LAB_REVISION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. */
#define CI_LAB_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */

#define CI_LAB_STR_HELPER(x) #x /*!< @brief Helper function to concatenate strings from integer macros */
#define CI_LAB_STR(x) CI_LAB_STR_HELPER(x) /*!< @brief Helper function to concatenate strings from integer macros */

/*! @brief Development Build Version Number.
* @details Baseline git tag + Number of commits since baseline. @n
* See @ref cfsversions for format differences between development and release versions.
*/
#define CI_LAB_VERSION CI_LAB_BUILD_BASELINE "+dev" CI_LAB_STR(CI_LAB_BUILD_NUMBER)

/*! @brief Development Build Version String.
* @details Reports the current development build's baseline, number, and name. Also includes a note about the latest
* official version. @n See @ref cfsversions for format differences between development and release versions.
*/
#define CI_LAB_VERSION_STRING \
" CI Lab App DEVELOPMENT BUILD " CI_LAB_VERSION \
", Last Official Release: v2.3.0" /* For full support please use this version */

#endif /* _ci_lab_version_h_ */
#endif /* CI_LAB_VERSION_H */

/************************/
/* End of File Comment */
Expand Down

0 comments on commit ab534a7

Please sign in to comment.