Statistics
| Branch: | Revision:

napa-baselibs / monl / measure_manager.cpp @ d1e0f2ca

History | View | Annotate | Download (2.53 KB)

1 956892f0 ArpadBakay
/***************************************************************************
2
 *   Copyright (C) 2009 by Robert Birke
3
 *   robert.birke@polito.it
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Lesser General Public
7
 * License as published by the Free Software Foundation; either
8
 * version 2.1 of the License, or (at your option) any later version.
9

10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 * Lesser General Public License for more details.
14

15
 * You should have received a copy of the GNU Lesser General Public
16
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA 
18
 ***********************************************************************/
19
20
#include "measure_manager.h"
21
#include "string.h"
22
23
//Start of plugins
24
#include "plugins/example_measure.h"
25
#include "plugins/hopcount_measure.h"
26
#include "plugins/rtt_measure.h"
27
#include "plugins/seqwin_measure.h"
28
#include "plugins/loss_measure.h"
29
#include "plugins/loss_burst_measure.h"
30
#include "plugins/forecaster_measure.h"
31
#include "plugins/capprobe_measure.h"
32
#include "plugins/clockdrift_measure.h"
33
#include "plugins/corrected_delay_measure.h"
34
#include "plugins/counter_measure.h"
35
#include "plugins/byte_measure.h"
36
#include "plugins/generic_measure.h"
37
#include "plugins/bulktransfer_measure.h"
38
//End of plugins
39
40
int MeasureManager::loadMeasurePlugins() {
41
        /* Load all measures. You need to add new measures here *
42
         */
43
        loadMeasurePlugin(new ExampleMeasurePlugin);
44
        loadMeasurePlugin(new HopcountMeasurePlugin);
45
        loadMeasurePlugin(new RttMeasurePlugin);
46
        loadMeasurePlugin(new SeqWinMeasurePlugin);
47
        loadMeasurePlugin(new LossMeasurePlugin);
48
        loadMeasurePlugin(new LossBurstMeasurePlugin);
49
        loadMeasurePlugin(new ForecasterMeasurePlugin);
50
        loadMeasurePlugin(new CapprobeMeasurePlugin);
51
        loadMeasurePlugin(new ClockdriftMeasurePlugin);
52
        loadMeasurePlugin(new CorrecteddelayMeasurePlugin);
53
        loadMeasurePlugin(new ByteMeasurePlugin);
54
        loadMeasurePlugin(new CounterMeasurePlugin);
55
        loadMeasurePlugin(new GenericMeasurePlugin);
56
        loadMeasurePlugin(new BulktransferMeasurePlugin);
57
        return EOK;
58
};
59
60
int MeasureManager::monSetPeerName(char *pn) {
61
        int s;        
62
        if(pn == NULL)
63
                return -EINVAL;
64
65
        if(*peer_name != NULL)
66
                delete [] *peer_name;
67
68
        s = strlen(pn)+1; //include '\0'
69
        *peer_name = new char[s];
70
        memcpy(*peer_name, pn, s);
71
};