Package network_monitor_udp :: Module linktest :: Class LinkTest
[frames] | no frames]

Class LinkTest

source code

This class implements a udpmon link test. It handles communication with the udpmonsourcenode via actionlib. Feedback information (bandwidth, loss, latency) is recorded into MetricLog objects. The class has support for pre-empting a running test.

Instance Methods
 
__init__(self, name, goal, actionclient)
Builds a LinkTest object.
source code
 
start(self)
Starts the test.
source code
 
stop(self)
Stops (preempts) a running test.
source code
 
reset_statistics(self)
Resets bandwidth, latency and loss statistics.
source code
boolean
linkdown(self)
Returns: True if the link is currently down (last measured bandwidth is close to zero).
source code
 
set_custom_feedback_handler(self, custom_feedback_handler)
Sets a custom feedback handler.
source code
Instance Variables
MetricLog latency
Latency measurement log.
MetricLog loss
Packet loss measurement log.
MetricLog bandwidth
Bandwidth measurement log.
  overall_latency
Average latency over the test duration (available when test is done)
  overall_loss
Average loss over the test duration (available when test is done)
  overall_bandwidth
Average bandwidth over the test duration (available when test is done)
  overall_latency_histogram
Latency histogram of all packets received during the test (available when test is done)
  started
True if test was started
  done
True if test has finished (or was preempted succesfully)
Method Details

__init__(self, name, goal, actionclient)
(Constructor)

source code 

Builds a LinkTest object. The test will not be active until explicitly started with the start function.

Parameters:
  • name (string) - test name (used for logging information)
  • goal (LinktestGoal) - the goal object describing the link test
  • actionclient (actionlib.ActionClient) - the action client object

linkdown(self)

source code 
Returns: boolean
True if the link is currently down (last measured bandwidth is close to zero).

set_custom_feedback_handler(self, custom_feedback_handler)

source code 

Sets a custom feedback handler.

Parameters:
  • custom_feedback_handler (func(GoalHandle, LinktestFeedback))