RKH
Loading...
Searching...
No Matches
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 site: http://vortexmakes.com/que-es/
28 * RKH GitHub: https://github.com/vortexmakes/RKH
29 * RKH Sourceforge: https://sourceforge.net/projects/rkh-reactivesys/
30 * e-mail: lf@vortexmakes.com
31 * ---------------------------------------------------------------------------
32 */
33
40/* -------------------------- Development history -------------------------- */
41/*
42 * 2017.17.05 LeFr v2.4.05 Initial version
43 */
44
45/* -------------------------------- Authors -------------------------------- */
46/*
47 * LeFr Leandro Francucci lf@vortexmakes.com
48 */
49
50/* --------------------------------- Notes --------------------------------- */
51/* --------------------------------- Module -------------------------------- */
52#ifndef __RKHFWK_MODULE_H__
53#define __RKHFWK_MODULE_H__
54
55/* ----------------------------- Include files ----------------------------- */
56#include "rkhtype.h"
57#include "rkhcfg.h"
58
59/* ---------------------- External C language linkage ---------------------- */
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64/* --------------------------------- Macros -------------------------------- */
73#define RKH_MODULE_VERSION(__fname, __version) \
74 static RKHROM char *const m_version = # __version;
75
80#define RKH_MODULE_GET_VERSION() \
81 ((const char *)m_version);
82
91#define RKH_MODULE_DESC(__fname, __desc) \
92 static RKHROM char *const m_desc = __desc;
93
98#define RKH_MODULE_GET_DESC() \
99 ((const char *)m_desc)
100
101#if RKH_CFG_FWK_ASSERT_EN == RKH_ENABLED
111 #define RKH_MODULE_NAME(__fname) \
112 static RKHROM char *const m_name = # __fname;
113
121 #define RKH_THIS_MODULE \
122 static RKHROM char *const m_name = __FILE__;
123
130 #define RKH_MODULE_GET_NAME() m_name
131
132#else
133 #define RKH_MODULE_NAME(__fname)
134 #define RKH_THIS_MODULE
135#endif
136
137/* -------------------------------- Constants ------------------------------ */
138/* ------------------------------- Data types ------------------------------ */
139/* -------------------------- External variables --------------------------- */
140/* -------------------------- Function prototypes -------------------------- */
141/* -------------------- External C language linkage end -------------------- */
142#ifdef __cplusplus
143}
144#endif
145
146/* ------------------------------ Module end ------------------------------- */
147#endif
148
149/* ------------------------------ End of file ------------------------------ */
RKH user configurations.
Defines the data types that uses RKH.