Robot Control Library
version.h
Go to the documentation of this file.
1 /**
2  * @headerfile version.h <rc/version.h>
3  *
4  * @brief macros and functions for getting the current version of librobotcontrol
5  *
6  * @author James Strawson
7  * @date 2/8/2018
8  *
9  * @addtogroup version
10  * @{
11  */
12 
13 #ifndef RC_VERSION_H
14 #define RC_VERSION_H
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 
21 #define RC_LIB_VERSION_MAJOR 1
22 #define RC_LIB_VERSION_MINOR 0
23 #define RC_LIB_VERSION_PATCH 5
24 #define RC_LIB_VERSION_HEX ((RC_LIB_VERSION_MAJOR << 16) | \
25  (RC_LIB_VERSION_MINOR << 8) | \
26  (RC_LIB_VERSION_PATCH))
27 
28 
29 /**
30  * @brief get an integer representation of the library version
31  *
32  * 8 bits are used for each component, with the patch number stored in the 8
33  * least significant bits. E.g. for version 1.2.3 this would be 0x010203.
34  *
35  * @return integer representation of the library version
36  */
37 unsigned int rc_version(void);
38 
39 
40 /**
41  * @brief gets a string representation of the current library version.
42  *
43  * @return const char* string
44  */
45 const char* rc_version_string(void);
46 
47 
48 /**
49  * @brief prints a string representation of the current library version to
50  * stdout with no trailing newline character.
51  */
52 void rc_version_print(void);
53 
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif //RC_VERSION_H
60 
61 /** @} end group version*/
void rc_version_print(void)
prints a string representation of the current library version to stdout with no trailing newline char...
const char * rc_version_string(void)
gets a string representation of the current library version.
unsigned int rc_version(void)
get an integer representation of the library version