Class CbusParameters


  • public class CbusParameters
    extends java.lang.Object
    CBUS Node parameters
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int[] paramData  
      protected boolean valid  
    • Constructor Summary

      Constructors 
      Constructor Description
      CbusParameters()
      Create blank parameters
      CbusParameters​(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 parameters
      int getParam​(int i)
      Get a parameter
      void setParam​(int i, int v)
      Set a parameter
      void setValid​(boolean s)
      Set parameter valid status
      java.lang.String toString()
      Return String representation of CBUS parameters
      boolean validate​(CbusParameters fp, CbusParameters hp)
      Valid parameter block in a hex file by comparing against one read from hardware (or some other source)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • 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 set
        v - 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 file
        hp - 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 class java.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