|
|
This class implements a round trip time pinger.
|
Constructor.
Parameters:
ping4socket | Socket for IPv4 pings. |
ping6socket | Socket for IPv6 pings. |
delay | Maximum delay between two pings in microseconds. |
~ |
Destructor.
inline bool |
[const]
Check, if RoundTripTimePinger is ready.
Returns: true, if RoundTripTimePinger is ready; false otherwise.
inline cardinal |
Get number of hosts in RoundTripTimePinger.
Returns: Number of hosts.
inline double |
Get constant alpha: RTT = alpha * oldValue + (1 - alpha) * newValue.
Returns: alpha.
inline void |
Set constant alpha: RTT = alpha * oldValue + (1 - alpha) * newValue.
Parameters:
alpha | Alpha. |
inline card64 |
Get maximum delay between two pings in microseconds.
Returns: Delay in microseconds.
inline void |
Set maximum delay between two pings in microseconds.
Parameters:
delay | Delay in microseconds. |
cardinal |
Get round trip time for given host and traffic class.
Parameters:
trafficClass | Traffic class. |
Returns: Round trip time in microseconds; -1 for hosts not in list or unreachable.
bool |
Add host to RoundTripTimePinger list.
Parameters:
address | Host address. |
trafficClass | Traffic class. |
Returns: true, if host has been added; false otherwise (duplicate).
void |
Remove host from RoundTripTimePinger list.
Parameters:
address | Host address. |
trafficClass | Traffic class. |
void |
Activate logger. Very important: Logging will be deactivated by addHost() and removeHost() calls!
Parameters:
scriptStream | Script output stream. |
dataStream | Data output stream. |
dataName | Data file name (for GNUplot's plot command). |
void |
Deactivate logger.
inline bool |
[const]
Check, if logger is running.
void |
Write GNUplot header. Very important: This header will become invalid when calling addHost() or removeHost()!
Parameters:
os | Output stream. |
dataName | Name of data file. |
void |
Write GNUplot data line.
Parameters:
os | Output stream. |
friend ostream& |
Friend output operator.
static const cardinal |
Maximum round trip time in microseconds.
static const double |
Unreachable Factor: Assume current round trip time to be diff = now - host.LastEchoTimeStamp, if diff > MinUnreachableAsumption (for OS delay) or diff > UnreachableFactor * MaxRawRoundTripTime (for real network delay).
static const card64 |
MinUnreachableAsumption: Assume current round trip time to be diff = now - host.LastEchoTimeStamp, if diff > MinUnreachableAsumption (for OS delay) or diff > UnreachableFactor * MaxRawRoundTripTime (for real network delay).