]> rtime.felk.cvut.cz Git - frescor/fna.git/blobdiff - src_frescan/frescan_config.h
Unified header for FNA
[frescor/fna.git] / src_frescan / frescan_config.h
index 12a72e5ec44a55a450f1f06699acbadfe2a7e287..ef7723738a7f2fb68bee5632d4122701d36f964a 100644 (file)
  *
  * @license
  *
- * -----------------------------------------------------------------------
- *  Copyright (C) 2006 - 2008 FRESCOR consortium partners:
- *
- *    Universidad de Cantabria,              SPAIN
- *    University of York,                    UK
- *    Scuola Superiore Sant'Anna,            ITALY
- *    Kaiserslautern University,             GERMANY
- *    Univ. Politécnica  Valencia,           SPAIN
- *    Czech Technical University in Prague,  CZECH REPUBLIC
- *    ENEA                                   SWEDEN
- *    Thales Communication S.A.              FRANCE
- *    Visual Tools S.A.                      SPAIN
- *    Rapita Systems Ltd                     UK
- *    Evidence                               ITALY
- *
- *    See http://www.frescor.org for a link to partners' websites
- *
- *           FRESCOR project (FP6/2005/IST/5-034026) is funded
- *        in part by the European Union Sixth Framework Programme
- *        The European Union is not liable of any use that may be
- *        made of this code.
- *
- *  This file is part of FRESCAN
- *
- *  FRESCAN is free software; you can  redistribute it and/or  modify
- *  it under the terms of  the GNU General Public License as published by
- *  the Free Software Foundation;  either  version 2, or (at  your option)
- *  any later version.
- *
- *  FRESCAN  is distributed  in  the hope  that  it  will  be useful,  but
- *  WITHOUT  ANY  WARRANTY;     without  even the   implied   warranty  of
- *  MERCHANTABILITY  or  FITNESS FOR  A  PARTICULAR PURPOSE. See  the  GNU
- *  General Public License for more details.
- *
- *  You should have  received a  copy of  the  GNU  General Public License
- *  distributed  with  FRESCAN;  see file COPYING.   If not,  write to the
- *  Free Software  Foundation,  59 Temple Place  -  Suite 330,  Boston, MA
- *  02111-1307, USA.
- *
- * As a special exception, including FRESCAN header files in a file,
- * instantiating FRESCAN generics or templates, or linking other files
- * with FRESCAN objects to produce an executable application, does not
- * by itself cause the resulting executable application to be covered
- * by the GNU General Public License. This exception does not
- * however invalidate any other reasons why the executable file might be
- * covered by the GNU Public License.
- * -----------------------------------------------------------------------
+//----------------------------------------------------------------------
+//  Copyright (C) 2006 - 2009 by the FRESCOR consortium:
+//
+//    Universidad de Cantabria,              SPAIN
+//    University of York,                    UK
+//    Scuola Superiore Sant'Anna,            ITALY
+//    Kaiserslautern University,             GERMANY
+//    Univ. Politecnica  Valencia,           SPAIN
+//    Czech Technical University in Prague,  CZECH REPUBLIC
+//    ENEA                                   SWEDEN
+//    Thales Communication S.A.              FRANCE
+//    Visual Tools S.A.                      SPAIN
+//    Rapita Systems Ltd                     UK
+//    Evidence                               ITALY
+//
+//    See http://www.frescor.org
+//
+//        The FRESCOR project (FP6/2005/IST/5-034026) is funded
+//        in part by the European Union Sixth Framework Programme
+//        The European Union is not liable of any use that may be
+//        made of this code.
+//
+//
+//  based on previous work (FSF) done in the FIRST project
+//
+//   Copyright (C) 2005  Mälardalen University, SWEDEN
+//                       Scuola Superiore S.Anna, ITALY
+//                       Universidad de Cantabria, SPAIN
+//                       University of York, UK
+//
+// This file is part of FNA (Frescor Network Adaptation)
+//
+// FNA is free software; you can redistribute it and/or modify it
+// under terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option) any
+// later version.  FNA is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details. You should have received a
+// copy of the GNU General Public License along with FNA; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
+//
+// As a special exception, including FNA header files in a file,
+// instantiating FNA generics or templates, or linking other files
+// with FNA objects to produce an executable application, does not
+// by itself cause the resulting executable application to be covered
+// by the GNU General Public License. This exception does not
+// however invalidate any other reasons why the executable file might be
+// covered by the GNU Public License.
+// -----------------------------------------------------------------------
  *
  */
 
 #define FRESCAN_BROADCAST_ADDR    0xF
 #define FRESCAN_MX_IDS            255
 #define FRESCAN_MX_PRIOS          32
