Class CbusEventDataElements

  • Direct Known Subclasses:
    CbusEvent

    public class CbusEventDataElements
    extends java.lang.Object
    Class to enable storage and OPC calculation according to CBUS Event Data.
    • Method Detail

      • setNumElements

        public void setNumElements​(int elements)
        Set Number of Event Data Elements (bytes).
        Parameters:
        elements - 0-3
      • getNumElements

        public int getNumElements()
        Get Number of Event Data Elements (bytes).
        Returns:
        Number of Data Bytes
      • setData

        public void setData​(int index,
                            int value)
        Set value of a single event Data Byte.
        Parameters:
        index - Event Index: 1, 2 or 3
        value - Byte value 0-255
      • getData

        public int getData​(int index)
        Get value of a single event Data Byte.
        Parameters:
        index - Event Index: 1, 2 or 3
        Returns:
        Byte value 0-255 , -1 for unset
      • getJmriString

        public static java.lang.String getJmriString​(int nn,
                                                     int en)