Class CbusParameters
- java.lang.Object
-
- jmri.jmrix.can.cbus.swing.bootloader.CbusParameters
-
public class CbusParameters extends java.lang.Object
CBUS Node parameters
-
-
Constructor Summary
Constructors Constructor Description CbusParameters()
Create blank parametersCbusParameters(byte[] d)
Create parameters from byte []
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areValid()
Are the parameters valid?int
getLoadAddress()
Return the load address which is stored in little endian order in four parametersint
getParam(int i)
Get a parametervoid
setParam(int i, int v)
Set a parametervoid
setValid(boolean s)
Set parameter valid statusjava.lang.String
toString()
Return String representation of CBUS parametersboolean
validate(CbusParameters fp, CbusParameters hp)
Valid parameter block in a hex file by comparing against one read from hardware (or some other source)
-
-
-
Constructor Detail
-
CbusParameters
public CbusParameters()
Create blank parameters
-
CbusParameters
public CbusParameters(byte[] d)
Create parameters from byte []- Parameters:
d
- byte [] array
-
-
Method Detail
-
getParam
public int getParam(int i)
Get a parameter- Parameters:
i
- index of parameter to get- Returns:
- parameter value
-
setParam
public void setParam(int i, int v)
Set a parameter- Parameters:
i
- index of the parameter to setv
- value for the parameter
-
validate
public boolean validate(CbusParameters fp, CbusParameters hp)
Valid parameter block in a hex file by comparing against one read from hardware (or some other source)- Parameters:
fp
- Parameters from hex filehp
- parameters to validate against- Returns:
- true if parameter blocks match
-
getLoadAddress
public int getLoadAddress()
Return the load address which is stored in little endian order in four parameters- Returns:
- the load address
-
toString
public java.lang.String toString()
Return String representation of CBUS parameters- Overrides:
toString
in classjava.lang.Object
- Returns:
- String
-
areValid
public boolean areValid()
Are the parameters valid?- Returns:
- true if valid
-
setValid
public void setValid(boolean s)
Set parameter valid status- Parameters:
s
- true or false valid status
-
-