Package jmri.jmrix.can.cbus.node
Class CbusNodeStats
- java.lang.Object
-
- jmri.jmrix.can.cbus.node.CbusNodeStats
-
public class CbusNodeStats extends java.lang.Object
Class to get Node Statistics.
-
-
Constructor Summary
Constructors Constructor Description CbusNodeStats(CbusBasicNodeWithManagers node)
Create a new CbusNodeStats
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkNodeFinishedLoad()
Check if node has finished loading all available data The first time that all data is loaded, saves new backup.float
floatPercentageRemaining()
Get the amount of Node data known to JMRI in terms of percentage of total data fetch done so far.java.lang.String
getNodeNumberName()
Get Node Number and namejava.lang.String
getNodeTypeName()
Node Type Name, if available.boolean
hasLoadErrors()
int
totalNodeBytes()
Get the total bytes to transfer all data currently on moduleint
totalNodeFileBytes()
Get the total number of bytes to store in a backup fileint
totalRemainingNodeBytes()
Get the number of data bytes outstanding to fetch from a node
-
-
-
Constructor Detail
-
CbusNodeStats
public CbusNodeStats(CbusBasicNodeWithManagers node)
Create a new CbusNodeStats- Parameters:
node
- Node to provide stats for
-
-
Method Detail
-
getNodeTypeName
@Nonnull public java.lang.String getNodeTypeName()
Node Type Name, if available.- Returns:
- If Node Parameters 1 and 3 are set eg. "CANPAN", else potentially a NAME OPC return, else empty string.
-
getNodeNumberName
@Nonnull public java.lang.String getNodeNumberName()
Get Node Number and name- Returns:
- string eg "1234 UserName", no trailing space.
-
totalNodeFileBytes
public int totalNodeFileBytes()
Get the total number of bytes to store in a backup file- Returns:
- total number, else 0 if still waiting for a total number of events
-
totalNodeBytes
public int totalNodeBytes()
Get the total bytes to transfer all data currently on module- Returns:
- total number, else -1 if still waiting for a total number of events
-
totalRemainingNodeBytes
public int totalRemainingNodeBytes()
Get the number of data bytes outstanding to fetch from a node- Returns:
- total number, else -1 if still waiting for a total number of events
-
floatPercentageRemaining
public float floatPercentageRemaining()
Get the amount of Node data known to JMRI in terms of percentage of total data fetch done so far.- Returns:
- float min 0 max 1
-
checkNodeFinishedLoad
protected void checkNodeFinishedLoad()
Check if node has finished loading all available data The first time that all data is loaded, saves new backup.
-
hasLoadErrors
public boolean hasLoadErrors()
-
-