GNUnet  0.20.0
testbed_api_sd.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2008--2013 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
27 #ifndef TESTBED_API_SD_H
28 #define TESTBED_API_SD_H
29 
30 
34 struct SDHandle;
35 
36 
43 struct SDHandle *
44 GNUNET_TESTBED_SD_init_ (unsigned int max_cnt);
45 
46 
52 void
54 
55 
62 void
63 GNUNET_TESTBED_SD_add_data_ (struct SDHandle *h, unsigned int amount);
64 
65 
76 int
77 GNUNET_TESTBED_SD_deviation_factor_ (struct SDHandle *h, unsigned int amount,
78  int *factor);
79 
80 #endif
81 /* end of testbed_api.h */
static struct GNUNET_ARM_Handle * h
Connection with ARM.
Definition: gnunet-arm.c:99
Opaque handle for calculating SD.
unsigned int max_cnt
max number of entries we can have in the DLL
int GNUNET_TESTBED_SD_deviation_factor_(struct SDHandle *h, unsigned int amount, int *factor)
Returns the factor by which the given amount differs from the standard deviation.
struct SDHandle * GNUNET_TESTBED_SD_init_(unsigned int max_cnt)
Initialize standard deviation calculation handle.
void GNUNET_TESTBED_SD_destroy_(struct SDHandle *h)
Frees the memory allocated to the SD handle.
void GNUNET_TESTBED_SD_add_data_(struct SDHandle *h, unsigned int amount)
Add a reading to SD.