napa-baselibs / monl / ids.h @ 5f3adef4
History | View | Annotate | Download (3.63 KB)
1 |
/***************************************************************************
|
---|---|
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 |
#ifndef _IDS_H_
|
21 |
#define _IDS_H_
|
22 |
|
23 |
/* Measures IDs */
|
24 |
/* Add new Measure Ids here */
|
25 |
|
26 |
enum eMeasureId {
|
27 |
EXAMPLE=0,
|
28 |
HOPCOUNT, |
29 |
RX_BYTE, |
30 |
TX_BYTE, |
31 |
RX_PACKET, |
32 |
TX_PACKET, |
33 |
RX_BULK_TRANSFER, |
34 |
TX_BULK_TRANSFER, |
35 |
RTT, |
36 |
SEQWIN, |
37 |
LOSS, |
38 |
LOSS_BURST, |
39 |
CLOCKDRIFT, |
40 |
CORRECTED_DELAY, |
41 |
CAPACITY_CAPPROBE, |
42 |
AVAILABLE_BW_FORECASTER, |
43 |
GENERIC, |
44 |
LAST_ID //do not remove, must be last
|
45 |
}; |
46 |
|
47 |
/* Result IDs */
|
48 |
/* Add new Result Ids here */
|
49 |
enum eResultIdBoth {
|
50 |
R_SEQNUM = 0,
|
51 |
R_SIZE, |
52 |
R_SEND_TIME, |
53 |
R_REPLY_TIME, |
54 |
R_RECEIVE_TIME, |
55 |
R_RTT, |
56 |
R_SEQWIN, |
57 |
R_LOSS, |
58 |
R_LOSS_BURST, |
59 |
R_CLOCKDRIFT, |
60 |
R_CORRECTED_DELAY, |
61 |
R_CAPACITY_CAPPROBE, |
62 |
R_THROUGHPUT, |
63 |
R_AVAILABLE_BW_FORECASTER, |
64 |
R_LAST //do not remove, must be last
|
65 |
}; |
66 |
|
67 |
|
68 |
enum eResultIdPkt { /* Result availbale only at PKT level */ |
69 |
R_INITIAL_PKT = R_LAST - 1, //do not remove |
70 |
R_INITIAL_TTL, |
71 |
R_TTL, |
72 |
R_HOPCOUNT, |
73 |
R_DATA_ID, |
74 |
R_DATA_OFFSET, |
75 |
R_LAST_PKT //do not remove, must be last
|
76 |
}; |
77 |
|
78 |
enum eResultIdData { /* Result availbale only at DATA level */ |
79 |
R_INITIAL_DATA = R_LAST - 1, //do not remove |
80 |
R_LAST_DATA //do not remove, must be last
|
81 |
}; |
82 |
|
83 |
/* Control Messages IDS */
|
84 |
enum eControlId {
|
85 |
REMOTEMEASURERESPONSE=0,
|
86 |
INITREMOTEMEASURE, |
87 |
DEINITREMOTEMEASURE, |
88 |
OOBDATA, |
89 |
REMOTERESULTS |
90 |
}; |
91 |
|
92 |
/* Statistical types */
|
93 |
enum stat_types {
|
94 |
LAST = 0,
|
95 |
AVG, |
96 |
WIN_AVG, |
97 |
VAR, |
98 |
WIN_VAR, |
99 |
MIN, |
100 |
WIN_MIN, |
101 |
MAX, |
102 |
WIN_MAX, |
103 |
SUM, |
104 |
WIN_SUM, |
105 |
RATE, |
106 |
LAST_STAT_TYPE |
107 |
}; |
108 |
|
109 |
/* Default parameter ids */
|
110 |
enum eDefaultParam {
|
111 |
P_WINDOW_SIZE = 0,
|
112 |
P_PUBLISHING_PKT_TIME_BASED, |
113 |
P_PUBLISHING_RATE, |
114 |
P_PUBLISHING_TIME_SPREAD, |
115 |
P_PUBLISHING_NEW_ALL, |
116 |
P_INIT_NAN_ZERO, |
117 |
P_DEBUG_FILE, |
118 |
P_OOB_FREQUENCY, |
119 |
P_LAST_DEFAULT_PARAM |
120 |
}; |
121 |
|
122 |
/*
|
123 |
* Plugin Parameters
|
124 |
*/
|
125 |
/* SeqWin Plugin */
|
126 |
#define P_SEQN_WIN_SIZE P_LAST_DEFAULT_PARAM
|
127 |
#define P_SEQN_WIN_OVERFLOW_TH P_LAST_DEFAULT_PARAM+1 |
128 |
/* end Seqwin */
|
129 |
|
130 |
/* ClockDrift Plugin */
|
131 |
#define P_CLOCKDRIFT_ALGORITHM P_LAST_DEFAULT_PARAM
|
132 |
#define P_CLOCKDRIFT_PKT_TH P_LAST_DEFAULT_PARAM+1 |
133 |
#define P_CLOCKDRIFT_WIN_SIZE P_LAST_DEFAULT_PARAM+2 |
134 |
/* end ClockDrift */
|
135 |
|
136 |
/* Forecaster */
|
137 |
#define P_CAPPROBE_RATE P_LAST_DEFAULT_PARAM
|
138 |
#define P_CAPPROBE_PKT_TH P_LAST_DEFAULT_PARAM+1 |
139 |
#define P_CAPPROBE_DELAY_TH P_LAST_DEFAULT_PARAM+2 |
140 |
#define P_CAPPROBE_IPD_TH P_LAST_DEFAULT_PARAM+3 |
141 |
#define P_CAPPROBE_HEADER_SIZE P_LAST_DEFAULT_PARAM+4 |
142 |
#define P_CAPPROBE_PAYLOAD_SIZE P_LAST_DEFAULT_PARAM+5 |
143 |
#define P_CAPPROBE_FILTER P_LAST_DEFAULT_PARAM+6 |
144 |
#define P_CAPPROBE_NUM_INTERVALS P_LAST_DEFAULT_PARAM+7 |
145 |
/* end forecaster */
|
146 |
|
147 |
/* Forecaster */
|
148 |
#define P_FORECASTER_RATE P_LAST_DEFAULT_PARAM
|
149 |
#define P_FORECASTER_PKT_TH P_LAST_DEFAULT_PARAM+1 |
150 |
#define P_FORECASTER_DELAY_TH P_LAST_DEFAULT_PARAM+2 |
151 |
#define P_FORECASTER_PAYLOAD_SIZE P_LAST_DEFAULT_PARAM+3 |
152 |
#define P_FORECASTER_RELATIVE P_LAST_DEFAULT_PARAM+4 |
153 |
/* end forecaster */
|
154 |
|
155 |
#endif /* _IDS_HH_ */ |