Naoki Shiota
Committed by Gerrit Code Review

[Falcon] Pretty print OchSignal

Change-Id: Ic0ecc88c95faf91397e132087a1ea0b1fa7295d5
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
15 */ 15 */
16 package org.onosproject.net; 16 package org.onosproject.net;
17 17
18 -import com.google.common.base.MoreObjects;
19 import com.google.common.collect.ImmutableSet; 18 import com.google.common.collect.ImmutableSet;
20 import org.onlab.util.Frequency; 19 import org.onlab.util.Frequency;
21 import org.onlab.util.Spectrum; 20 import org.onlab.util.Spectrum;
...@@ -251,11 +250,12 @@ public class OchSignal implements Lambda { ...@@ -251,11 +250,12 @@ public class OchSignal implements Lambda {
251 250
252 @Override 251 @Override
253 public String toString() { 252 public String toString() {
254 - return MoreObjects.toStringHelper(this) 253 + return String.format("%s{%+d×%.2fGHz ± %.2fGHz}",
255 - .add("gridType", gridType) 254 + this.getClass().getSimpleName(),
256 - .add("channelSpacing", channelSpacing) 255 + spacingMultiplier,
257 - .add("spacingMultiplier", spacingMultiplier) 256 + (double) slotGranularity * channelSpacing.frequency().asHz()
258 - .add("slotGranularity", slotGranularity) 257 + / Frequency.ofGHz(1).asHz(),
259 - .toString(); 258 + (double) slotGranularity * ChannelSpacing.CHL_12P5GHZ.frequency().asHz()
259 + / Frequency.ofGHz(1).asHz() / 2.0);
260 } 260 }
261 } 261 }
......