* nonsensically low. In case of error, both values are set to:
* -2 if the upstream bandwidth setting has already been configured.
* -3 if the UPnP plugin is not loaded or done starting up.
*/
protected BandwidthLimit detectBandwidthLimits() {
FredPluginBandwidthIndicator bwIndicator = core.node.ipDetector.getBandwidthIndicator();
if (bwIndicator == null) {
Logger.normal(this, "The node does not have a bandwidthIndicator.");
return new BandwidthLimit(-3, -3, "bandwidthDetected", false);
}
int downstreamBits = bwIndicator.getDownstreamMaxBitRate();
int upstreamBits = bwIndicator.getUpstramMaxBitRate();
Logger.normal(this, "bandwidthIndicator reports downstream " + downstreamBits + " bits/s and upstream "+upstreamBits+" bits/s.");
int downstreamBytes, upstreamBytes;
//For readability, in bits.