]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/blob - src_frescan/frescan_servers_replenishments.h
Do not enter unnecessary subdirectories
[frescor/frsh-forb.git] / src_frescan / frescan_servers_replenishments.h
1 /*!
2  * @file frescan_servers_replenishments.h
3  *
4  * @brief the replenishment data and thread for the servers
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 the thread that waits for server's replenishment
16  * timer signals and perform the necessary replenishments.
17  *
18  * @license
19  *
20 //----------------------------------------------------------------------
21 //  Copyright (C) 2006 - 2009 by the FRESCOR consortium:
22 //
23 //    Universidad de Cantabria,              SPAIN
24 //    University of York,                    UK
25 //    Scuola Superiore Sant'Anna,            ITALY
26 //    Kaiserslautern University,             GERMANY
27 //    Univ. Politecnica  Valencia,           SPAIN
28 //    Czech Technical University in Prague,  CZECH REPUBLIC
29 //    ENEA                                   SWEDEN
30 //    Thales Communication S.A.              FRANCE
31 //    Visual Tools S.A.                      SPAIN
32 //    Rapita Systems Ltd                     UK
33 //    Evidence                               ITALY
34 //
35 //    See http://www.frescor.org
36 //
37 //        The 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
40 //        made of this code.
41 //
42 //
43 //  based on previous work (FSF) done in the FIRST project
44 //
45 //   Copyright (C) 2005  Mälardalen University, SWEDEN
46 //                       Scuola Superiore S.Anna, ITALY
47 //                       Universidad de Cantabria, SPAIN
48 //                       University of York, UK
49 //
50 // This file is part of FNA (Frescor Network Adaptation)
51 //
52 // FNA is free software; you can redistribute it and/or modify it
53 // under terms of the GNU General Public License as published by the
54 // Free Software Foundation; either version 2, or (at your option) any
55 // later version.  FNA is distributed in the hope that it will be
56 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
57 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
58 // General Public License for more details. You should have received a
59 // copy of the GNU General Public License along with FNA; see file
60 // COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
61 // Cambridge, MA 02139, USA.
62 //
63 // As a special exception, including FNA header files in a file,
64 // instantiating FNA generics or templates, or linking other files
65 // with FNA objects to produce an executable application, does not
66 // by itself cause the resulting executable application to be covered
67 // by the GNU General Public License. This exception does not
68 // however invalidate any other reasons why the executable file might be
69 // covered by the GNU Public License.
70 // -----------------------------------------------------------------------
71  *
72  */
73
74 #ifndef _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_
75 #define _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_
76
77 #include "frescan_types.h"
78
79 /**
80  * frescan_replenishments_init - init the replenishment structures and thread
81  *
82  * @net: the network instance
83  *
84  * Initialize the repl_op pool, set the mask for the timer signals and create
85  * the thread that will await for those signals and replenish the appropiate
86  * sporadic server.
87  *
88  * NOTE: it must be called from the MAIN because it sets the signal mask
89  */
90
91 extern int frescan_replenishments_init(frescan_network_t net);
92
93 extern frescan_repl_op_t *frescan_repl_op_alloc();
94
95 extern int frescan_repl_op_free(frescan_repl_op_t *repl_op);
96
97 /**
98  * frescan_replenishment_program - set a replenishment operation
99  *
100  * @net: the network instance
101  * @ss: the server
102  * @timestamp: timestamp
103  */
104
105 extern int frescan_replenishment_program(frescan_network_t net,
106                                          frescan_ss_t id,
107                                          const struct timespec *timestamp);
108
109 #endif // _MARTE_FRESCAN_SERVERS_REPLENISHMENTS_H_