Package com.castlabs.sdk.debug.metric
Class Metric
- java.lang.Object
- 
- com.castlabs.sdk.debug.metric.Metric
 
- 
- Direct Known Subclasses:
- BandwidthMetric,- BufferAheadMetric,- BufferBehindMetric,- ChunkDownloadTimeMetric,- PlayingQualityMetric,- RateLimitMetric,- SelectedQualityMetric
 
 public abstract class Metric extends Object Abstract class that provides the required underlying infrastructure to interact with thePlayerMetricChartand provide the necessary data to it.You can create additional Metrics by extending this class. In addition to the abstract methods, you have access to the following: - 
 addTimedDataPoint(float): Main data input. Use this method to add a data point to this metric.
- dataSet: You can use this protected property to modify the underlying dataSet, right after calling the super constructor
- 
 Configuration overridable methods, replicateLastValue(),keepLastDroppedValue()andextendToRightEdge().
 - Since:
- 4.2.0
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceMetric.PlotterRepresents an object that can plot a metric.
 - 
Constructor SummaryConstructors Constructor Description Metric(int color, com.github.mikephil.charting.components.YAxis.AxisDependency axisDependency)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattach(Metric.Plotter plotter, PlayerController playerController)Attach this Metric to the given plotter and PlayerController.voiddetach()Unbind this Metric from the previously set PlayerController and Plotter.com.github.mikephil.charting.data.LineDataSetgetDataSet()Updates and returns the Data set ready to be drawn.
 
- 
- 
- 
Method Detail- 
getDataSetpublic com.github.mikephil.charting.data.LineDataSet getDataSet() Updates and returns the Data set ready to be drawn. Some other operations may happen here depending on the configuration of this Metric.- Returns:
- the LineDataSetready to be drawn onto the graph.
 
 - 
attachpublic void attach(@NonNull Metric.Plotter plotter, PlayerController playerController)Attach this Metric to the given plotter and PlayerController.- Parameters:
- plotter- plotter that will handle drawing of this Metric
- playerController- PlayerController from where to extract the metric data
 
 - 
detachpublic void detach() Unbind this Metric from the previously set PlayerController and Plotter.
 
- 
 
-