-#define FRESCAN_REPL_SIGNAL_NUM   FOSA_SIGNAL_MIN + 10 // real-time signal
 #define FRESCAN_BACKGROUND_PRIO   0
-#define FRESCAN_MX_REPLY_OBJECTS  40
+#define FRESCAN_REPL_SIGNAL_NUM   FOSA_SIGNAL_MIN + 10 // real-time signal
 #define FRESCAN_REPL_THREAD_PRIO  60
-#define FRESCAN_NEG_THREAD_PRIO   50
-#define FRESCAN_MX_REQUESTS       40
-#define FRESCAN_NEG_MASTER_NODE   0
-#define FRESCAN_REPLY_OBJECTS_MX_CEILING 90
-#define FRESCAN_REQUESTS_MX_CEILING 90
-#define FRESCAN_BWRES_MX_PRIO     60
-#define FRESCAN_ACCEPTOR_THREAD_PRIO FRESCAN_NEG_THREAD_PRIO - 1
-#define FRESCAN_BWRES_NEG_MESSAGES_PRIO 8
-#define FRESCAN_NEG_CHANNEL       0
-#define FRESCAN_MX_NODES          2
-#define FRESCAN_MX_CONTRACTS      (FRESCAN_MX_NODES*FRESCAN_MX_IDS)
+#define FRESCAN_MX_NODES          4
 #define FRESCAN_MX_REPL_OPS       FRESCAN_MX_IDS*10
-#define FRESCAN_FRAME_TX_TIME     0.000200  // measured transmission time of an 8byte frame
+
+// Configuration values for FRESCAN_BWRES
+#define FRESCAN_BWRES_MX_REPLY_OBJECTS  40
+#define FRESCAN_BWRES_MX_REQUESTS       40
+#define FRESCAN_BWRES_MASTER_NODE       0
+#define FRESCAN_BWRES_ROBJS_MX_CEILING  90
+#define FRESCAN_BWRES_REQ_MX_CEILING    90
+#define FRESCAN_BWRES_MX_PRIO           60
+#define FRESCAN_BWRES_NEG_THREAD_PRIO   50
+#define FRESCAN_BWRES_ACCEPTOR_PRIO     FRESCAN_BWRES_NEG_THREAD_PRIO - 1
+#define FRESCAN_BWRES_NEG_MSG_PRIO      4
+#define FRESCAN_BWRES_NEG_MSG_BUDGET    5 // packets
+#define FRESCAN_BWRES_NEG_MSG_PERIOD    1000000 // us
+#define FRESCAN_BWRES_NEG_MSG_CHAN      0
+#define FRESCAN_BWRES_MX_CONTRACTS      (FRESCAN_MX_NODES*FRESCAN_MX_IDS)
+#define FRESCAN_BWRES_MAX_GROUP_OPS     5
+#define FRESCAN_BWRES_SS_MIN_PRIO       1
+#define FRESCAN_BWRES_SS_MAX_PRIO       FRESCAN_MX_PRIOS
+
+// Configuration values for FRESCAN_BWRES_FNA
+#define FRESCAN_BWRES_FNA_NET_BASE      0
+#define FRESCAN_BWRES_FNA_LOCAL_NODE    3
+#define FRESCAN_BWRES_TX_FP_MX_PRIO     10
+#define FRESCAN_BWRES_RX_NUM_CHANNELS   10
+#define FRESCAN_BWRES_RX_CHAN_MX_PRIO   NULL
+
+// FRESCAN_FRAME_TX_TIME_US: measured transmission time of an 8byte frame
+#define FRESCAN_FRAME_TX_TIME_US        200
 
 #define FRESCAN_MLOCK_T            unsigned
 #define FRESCAN_CREATE_LOCK(l)