Class CMRInetMetricsData
- java.lang.Object
-
- jmri.jmrix.cmri.serial.cmrinetmetrics.CMRInetMetricsData
-
public class CMRInetMetricsData extends java.lang.Object
CMRInet metric data variables and access methods. The metric data is not persistent between runs.
-
-
Field Summary
Fields Modifier and Type Field Description static int
_CODELINE
static int
_DGACK
CMRInet packet typesstatic int
_DGREAD
static int
_DGWRITE
static int
_EOT
static int
_INIT
static int
_POLL
static int
_QUERY
static int
_READ
static int
_TRANSMIT
int[]
CMRInetMetricDataCount
static int
CMRInetMetricDataLAST
static java.lang.String[]
CMRInetMetricDataName
Data array for network data countsint[]
CMRInetMetricErrCount
static int
CMRInetMetricErrLAST
static java.lang.String[]
CMRInetMetricErrName
Data items for network error countsstatic int
CMRInetMetricInitMsgs
static int
CMRInetMetricPollResponse
static int
CMRInetMetricTimeout
static int
CMRInetMetricTruncRecv
static int
CMRInetMetricTruncReply
static int
CMRInetMetricUnrecCommand
static int
CMRInetMetricUnrecResponse
int
pollCnt
int
pollCntMax
int
pollIntervalMS
long
pollTicks
Variables used for poll/response measurements
-
Constructor Summary
Constructors Constructor Description CMRInetMetricsData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAllDataMetrics()
void
clearAllErrMetrics()
void
computePollInterval()
Compute the poll/reply interval in milliseconds Average over pollCnt polls to keep the Tablemodel update rate lowint
getMetricDataValue(int metricName)
Get the metric value.int
getMetricErrorCount(int metricName)
int
getMetricErrValue(int metricName)
Get the error count.void
incMetricDataValue(int metricName)
void
incMetricErrValue(int metricName)
void
setMetricDataValue(int metricName, int value)
void
setMetricErrorValue(int metricName, int value)
void
setMetricErrValue(int metricName, int value)
void
startPollIntervalTimer()
Methods to manage the poll/response metric Start the poll timer when a poll message is seenvoid
zeroMetricDataValue(int metricName)
void
zeroMetricErrValue(int metricName)
-
-
-
Field Detail
-
_DGACK
public static int _DGACK
CMRInet packet types
-
_CODELINE
public static int _CODELINE
-
_DGREAD
public static int _DGREAD
-
_EOT
public static int _EOT
-
_INIT
public static int _INIT
-
_POLL
public static int _POLL
-
_QUERY
public static int _QUERY
-
_READ
public static int _READ
-
_TRANSMIT
public static int _TRANSMIT
-
_DGWRITE
public static int _DGWRITE
-
CMRInetMetricErrName
public static final java.lang.String[] CMRInetMetricErrName
Data items for network error counts
-
CMRInetMetricTimeout
public static final int CMRInetMetricTimeout
- See Also:
- Constant Field Values
-
CMRInetMetricTruncRecv
public static final int CMRInetMetricTruncRecv
- See Also:
- Constant Field Values
-
CMRInetMetricTruncReply
public static final int CMRInetMetricTruncReply
- See Also:
- Constant Field Values
-
CMRInetMetricUnrecResponse
public static final int CMRInetMetricUnrecResponse
- See Also:
- Constant Field Values
-
CMRInetMetricUnrecCommand
public static final int CMRInetMetricUnrecCommand
- See Also:
- Constant Field Values
-
CMRInetMetricErrLAST
public static final int CMRInetMetricErrLAST
- See Also:
- Constant Field Values
-
CMRInetMetricErrCount
public int[] CMRInetMetricErrCount
-
CMRInetMetricDataName
public static final java.lang.String[] CMRInetMetricDataName
Data array for network data counts
-
CMRInetMetricPollResponse
public static int CMRInetMetricPollResponse
-
CMRInetMetricInitMsgs
public static int CMRInetMetricInitMsgs
-
CMRInetMetricDataLAST
public static int CMRInetMetricDataLAST
-
CMRInetMetricDataCount
public int[] CMRInetMetricDataCount
-
pollTicks
public long pollTicks
Variables used for poll/response measurements
-
pollIntervalMS
public int pollIntervalMS
-
pollCnt
public int pollCnt
-
pollCntMax
public int pollCntMax
-
-
Constructor Detail
-
CMRInetMetricsData
public CMRInetMetricsData()
-
-
Method Detail
-
getMetricErrValue
public int getMetricErrValue(int metricName)
Get the error count.- Parameters:
metricName
- metric index.- Returns:
- error count.
-
setMetricErrValue
public void setMetricErrValue(int metricName, int value)
-
incMetricErrValue
public void incMetricErrValue(int metricName)
-
zeroMetricErrValue
public void zeroMetricErrValue(int metricName)
-
clearAllErrMetrics
public void clearAllErrMetrics()
-
getMetricErrorCount
public int getMetricErrorCount(int metricName)
-
getMetricDataValue
public int getMetricDataValue(int metricName)
Get the metric value.- Parameters:
metricName
- index.- Returns:
- data value.
-
setMetricDataValue
public void setMetricDataValue(int metricName, int value)
-
incMetricDataValue
public void incMetricDataValue(int metricName)
-
zeroMetricDataValue
public void zeroMetricDataValue(int metricName)
-
setMetricErrorValue
public void setMetricErrorValue(int metricName, int value)
-
clearAllDataMetrics
public void clearAllDataMetrics()
-
startPollIntervalTimer
public void startPollIntervalTimer()
Methods to manage the poll/response metric Start the poll timer when a poll message is seen
-
computePollInterval
public void computePollInterval()
Compute the poll/reply interval in milliseconds Average over pollCnt polls to keep the Tablemodel update rate low
-
-