RKH
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rkhfwk_module.h
Go to the documentation of this file.
1 /*
2  * --------------------------------------------------------------------------
3  *
4  * Framework RKH
5  * -------------
6  *
7  * State-machine framework for reactive embedded systems
8  *
9  * Copyright (C) 2010 Leandro Francucci.
10  * All rights reserved. Protected by international copyright laws.
11  *
12  *
13  * RKH is free software: you can redistribute it and/or modify it under the
14  * terms of the GNU General Public License as published by the Free Software
15  * Foundation, either version 3 of the License, or (at your option) any
16  * later version.
17  *
18  * RKH is distributed in the hope that it will be useful, but WITHOUT ANY
19  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
21  * more details.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with RKH, see copying.txt file.
25  *
26  * Contact information:
27  * RKH web site: http://sourceforge.net/projects/rkh-reactivesys/
28  * e-mail: francuccilea@gmail.com
29  * ---------------------------------------------------------------------------
30  */
31 
38 /* -------------------------- Development history -------------------------- */
39 /*
40  * 2017.17.05 LeFr v2.4.05 Initial version
41  */
42 
43 /* -------------------------------- Authors -------------------------------- */
44 /*
45  * LeFr Leandro Francucci francuccilea@gmail.com
46  */
47 
48 /* --------------------------------- Notes --------------------------------- */
49 /* --------------------------------- Module -------------------------------- */
50 #ifndef __RKHFWK_MODULE_H__
51 #define __RKHFWK_MODULE_H__
52 
53 /* ----------------------------- Include files ----------------------------- */
54 #include "rkhtype.h"
55 #include "rkhcfg.h"
56 
57 /* ---------------------- External C language linkage ---------------------- */
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
62 /* --------------------------------- Macros -------------------------------- */
71 #define RKH_MODULE_VERSION(__fname, __version) \
72  static RKHROM char *const m_version = # __version;
73 
78 #define RKH_MODULE_GET_VERSION() \
79  ((const char *)m_version);
80 
89 #define RKH_MODULE_DESC(__fname, __desc) \
90  static RKHROM char *const m_desc = __desc;
91 
96 #define RKH_MODULE_GET_DESC() \
97  ((const char *)m_desc)
98 
99 #if RKH_CFG_FWK_ASSERT_EN == RKH_ENABLED
100 
109  #define RKH_MODULE_NAME(__fname) \
110  static RKHROM char *const m_name = # __fname;
111 
119  #define RKH_THIS_MODULE \
120  static RKHROM char *const m_name = __FILE__;
121 
122 #else
123  #define RKH_MODULE_NAME(__fname)
124  #define RKH_THIS_MODULE
125 #endif
126 
127 /* -------------------------------- Constants ------------------------------ */
128 /* ------------------------------- Data types ------------------------------ */
129 /* -------------------------- External variables --------------------------- */
130 /* -------------------------- Function prototypes -------------------------- */
131 /* -------------------- External C language linkage end -------------------- */
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 /* ------------------------------ Module end ------------------------------- */
137 #endif
138 
139 /* ------------------------------ End of file ------------------------------ */
RKH user configurations.
Defines the data types that uses RKH.