RKH
rkhsma_prio.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 
41 /* -------------------------- Development history -------------------------- */
42 /*
43  * 2017.05.15 LeFr v2.4.05 ---
44  */
45 
46 /* -------------------------------- Authors -------------------------------- */
47 /*
48  * LeFr Leandro Francucci lf@vortexmakes.com
49  */
50 
51 /* --------------------------------- Notes --------------------------------- */
52 /* --------------------------------- Module -------------------------------- */
53 #ifndef __RKHSMA_PRIO_H__
54 #define __RKHSMA_PRIO_H__
55 
56 /* ----------------------------- Include files ----------------------------- */
57 #include "rkhtype.h"
58 
59 /* ---------------------- External C language linkage ---------------------- */
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 /* --------------------------------- Macros -------------------------------- */
69 void rkh_smaPrio_init(void);
70 
75 rbool_t rkh_smaPrio_isNotReady(void);
76 
81 rbool_t rkh_smaPrio_isReady(void);
82 
93 void rkh_smaPrio_setReady(rui8_t prio);
94 
105 void rkh_smaPrio_setUnready(rui8_t prio);
106 
119 
120 /* -------------------------------- Constants ------------------------------ */
121 /* ------------------------------- Data types ------------------------------ */
122 /* -------------------- External C language linkage end -------------------- */
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 /* ------------------------------ Module end ------------------------------- */
128 #endif
129 
130 /* ------------------------------ End of file ------------------------------ */
void rkh_smaPrio_init(void)
Initializes the native priority mechanism for active object scheduling.
void rkh_smaPrio_setUnready(rui8_t prio)
Removing an active object from the ready list.
rbool_t rkh_smaPrio_isNotReady(void)
Evaluates to true if all active objects are not ready to run.
rbool_t rkh_smaPrio_isReady(void)
Evaluates to true if any active object is ready to run.
void rkh_smaPrio_setReady(rui8_t prio)
Making an active object ready-to-run inserting it into the ready list.
rui8_t rkh_smaPrio_findHighest(void)
Finding the highest priority active object ready to run.
Defines the data types that uses RKH.