2 * @file frecan_config.h
4 * @brief constants to configure the frescan protocol
15 * This module contains some constants and macros to configure the
16 * frescan protocol. For example, the size of the packets pool, etc...
20 * -----------------------------------------------------------------------
21 * Copyright (C) 2006 - 2008 FRESCOR consortium partners:
23 * Universidad de Cantabria, SPAIN
24 * University of York, UK
25 * Scuola Superiore Sant'Anna, ITALY
26 * Kaiserslautern University, GERMANY
27 * Univ. Politécnica Valencia, SPAIN
28 * Czech Technical University in Prague, CZECH REPUBLIC
30 * Thales Communication S.A. FRANCE
31 * Visual Tools S.A. SPAIN
32 * Rapita Systems Ltd UK
35 * See http://www.frescor.org for a link to partners' websites
37 * FRESCOR project (FP6/2005/IST/5-034026) is funded
38 * in part by the European Union Sixth Framework Programme
39 * The European Union is not liable of any use that may be
42 * This file is part of FRESCAN
44 * FRESCAN is free software; you can redistribute it and/or modify
45 * it under the terms of the GNU General Public License as published by
46 * the Free Software Foundation; either version 2, or (at your option)
49 * FRESCAN is distributed in the hope that it will be useful, but
50 * WITHOUT ANY WARRANTY; without even the implied warranty of
51 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
52 * General Public License for more details.
54 * You should have received a copy of the GNU General Public License
55 * distributed with FRESCAN; see file COPYING. If not, write to the
56 * Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
59 * As a special exception, including FRESCAN header files in a file,
60 * instantiating FRESCAN generics or templates, or linking other files
61 * with FRESCAN objects to produce an executable application, does not
62 * by itself cause the resulting executable application to be covered
63 * by the GNU General Public License. This exception does not
64 * however invalidate any other reasons why the executable file might be
65 * covered by the GNU Public License.
66 * -----------------------------------------------------------------------
70 #ifndef _MARTE_FRESCAN_CONFIG_H_
71 #define _MARTE_FRESCAN_CONFIG_H_
73 #include "fosa_threads_and_signals.h" // FOSA_SIGNAL_MIN
74 #include <sys/kernel.h> // kernel_enter_critic_section
76 #define FRESCAN_MX_PACKETS 200
77 #define FRESCAN_MX_NETWORKS 2
78 #define FRESCAN_BROADCAST_ADDR 0xF
79 #define FRESCAN_MX_IDS 255
80 #define FRESCAN_MX_PRIOS 32
81 #define FRESCAN_REPL_SIGNAL_NUM FOSA_SIGNAL_MIN + 10 // real-time signal
82 #define FRESCAN_BACKGROUND_PRIO 0
83 #define FRESCAN_MX_REPLY_OBJECTS 40
84 #define FRESCAN_REPL_THREAD_PRIO 60
85 #define FRESCAN_NEG_THREAD_PRIO 50
86 #define FRESCAN_MX_REQUESTS 40
87 #define FRESCAN_NEG_MASTER_NODE 0
88 #define FRESCAN_REPLY_OBJECTS_MX_CEILING 90
89 #define FRESCAN_REQUESTS_MX_CEILING 90
90 #define FRESCAN_BWRES_MX_PRIO 60
91 #define FRESCAN_ACCEPTOR_THREAD_PRIO FRESCAN_NEG_THREAD_PRIO - 1
92 #define FRESCAN_BWRES_NEG_MESSAGES_PRIO 8
93 #define FRESCAN_NEG_CHANNEL 0
94 #define FRESCAN_MX_NODES 2
95 #define FRESCAN_MX_CONTRACTS (FRESCAN_MX_NODES*FRESCAN_MX_IDS)
96 #define FRESCAN_MX_REPL_OPS FRESCAN_MX_IDS*10
98 #define FRESCAN_FRAME_TX_TIME_US 200 // measured transmission time of an 8byte frame
100 #define FRESCAN_MLOCK_T unsigned
101 #define FRESCAN_CREATE_LOCK(l)
102 #define FRESCAN_DESTROY_LOCK(l)
103 #define FRESCAN_ACQUIRE_LOCK(l) kernel_enter_critic_section(l)
104 #define FRESCAN_RELEASE_LOCK(l) kernel_leave_critic_section(*(l))
106 #endif // _MARTE_FRESCAN_CONFIG_H_