]> rtime.felk.cvut.cz Git - frescor/fna.git/blob - src_frescan/frescan_config.h
error in mapping function corrected using ceil... packets constant moved to config...
[frescor/fna.git] / src_frescan / frescan_config.h
1 /*!
2  * @file frecan_config.h
3  *
4  * @brief constants to configure the frescan protocol
5  *
6  * @version 0.01
7  *
8  * @date 12-Mar-2008
9  *
10  * @author
11  *      Daniel Sangorrin
12  *
13  * @comments
14  *
15  * This module contains some constants and macros to configure the
16  * frescan protocol. For example, the size of the packets pool, etc...
17  *
18  * @license
19  *
20  * See MaRTE OS license
21  *
22  */
23
24 #ifndef _MARTE_FRESCAN_CONFIG_H_
25 #define _MARTE_FRESCAN_CONFIG_H_
26
27 #include "fosa_threads_and_signals.h" // FOSA_SIGNAL_MIN
28 #include <sys/kernel.h>  // kernel_enter_critic_section
29
30 #define FRESCAN_MX_PACKETS        200
31 #define FRESCAN_MX_NETWORKS       2
32 #define FRESCAN_BROADCAST_ADDR    0xF
33 #define FRESCAN_MX_IDS            255
34 #define FRESCAN_MX_PRIOS          32
35 #define FRESCAN_REPL_SIGNAL_NUM   FOSA_SIGNAL_MIN + 10 // real-time signal
36 #define FRESCAN_BACKGROUND_PRIO   0
37 #define FRESCAN_MX_REPLY_OBJECTS  40
38 #define FRESCAN_REPL_THREAD_PRIO  60
39 #define FRESCAN_NEG_THREAD_PRIO   50
40 #define FRESCAN_MX_REQUESTS       40
41 #define FRESCAN_NEG_MASTER_NODE   0
42 #define FRESCAN_REPLY_OBJECTS_MX_CEILING 90
43 #define FRESCAN_REQUESTS_MX_CEILING 90
44 #define FRESCAN_BWRES_MX_PRIO     60
45 #define FRESCAN_ACCEPTOR_THREAD_PRIO FRESCAN_NEG_THREAD_PRIO - 1
46 #define FRESCAN_BWRES_NEG_MESSAGES_PRIO 8
47 #define FRESCAN_NEG_CHANNEL       0
48 #define FRESCAN_MX_NODES          2
49 #define FRESCAN_MX_CONTRACTS      (FRESCAN_MX_NODES*FRESCAN_MX_IDS)
50 #define FRESCAN_MX_REPL_OPS       FRESCAN_MX_IDS*10
51 #define FRESCAN_FRAME_TX_TIME     0.000200  // measured transmission time of an 8byte frame
52
53 #define FRESCAN_MLOCK_T            unsigned
54 #define FRESCAN_CREATE_LOCK(l)
55 #define FRESCAN_DESTROY_LOCK(l)
56 #define FRESCAN_ACQUIRE_LOCK(l)    kernel_enter_critic_section(l)
57 #define FRESCAN_RELEASE_LOCK(l)    kernel_leave_critic_section(*(l))
58
59 #endif // _MARTE_FRESCAN_CONFIG_H_